# $Id: PKGBUILD 82172 2013-01-10 09:49:38Z spupykin $ # Maintainer: Sergej Pupykin # Contributor: Mark Coolen # Contributor: Tom Newsom # Contributor: Kevin Piche pkgname=squid pkgver=3.2.6 pkgrel=2 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') license=('GPL') options=('emptydirs') backup=('etc/squid/squid.conf' 'etc/squid/mime.conf' 'etc/conf.d/squid') install=$pkgname.install source=("http://www.squid-cache.org/Versions/v3/3.2/$pkgname-$pkgver.tar.bz2" 'squid' 'squid.conf.d' 'squid.pam' 'squid.cron' 'squid.service') md5sums=('87915ad83aebafc7af6871c770b23339' 'e90895ce22c0b618c89a46a9a181fe6c' '2383772ef94efddc7b920628bc7ac5b0' '270977cdd9b47ef44c0c427ab9034777' 'b499c2b725aefd7bd60bec2f1a9de392' '20e00e1aa1198786795f3da32db3c1d8') build() { 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 ' helpers/external_acl/file_userip/ext_file_userip_acl.cc ./configure \ --prefix=/usr \ --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-filedescriptors=4096 \ --with-large-files \ --enable-arp-acl \ --with-default-user=proxy \ --enable-async-io \ --enable-truncate make } package() { cd "$srcdir" make -C "$pkgname-$pkgver" DESTDIR="$pkgdir" install install -Dm755 "$srcdir/squid" "$pkgdir/etc/rc.d/squid" install -Dm755 "$srcdir/squid.cron" "$pkgdir/etc/cron.weekly/squid" install -Dm755 "$srcdir/squid.conf.d" "$pkgdir/etc/conf.d/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