diff options
author | bar0metr | 2018-07-01 11:28:18 +0500 |
---|---|---|
committer | bar0metr | 2018-07-01 11:28:18 +0500 |
commit | 244cbc9d0649f10912c2fced01866cb9893ab74d (patch) | |
tree | f6e10fc2344dfdde06747f4968b7e4fa4502f40e | |
download | aur-244cbc9d0649f10912c2fced01866cb9893ab74d.tar.gz |
Initial import
-rw-r--r-- | .SRCINFO | 41 | ||||
-rw-r--r-- | PKGBUILD | 114 | ||||
-rw-r--r-- | squid-rotate.service | 9 | ||||
-rw-r--r-- | squid-rotate.timer | 10 | ||||
-rw-r--r-- | squid.pam | 5 | ||||
-rw-r--r-- | squid.service | 13 | ||||
-rw-r--r-- | squid.sysusers | 2 | ||||
-rw-r--r-- | squid.tmpfiles | 4 |
8 files changed, 198 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..8c907b0ec943 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,41 @@ +pkgbase = squid4 + pkgdesc = Full-featured Web proxy cache server + pkgver = 4.0.25 + pkgrel = 4 + url = http://www.squid-cache.org + arch = x86_64 + license = GPL + makedepends = krb5 + depends = openssl-1.0 + depends = pam + depends = perl + depends = libltdl + depends = libcap + depends = nettle + depends = gnutls + depends = libnsl + options = emptydirs + backup = etc/squid/squid.conf + backup = etc/squid/cachemgr.conf + backup = etc/squid/errorpage.css + backup = etc/squid/mime.conf + source = http://www.squid-cache.org/Versions/v4/squid4-4.0.25.tar.xz + source = http://www.squid-cache.org/Versions/v4/squid4-4.0.25.tar.xz.asc + source = squid.pam + source = squid.service + source = squid.tmpfiles + source = squid.sysusers + source = squid-rotate.service + source = squid-rotate.timer + validpgpkeys = B06884EDB779C89B044E64E3CD6DBF8EF3B17D3E + sha256sums = SKIP + sha256sums = SKIP + sha256sums = SKIP + sha256sums = SKIP + sha256sums = SKIP + sha256sums = SKIP + sha256sums = SKIP + sha256sums = SKIP + +pkgname = squid4 + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..60a7855c6378 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,114 @@ +pkgname=squid4 +pkgver=4.0.25 +pkgrel=4 +pkgdesc='Full-featured Web proxy cache server' +arch=('x86_64') +url='http://www.squid-cache.org' +depends=('openssl-1.0' 'pam' 'perl' 'libltdl' 'libcap' 'nettle' 'gnutls' 'libnsl') +makedepends=('krb5') +license=('GPL') +options=('emptydirs') +backup=('etc/squid/squid.conf' + 'etc/squid/cachemgr.conf' + 'etc/squid/errorpage.css' + 'etc/squid/mime.conf') +validpgpkeys=('B06884EDB779C89B044E64E3CD6DBF8EF3B17D3E') +source=("http://www.squid-cache.org/Versions/v4/$pkgname-$pkgver.tar.xz"{,.asc} + 'squid.pam' + 'squid.service' + 'squid.tmpfiles' + 'squid.sysusers' + 'squid-rotate.service' + 'squid-rotate.timer') + +sha256sums=('SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP') + + +prepare() { + cd "$srcdir/$pkgname-$pkgver" + msg "Preparing Squid..." + msg2 "Getting the client_side_request patch..." + wget https://raw.githubusercontent.com/bar0metr/squid/master/client_side_request.patch + msg2 "Patching Squid..." + patch -p0 -i client_side_request.patch + msg2 "Getting the on_unsupported_protocol (bug 4861)..." + wget https://raw.githubusercontent.com/bar0metr/squid/master/on_unsupported_protocol.patch + msg2 "Patching Squid..." + patch -p0 -i on_unsupported_protocol.patch + msg2 "Done!" +} + +build() { + cd "$srcdir/$pkgname-$pkgver" + + PKG_CONFIG_PATH=/usr/lib/openssl-1.0/pkgconfig \ + ./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 \ + --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 \ + --enable-ssl-crtd \ + --with-openssl + make -j$(nproc) +} + +package() { + cd "$srcdir" + + make -C "$pkgname-$pkgver" DESTDIR="$pkgdir" install + install -Dm644 "$srcdir/squid.pam" "$pkgdir/etc/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 "$srcdir/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} +} + diff --git a/squid-rotate.service b/squid-rotate.service new file mode 100644 index 000000000000..b29006930689 --- /dev/null +++ b/squid-rotate.service @@ -0,0 +1,9 @@ +[Unit] +Description=Squid Rotate + +[Service] +Type=oneshot +ExecStart=/usr/bin/squid -k rotate +Nice=19 +IOSchedulingClass=best-effort +IOSchedulingPriority=7 diff --git a/squid-rotate.timer b/squid-rotate.timer new file mode 100644 index 000000000000..132f94113a7f --- /dev/null +++ b/squid-rotate.timer @@ -0,0 +1,10 @@ +[Unit] +Description=Weekly rotation of squid log files + +[Timer] +OnCalendar=weekly +AccuracySec=1d +Persistent=true + +[Install] +WantedBy=timers.target diff --git a/squid.pam b/squid.pam new file mode 100644 index 000000000000..14d1141afbba --- /dev/null +++ b/squid.pam @@ -0,0 +1,5 @@ +#/etc/pam.d/squid +# +auth required pam_unix.so +account required pam_unix.so + diff --git a/squid.service b/squid.service new file mode 100644 index 000000000000..1db8860e581f --- /dev/null +++ b/squid.service @@ -0,0 +1,13 @@ +[Unit] +Description=Web Proxy Cache Server +After=network.target + +[Service] +Type=forking +PIDFile=/run/squid.pid +ExecStart=/usr/bin/squid -sYC +ExecStop=/usr/bin/squid -k shutdown +ExecReload=/usr/bin/squid -k reconfigure + +[Install] +WantedBy=multi-user.target diff --git a/squid.sysusers b/squid.sysusers new file mode 100644 index 000000000000..3769022c164b --- /dev/null +++ b/squid.sysusers @@ -0,0 +1,2 @@ +u proxy 15 - /var/empty + diff --git a/squid.tmpfiles b/squid.tmpfiles new file mode 100644 index 000000000000..edbe765215fe --- /dev/null +++ b/squid.tmpfiles @@ -0,0 +1,4 @@ +d /run/squid 0755 proxy proxy - +d /var/cache/squid 0755 proxy proxy - +d /var/log/squid 0755 proxy proxy - + |