From adf72f9fd69042f395b83363edd062236f5391b0 Mon Sep 17 00:00:00 2001 From: Denis Knauf Date: Fri, 28 Sep 2012 17:53:03 +0200 Subject: [PATCH] net-proxy/tinyproxy added. use arbor as master. :) unneeded files removed (arbor provides these). --- exlibs/debian-upstream.exlib | 20 ------- metadata/accounts/users/tinyproxy.conf | 4 ++ metadata/categories.conf | 1 + metadata/layout.conf | 1 + .../tinyproxy/files/systemd/tinyproxy.service | 7 +++ .../tinyproxy/tinyproxy-1.8.3.exheres-0 | 53 +++++++++++++++++++ profiles/amd64/parent | 1 - profiles/layout.conf | 0 8 files changed, 66 insertions(+), 21 deletions(-) delete mode 100644 exlibs/debian-upstream.exlib create mode 100644 metadata/accounts/users/tinyproxy.conf create mode 100644 metadata/layout.conf create mode 100644 packages/net-proxy/tinyproxy/files/systemd/tinyproxy.service create mode 100644 packages/net-proxy/tinyproxy/tinyproxy-1.8.3.exheres-0 delete mode 100644 profiles/amd64/parent delete mode 100644 profiles/layout.conf diff --git a/exlibs/debian-upstream.exlib b/exlibs/debian-upstream.exlib deleted file mode 100644 index f2bdabf..0000000 --- a/exlibs/debian-upstream.exlib +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright 2009 Mike Kelly -# Distributed under the terms of the GNU General Public License v2 - -# This exlib is useful for packages whose upstream is Debian. It'll do -# 'the right thing' for DOWNLOADS - -myexparam debian_pn=${PN} -myexparam debian_pv=${PV} -myexparam suffix=.tar.gz - -DEBIAN_UPSTREAM_PN=$(exparam debian_pn) -DEBIAN_UPSTREAM_PV=$(exparam debian_pv) - -DEBIAN_UPSTREAM_PREFIX="${DEBIAN_UPSTREAM_PN:0:1}" -if [[ "${DEBIAN_UPSTREAM_PN}" == lib* ]]; then - DEBIAN_UPSTREAM_PREFIX="${DEBIAN_UPSTREAM_PN:0:4}" -fi - -DOWNLOADS="mirror://debian/pool/main/${DEBIAN_UPSTREAM_PREFIX}/${DEBIAN_UPSTREAM_PN}/${DEBIAN_UPSTREAM_PN}_${DEBIAN_UPSTREAM_PV}$(exparam suffix)" - diff --git a/metadata/accounts/users/tinyproxy.conf b/metadata/accounts/users/tinyproxy.conf new file mode 100644 index 0000000..16cf270 --- /dev/null +++ b/metadata/accounts/users/tinyproxy.conf @@ -0,0 +1,4 @@ +gecos = User for tinyproxy server +home = /var/empty +shell = /sbin/nologin +primary_group = tinyproxy diff --git a/metadata/categories.conf b/metadata/categories.conf index 380d76b..37692bf 100644 --- a/metadata/categories.conf +++ b/metadata/categories.conf @@ -1 +1,2 @@ app-arch +net-proxy diff --git a/metadata/layout.conf b/metadata/layout.conf new file mode 100644 index 0000000..c989464 --- /dev/null +++ b/metadata/layout.conf @@ -0,0 +1 @@ +masters = arbor diff --git a/packages/net-proxy/tinyproxy/files/systemd/tinyproxy.service b/packages/net-proxy/tinyproxy/files/systemd/tinyproxy.service new file mode 100644 index 0000000..ae3034a --- /dev/null +++ b/packages/net-proxy/tinyproxy/files/systemd/tinyproxy.service @@ -0,0 +1,7 @@ +[Unit] +Description=Tinyproxy is a light-weight HTTP proxy daemon for POSIX operating systems. +After=network.target + +[Service] +PIDFile=/var/run/tinyproxy/tinyproxy.pid +ExecStart=/usr/sbin/tinyproxy -c /etc/tinyproxy.conf -d diff --git a/packages/net-proxy/tinyproxy/tinyproxy-1.8.3.exheres-0 b/packages/net-proxy/tinyproxy/tinyproxy-1.8.3.exheres-0 new file mode 100644 index 0000000..2062a75 --- /dev/null +++ b/packages/net-proxy/tinyproxy/tinyproxy-1.8.3.exheres-0 @@ -0,0 +1,53 @@ +# Copyright (c) 2010 Jan Meier +# Distributed under the terms of the GNU General Public License v2 + +require systemd-service + +SUMMARY="Tinyproxy is a light-weight HTTP proxy daemon for POSIX operating systems." +HOMEPAGE="https://www.banu.com/tinyproxy/" +DOWNLOADS="https://www.banu.com/pub/${PN}/$(ever range 1-2)/${PNV}.tar.bz2" +SLOT="0" +LICENCES="GPL-2" +PLATFORMS="~x86" +DEPENDENCIES=" + group/tinyproxy + user/tinyproxy + app-doc/asciidoc +" +# PID-file will be created in /var/run, but /var/run is a link to /run. +# in future, tinyproxy needs an other config, that it uses /run. +# localstatedir can't be changed to / because /var/log. +DEFAULT_SRC_CONFIGURE_PARAMS="--localstatedir=/var" +MYOPTIONS="systemd" + +src_prepare() { + c="etc/tinyproxy.conf.in" + b="${c}.bk" + if option systemd + then + sed -e 's,^#PidFile.*,&\ +#\ +# systemd wants all pidfiles in /run.\ +# Do not change the following line:\ +PidFile "/run/tinyproxy/tinyproxy.pid",' + else + cat + fi < "${c}" > "${b}" + sed \ + -e 's/^User nobody/User tinyproxy/' \ + -e 's/^Group nobody/Group tinyproxy/' \ + < "${b}" > "${c}" +} + +src_install() { + default + keepdir /var/log/tinyproxy + if option systemd + then + install_systemd_files + insinto /usr/${LIBDIR}/tmpfiles.d + hereins tinyproxy.conf <