jobextra/squid/PKGBUILD-arch

125 lines
4.6 KiB
Bash

# 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=6.8
pkgrel=1
pkgdesc='Full-featured Web proxy cache server'
arch=('x86_64')
url='http://www.squid-cache.org'
depends=('openssl' 'pam' 'perl' 'libltdl' 'libcap' 'nettle' 'gnutls' 'libnsl' 'libxml2'
'tdb' 'systemd-libs')
makedepends=('krb5' 'libldap' 'systemd')
optdepends=('libldap')
license=('GPL')
options=('emptydirs')
backup=('etc/squid/squid.conf'
'etc/squid/cachemgr.conf'
'etc/squid/errorpage.css'
'etc/squid/mime.conf')
validpgpkeys=('EA31CC5E9488E5168D2DCC5EB268E706FF5CF463'
'B06884EDB779C89B044E64E3CD6DBF8EF3B17D3E'
'29B4B1F7CE03D1B1DED22F3028F85029FEF6E865')
source=("http://www.squid-cache.org/Versions/v6/$pkgname-$pkgver.tar.xz"{,.asc}
"https://github.com/squid-cache/squid/commit/72a3bbd5e431597c3fdb56d752bc56b010ba3817.patch"
"https://github.com/squid-cache/squid/commit/deee944f9a12c9fd399ce52f3e2526bb573a9470.patch"
"https://github.com/squid-cache/squid/commit/6014c6648a2a54a4ecb7f952ea1163e0798f9264.patch"
"https://github.com/squid-cache/squid/commit/57acdb7dcec38605ede048db82b495ba316e6311.patch"
"https://github.com/squid-cache/squid/commit/c11ee3d0812e7041f395073cf3b2f368f1caf26d.patch"
'squid.pam'
'squid.tmpfiles'
'squid.sysusers'
'squid-rotate.service'
'squid-rotate.timer')
sha256sums=('11cc5650b51809d99483ccfae24744a2e51cd16199f5ff0c917e84fce695870f'
'SKIP'
'01f92f6d4dcc1d52f992064bdb007dc44aac91c51556a607a3992964f9f12fb9'
'3e1992502ce51497e5ccee50e1a19fdd81f1f7226ed14b73c6207b5389af3b88'
'3f8e09f77f80ba942da1afae44f702fe9f9878e04d02de47b63c600006630d39'
'4766c49ea87e2e156eac8bfd1db27257b618e1c3683d67faff7f6865ca4314e4'
'c32034504aa744bb3896819dac58a2efcb5dc19d4950355f53512ffa8a55d52b'
'11fb388f8679fd6461e0de006810ea608a3686fffda16904b0ed71f412be499c'
'495f54e51f6ec1e4dce87090d76718aea1eb37559c4439d876dd39598163062a'
'c903eb86e6968b9d3bd0a9ad3335e8ce76a718b6217251e9dd7e66d5cf1ac94a'
'3a97aa6bf6dcdc427e73bb2f36afdeaaf2bbf7dd2c0bbb7f1a948850198a8b7c'
'8bc77fa1f653a17a4956feac042be9577ba30a8a43480b443fbd67640ae711ee')
prepare() {
cd "$srcdir/$pkgname-$pkgver"
sed -i 's|/var/run/|/run/|g' tools/systemd/squid.service
for p in ${source[@]}; do
test "${p:(-5)}" == "patch" && patch -p1 -i ../${p:(-46)} || true
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,rock" \
--enable-delay-pools \
--enable-arp-acl \
--with-openssl \
--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 \
--disable-arch-native \
--disable-strict-error-checking \
--enable-wccpv2
make
}
package() {
cd "$srcdir"
make -C "$pkgname-$pkgver" DESTDIR="$pkgdir" install
chmod 07755 "$pkgdir"/usr/lib/squid/basic_pam_auth
install -Dm644 "$srcdir/squid.pam" "$pkgdir/usr/lib/pam.d/squid"
install -Dm644 "$srcdir/squid.tmpfiles" "$pkgdir/usr/lib/tmpfiles.d/squid.conf"
install -Dm644 "$srcdir/squid.sysusers" "$pkgdir/usr/lib/sysusers.d/squid.conf"
install -Dm644 "$pkgname-$pkgver/tools/systemd/squid.service" \
"$pkgdir/usr/lib/systemd/system/squid.service"
install -Dm644 "$srcdir/squid-rotate.service" \
"$pkgdir/usr/lib/systemd/system/squid-rotate.service"
install -Dm644 "$srcdir/squid-rotate.timer" \
"$pkgdir/usr/lib/systemd/system/squid-rotate.timer"
# install -dm755 "$pkgdir/usr/lib/systemd/system/timers.target.wants"
# ln -s ../squid-rotate.timer \
# "$pkgdir/usr/lib/systemd/system/timers.target.wants/squid-rotate.timer"
rm -rf "$pkgdir/run" "$pkgdir"/var/{cache,log,run}
}
# vim: ts=2 sw=2 et ft=sh