You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
78 lines
1.6 KiB
78 lines
1.6 KiB
4 years ago
|
# Copyright 1999-2020 Gentoo Authors
|
||
6 years ago
|
# Distributed under the terms of the GNU General Public License v2
|
||
|
|
||
|
EAPI=7
|
||
|
|
||
4 years ago
|
inherit autotools
|
||
6 years ago
|
|
||
4 years ago
|
if [[ ${PV} == *9999 ]]; then
|
||
6 years ago
|
EGIT_REPO_URI="https://github.com/dlundquist/sniproxy.git"
|
||
|
EGIT_BRANCH="master"
|
||
|
inherit git-r3
|
||
|
else
|
||
|
SRC_URI="https://github.com/dlundquist/sniproxy/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
||
|
KEYWORDS="~amd64 ~x86"
|
||
|
fi
|
||
|
|
||
|
DESCRIPTION="Proxies incoming HTTP and TLS connections based on the hostname"
|
||
|
HOMEPAGE="https://github.com/dlundquist/sniproxy"
|
||
|
|
||
|
LICENSE="BSD-2"
|
||
|
SLOT="0"
|
||
|
IUSE="+dns +largefile rfc3339 test"
|
||
5 years ago
|
RESTRICT="!test? ( test )"
|
||
6 years ago
|
|
||
|
RDEPEND="
|
||
4 years ago
|
acct-group/sniproxy
|
||
|
acct-user/sniproxy
|
||
6 years ago
|
dev-libs/libev
|
||
|
>=dev-libs/libpcre-3
|
||
4 years ago
|
dns? ( net-libs/udns )"
|
||
|
DEPEND="${RDEPEND}
|
||
|
test? ( net-misc/curl )"
|
||
6 years ago
|
BDEPEND="
|
||
|
sys-devel/gettext
|
||
4 years ago
|
virtual/pkgconfig"
|
||
|
|
||
|
PATCHES=( "${FILESDIR}"/${P}-fno-common.patch )
|
||
6 years ago
|
|
||
|
src_prepare() {
|
||
|
default
|
||
|
eautoreconf
|
||
|
|
||
|
sed -i "/user/s/daemon/sniproxy/" debian/sniproxy.conf || die "Unable to replace configuration"
|
||
|
sed -i "/create/s/daemon/sniproxy/" debian/logrotate.conf || die "Unable to replace logrotate configuration"
|
||
|
}
|
||
|
|
||
|
src_configure() {
|
||
|
local my_conf=(
|
||
|
$(use_enable dns)
|
||
|
$(use_enable largefile)
|
||
|
$(use_enable rfc3339 rfc3339-timestamps)
|
||
|
)
|
||
|
|
||
|
econf "${my_conf[@]}"
|
||
|
}
|
||
|
|
||
4 years ago
|
src_test() {
|
||
|
emake -j1 check
|
||
|
}
|
||
|
|
||
6 years ago
|
src_install() {
|
||
|
default
|
||
|
|
||
|
newinitd "${FILESDIR}/sniproxy.init" sniproxy
|
||
|
|
||
|
insinto /etc/sniproxy
|
||
|
doins debian/sniproxy.conf
|
||
|
|
||
|
keepdir /var/log/sniproxy
|
||
|
|
||
|
insinto /etc/logrotate.d
|
||
|
newins debian/logrotate.conf sniproxy
|
||
|
|
||
|
dodoc ARCHITECTURE.md AUTHORS README.md
|
||
|
doman man/sniproxy.8
|
||
|
doman man/sniproxy.conf.5
|
||
|
}
|