aboutsummaryrefslogtreecommitdiffstats
path: root/main/squid/APKBUILD
blob: 8f2dc8cd1102460e64a14c214faf737a3a0041ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=squid
pkgver=3.2.0.12
pkgrel=1
pkgdesc="A full-featured Web proxy cache server."
url="http://www.squid-cache.org"
install="squid.pre-install squid.pre-upgrade squid.post-install"
pkgusers="squid"
pkggroups="squid"
arch="all"
license="GPL-2"
depends="logrotate"
makedepends="openssl-dev perl-dev autoconf automake heimdal-dev libtool
	libcap-dev"
subpackages="$pkgname-doc"
linguas="af ar az bg ca cs da de el es et fa fi fr he hu hy id it ja ko lt
	lv ms nl oc pl pt ro ru sk sl sr sv th tr uk uz vi zh"
langdir="/usr/share/squid/errors"

source="http://www.squid-cache.org/Versions/v3/3.2/squid-$pkgver.tar.bz2
	squid-3.2.0.12-loggable-urlgroup.patch
	squid.initd
	squid.confd
	$pkgname.logrotate
	"

pkgusers="squid"
pkggroups="squid"

_builddir="$srcdir"/$pkgname-$pkgver
prepare() {
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
#	./bootstrap.sh
}

build() {
	cd "$_builddir"

	./configure --prefix=/usr \
		--datadir=/usr/share/squid \
		--sysconfdir=/etc/squid \
		--libexecdir=/usr/lib/squid \
		--localstatedir=/var \
		--disable-strict-error-checking \
		--enable-removal-policies="lru,heap" \
		--enable-digest-auth-helpers="password" \
		--enable-basic-auth-helpers="getpwnam,NCSA,SMB,MSNT,multi-domain-NTLM,squid_radius_auth" \
		--enable-epoll \
		--enable-external-acl-helpers="ip_user,unix_group,wbinfo_group" \
		--enable-ntlm-auth-helpers="fakeauth,no_check,smb_lm" \
		--enable-negotiate-auth-helpers="squid_kerb_auth" \
		--disable-mit \
		--enable-heimdal \
		--enable-delay-pools \
		--enable-arp-acl \
		--enable-ssl \
		--enable-linux-netfilter \
		--enable-ident-lookups \
		--enable-useragent-log \
		--enable-cache-digests \
		--enable-referer-log \
		--enable-async-io \
		--enable-truncate \
		--enable-arp-acl \
		--enable-htcp \
		--enable-carp \
		--enable-poll --with-maxfd=4096 \
		--enable-follow-x-forwarded-for \
		--with-large-files \
		|| return 1

	make || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install

	install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
	install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
	install -m644 -D "$srcdir"/$pkgname.logrotate \
		"$pkgdir"/etc/logrotate.d/squid

	install -d -o squid -g squid \
		"$pkgdir"/var/cache/squid \
		"$pkgdir"/var/log/squid \
		"$pkgdir"/var/run/squid
	chmod +x "$pkgdir"/usr/lib/squid/*
}

squid_kerb_auth() {
	pkgdesc="Squid kerberos authetication helper"
	install -d "$subpkgdir"/usr/lib/squid
	mv "$pkgdir"/usr/lib/squid/squid_kerb_auth "$subpkgdir"/usr/lib/squid/
}

md5sums="f11b71b7c58a2a20e87707d4ba441743  squid-3.2.0.12.tar.bz2
084f7b1af1ac0cb8fea35c7a0905a80e  squid-3.2.0.12-loggable-urlgroup.patch
57fed05adc40acab6a5480ec7a014154  squid.initd
44b052db7910f386ef88ddcf69c9ba4e  squid.confd
58823e0b86bc2dc71d270208b7b284b4  squid.logrotate"