blob: 35d2409e4b385b6be69ce9b7f4eb86d5c20bdf77 (
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
|
# $Id: PKGBUILD 100452 2013-11-04 12:13:15Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Mark Coolen <mark.coolen@gmail.com>
# Contributor: Tom Newsom <Jeepster@gmx.co.uk>
# Contributor: Kevin Piche <kevin@archlinux.org>
pkgname=squid
pkgver=3.3.10
pkgrel=1
pkgdesc='Full-featured Web proxy cache server'
arch=('x86_64' 'i686' 'mips64el')
url='http://www.squid-cache.org'
depends=('openssl' 'pam' 'cron' 'perl' 'libltdl')
makedepends=('libcap' 'krb5')
license=('GPL')
options=('emptydirs')
backup=('etc/squid/squid.conf'
'etc/squid/mime.conf')
install=$pkgname.install
source=("http://www.squid-cache.org/Versions/v3/3.3/$pkgname-$pkgver.tar.bz2"
'squid.pam'
'squid.cron'
'squid.service')
md5sums=('ff69d08818ee008f66666f79bb27b9ee'
'270977cdd9b47ef44c0c427ab9034777'
'a71425c4951f2e5b640d19e6a5048531'
'ceeb57c69ebb165676219222f109a24e')
prepare() {
cd "$srcdir/$pkgname-$pkgver"
# gcc 4.6 doesn't support -fhuge-objects.
sed '/^ HUGE_OBJECT_FLAG=/ s/"-fhuge-objects"//' -i configure
# fix cache_dir, cache_dir size, and effective group.
sed '/^DEFAULT_SWAP_DIR/ s@/cache@/cache/squid@' -i src/Makefile.in
sed '/^#cache_dir/ s/100/256/
/^NAME: cache_effective_group/ {n;n;s/none/proxy/}' -i src/cf.data.pre
sed -i '1,1i#include <errno.h>' helpers/external_acl/file_userip/ext_file_userip_acl.cc
for i in \
helpers/basic_auth/DB \
helpers/log_daemon/DB \
helpers/negotiate_auth/kerberos \
helpers/external_acl/SQL_session; \
do
echo -e "#!/bin/sh\nexit 0" >$i/config.test
chmod 0755 $i/config.test
done
}
build() {
cd "$srcdir/$pkgname-$pkgver"
./configure \
--prefix=/usr \
--sbindir=/usr/bin \
--datadir=/usr/share/squid \
--sysconfdir=/etc/squid \
--libexecdir=/usr/lib/squid \
--localstatedir=/var \
--with-logdir=/var/log/squid \
--with-pidfile=/run/squid.pid \
--enable-auth \
--enable-auth-basic \
--enable-auth-ntlm \
--enable-auth-digest \
--enable-auth-negotiate \
--enable-removal-policies="lru,heap" \
--enable-storeio="aufs,ufs,diskd" \
--enable-delay-pools \
--enable-arp-acl \
--enable-ssl \
--enable-snmp \
--enable-linux-netfilter \
--enable-ident-lookups \
--enable-useragent-log \
--enable-cache-digests \
--enable-referer-log \
--enable-arp-acl \
--enable-htcp \
--enable-carp \
--enable-epoll \
--with-large-files \
--enable-arp-acl \
--with-default-user=proxy \
--enable-async-io \
--enable-truncate \
--enable-icap-client \
--enable-ssl-crtd
make
}
package() {
cd "$srcdir"
make -C "$pkgname-$pkgver" DESTDIR="$pkgdir" install
install -Dm755 "$srcdir/squid.cron" "$pkgdir/etc/cron.weekly/squid"
install -Dm644 "$srcdir/squid.pam" "$pkgdir/etc/pam.d/squid"
install -Dm644 "$srcdir/squid.service" \
"$pkgdir/usr/lib/systemd/system/squid.service"
rm -rf "$pkgdir/run" "$pkgdir/var/run"
}
# vim: ts=2 sw=2 et ft=sh
|