1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 inherit autotools systemd tmpfiles user
8 DESCRIPTION="A lightweight HTTP/SSL proxy"
9 HOMEPAGE="https://github.com/tinyproxy/tinyproxy/"
10 SRC_URI="https://github.com/tinyproxy/tinyproxy/releases/download/${PV}/${P}.tar.xz"
14 KEYWORDS="~alpha amd64 ~arm ~ia64 ppc ~sparc x86"
16 IUSE="test debug +filter-proxy reverse-proxy transparent-proxy
17 +upstream-proxy +xtinyproxy-header"
18 RESTRICT="!test? ( test )"
20 REQUIRED_USE="test? ( xtinyproxy-header )"
24 enewuser ${PN} "" "" "" ${PN}
31 -e "s|nobody|${PN}|g" \
32 etc/${PN}.conf.in || die "sed failed"
40 $(use_enable filter-proxy filter) \
41 $(use_enable reverse-proxy reverse) \
42 $(use_enable transparent-proxy transparent) \
43 $(use_enable upstream-proxy upstream) \
44 $(use_enable xtinyproxy-header xtinyproxy) \
49 # The make check target does not run the test suite
56 dodoc AUTHORS ChangeLog NEWS README TODO
58 diropts -m0775 -o ${PN} -g ${PN}
59 keepdir /var/log/${PN}
61 newinitd "${FILESDIR}"/${PN}-1.10.0.initd tinyproxy
62 systemd_newunit "${FILESDIR}"/${PN}-1.10.0.service tinyproxy.service
63 systemd_dotmpfilesd "${FILESDIR}"/${PN}.tmpfiles.conf
67 tmpfiles_process ${PN}.tmpfiles.conf
69 elog "For filtering domains and URLs, enable filter option in the configuration"
70 elog "file and add them to the filter file (one domain or URL per line)."