exherbo-denkn/packages/net-proxy/tinyproxy/tinyproxy-1.8.3.exheres-0
Denis Knauf 49f9e461e0 """
2013-03-09 15:54:48 +01:00

43 lines
1.1 KiB
Bash

# 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="~amd64 ~x86"
DEPENDENCIES="
app-doc/asciidoc
group/tinyproxy
user/tinyproxy
"
# 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"
option systemd && expatch "${FILES}/systemd.patch"
expatch "${FILES}/user.patch"
}
src_install() {
default
keepdir /var/log/tinyproxy
if option systemd
then
install_systemd_files
insinto /usr/${LIBDIR}/tmpfiles.d
hereins tinyproxy.conf <<EOF
d /run/tinyproxy 0770 tinyproxy tinyproxy
EOF
fi
}