summaryrefslogtreecommitdiff
path: root/community/polipo
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2013-07-19 01:10:32 -0700
committerroot <root@rshg054.dnsready.net>2013-07-19 01:10:32 -0700
commit8fbc0076a4827ddc6af92e0b9daa4c4c31450808 (patch)
tree03fd0e2921ebd53228d9a93e32ed3976b636cbea /community/polipo
parente445a313723389ba9ee1fded025c567dae5b21ea (diff)
Fri Jul 19 01:09:18 PDT 2013
Diffstat (limited to 'community/polipo')
-rw-r--r--community/polipo/PKGBUILD52
-rw-r--r--community/polipo/polipo.conf.d4
-rw-r--r--community/polipo/polipo.install25
-rw-r--r--community/polipo/polipo.service11
4 files changed, 92 insertions, 0 deletions
diff --git a/community/polipo/PKGBUILD b/community/polipo/PKGBUILD
new file mode 100644
index 000000000..144e4fe19
--- /dev/null
+++ b/community/polipo/PKGBUILD
@@ -0,0 +1,52 @@
+# $Id: PKGBUILD 90446 2013-05-12 13:12:12Z jelle $
+# Maintainer: Thorsten Töpper <atsutane-tu@freethoughts.de>
+# Contributor: Jelle van der Waa <jelle vdwaa nl>
+# Contributor: Thomas Holmquist <thomas@vorget.com>
+# Contributor: Jan Boehringer <ja(a)bm-boehringer.de>
+# Contributor: Alex Griffin <griffin.aj(a)gmail.com>
+
+pkgname=polipo
+pkgver=1.0.4.1
+pkgrel=10
+pkgdesc="A small and fast caching web proxy."
+arch=('i686' 'x86_64')
+url="http://www.pps.jussieu.fr/~jch/software/polipo/"
+license=('GPL')
+depends=('bash')
+makedepends=('texinfo')
+install=polipo.install
+source=("http://freehaven.net/~chrisd/polipo/polipo-$pkgver.tar.gz"
+ "polipo.conf.d" "polipo.service")
+md5sums=('bfc5c85289519658280e093a270d6703'
+ '685aa0c6070dee11c701932d23afcc6a'
+ '143ef45db99dc745b6c3a606847be9fe')
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ make
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+ make PREFIX="$pkgdir/usr" \
+ MANDIR="$pkgdir/usr/share/man" \
+ INFODIR="$pkgdir/usr/share/info" \
+ LOCAL_ROOT="$pkgdir/usr/share/polipo/www" \
+ DISK_CACHE_ROOT="$pkgdir/var/cache/polipo" \
+ install
+
+
+ # install config files
+ install -Dm 644 config.sample $pkgdir/etc/polipo/config.sample
+ install -Dm 644 forbidden.sample $pkgdir/etc/polipo/forbidden.sample
+
+ # install license
+ install -Dm644 COPYING $pkgdir/usr/share/licenses/polipo/LICENSE
+
+ # install systemd service / cron
+ install -Dm 644 $srcdir/polipo.service $pkgdir/usr/lib/systemd/system/polipo.service
+ install -Dm 644 $srcdir/polipo.conf.d $pkgdir/etc/conf.d/polipo.conf
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/community/polipo/polipo.conf.d b/community/polipo/polipo.conf.d
new file mode 100644
index 000000000..dc879d32b
--- /dev/null
+++ b/community/polipo/polipo.conf.d
@@ -0,0 +1,4 @@
+#
+# Parameters to be passed to polipo
+#
+POLIPO_ARGS="daemonise=true logFile=\"/var/log/polipo.log\""
diff --git a/community/polipo/polipo.install b/community/polipo/polipo.install
new file mode 100644
index 000000000..bacc46377
--- /dev/null
+++ b/community/polipo/polipo.install
@@ -0,0 +1,25 @@
+infodir=/usr/share/info
+filelist=(polipo.info)
+
+post_install() {
+ [ -x usr/bin/install-info ] || return 0
+ for file in ${filelist[@]}; do
+ install-info $infodir/$file $infodir/dir 2> /dev/null
+ done
+ install -d /var/cache/polipo 2> /dev/null
+ touch /var/log/polipo.log 2> /dev/null
+ chown -R nobody:nobody /var/cache/polipo /var/log/polipo.log 2> /dev/null
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+pre_remove() {
+ [ -x usr/bin/install-info ] || return 0
+ for file in ${filelist[@]}; do
+ install-info --delete $infodir/$file $infodir/dir 2> /dev/null
+ done
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/community/polipo/polipo.service b/community/polipo/polipo.service
new file mode 100644
index 000000000..a4c0f6d94
--- /dev/null
+++ b/community/polipo/polipo.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Polipo Proxy Server
+After=network.target
+
+[Service]
+Type=forking
+ExecStart=/usr/bin/polipo daemonise=true logFile="/var/log/polipo.log"
+User=nobody
+
+[Install]
+WantedBy=multi-user.target