diff options
Diffstat (limited to 'community/tinyproxy')
-rw-r--r-- | community/tinyproxy/PKGBUILD | 43 | ||||
-rw-r--r-- | community/tinyproxy/tinyproxy.install | 9 | ||||
-rw-r--r-- | community/tinyproxy/tinyproxy.service | 11 | ||||
-rw-r--r-- | community/tinyproxy/tinyproxy.tmpfiles.conf | 1 |
4 files changed, 64 insertions, 0 deletions
diff --git a/community/tinyproxy/PKGBUILD b/community/tinyproxy/PKGBUILD new file mode 100644 index 000000000..c2adfa0b2 --- /dev/null +++ b/community/tinyproxy/PKGBUILD @@ -0,0 +1,43 @@ +# $Id: PKGBUILD 92033 2013-05-30 23:55:47Z seblu $ +# Maintainer: Lukas Fleischer <archlinux at cryptocrack dot de> +# Contributor: Andrea Zucchelli <zukka77@gmail.com> + +pkgname=tinyproxy +pkgver=1.8.3 +pkgrel=7 +pkgdesc='A light-weight HTTP proxy daemon for POSIX operating systems.' +arch=('i686' 'x86_64') +url='https://banu.com/tinyproxy/' +license=('GPL') +makedepends=('asciidoc') +install="${pkgname}.install" +backup=('etc/tinyproxy/tinyproxy.conf') +source=("https://banu.com/pub/${pkgname}/1.8/${pkgname}-${pkgver}.tar.bz2" + 'tinyproxy.tmpfiles.conf' + 'tinyproxy.service') +md5sums=('292ac51da8ad6ae883d4ebf56908400d' + '3c2764578f26581346fe312da0519a3e' + '41938243faca487a14beeee5114f244e') + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + + ./configure --prefix=/usr --sysconfdir=/etc/tinyproxy --sbindir=/usr/bin \ + --localstatedir=/var --enable-transparent + make +} + +package() { + cd "${srcdir}/${pkgname}-${pkgver}" + + make DESTDIR="${pkgdir}" install + install -Dm0644 "${srcdir}/tinyproxy.tmpfiles.conf" "${pkgdir}/usr/lib/tmpfiles.d/tinyproxy.conf" + + install -dm0755 -o nobody -g nobody "${pkgdir}/var/log/${pkgname}" + + # Provide sane defaults + sed -i '/^#Listen/a\Listen 127.0.0.1' "${pkgdir}/etc/tinyproxy/tinyproxy.conf" + + install -Dm0644 "${srcdir}/tinyproxy.service" \ + "${pkgdir}/usr/lib/systemd/system/tinyproxy.service" +} diff --git a/community/tinyproxy/tinyproxy.install b/community/tinyproxy/tinyproxy.install new file mode 100644 index 000000000..85f3dfc41 --- /dev/null +++ b/community/tinyproxy/tinyproxy.install @@ -0,0 +1,9 @@ +post_install() { + if [ ! -d /var/run/tinyproxy ]; then + install -dm0770 -o nobody -g nobody /var/run/tinyproxy + fi +} + +post_upgrade() { + post_install "$@" +} diff --git a/community/tinyproxy/tinyproxy.service b/community/tinyproxy/tinyproxy.service new file mode 100644 index 000000000..f1ef18faa --- /dev/null +++ b/community/tinyproxy/tinyproxy.service @@ -0,0 +1,11 @@ +[Unit] +Description=Tinyproxy Web Proxy Server +After=network.target + +[Service] +Type=forking +ExecStart=/usr/bin/tinyproxy -c /etc/tinyproxy/tinyproxy.conf +PIDFile=/run/tinyproxy/tinyproxy.pid + +[Install] +WantedBy=multi-user.target diff --git a/community/tinyproxy/tinyproxy.tmpfiles.conf b/community/tinyproxy/tinyproxy.tmpfiles.conf new file mode 100644 index 000000000..791a99ad1 --- /dev/null +++ b/community/tinyproxy/tinyproxy.tmpfiles.conf @@ -0,0 +1 @@ +d /var/run/tinyproxy 0770 nobody nobody - |