www-servers/sniproxy: new package

This commit is contained in:
nemunaire 2017-06-28 19:16:22 +02:00
parent 277f27a98d
commit 399ee3afbf
4 changed files with 107 additions and 0 deletions

View File

@ -0,0 +1,4 @@
AUX sniproxy.init 493 SHA256 06e340db11a20102c227a3a8cd80e870c5363091455832f59802dc4000b43c33 SHA512 6dc6ba017c18cc5c4b15b2085e95157c396c44b8d368b6ee28c559c9d4072460604afca3a20c46c639c5b095a3da65e3b2b15fc20d738e41651cc77615dd3ca0 WHIRLPOOL 45b11da0d66cd86b5b4043892cd44337a304bf563bffc1b537a4cf0700641045e1e29ca23b443957f70f59941c653ac65be1333e5d4e653aeb5a5946374b759f
DIST sniproxy-0.5.0.tar.gz 72654 SHA256 0b8dd06f9aa9e1c4151b572caf645ffceacdd35a139ded16a7fb0035452c17e5 SHA512 52dbb217193d2b7bf9dea37b13fde395b5c56d0a6627508a245f2807920deb282aae3c1ae7e6b5fa68432990e48998989fd28027b65cb7310f214b29f98e5e5d WHIRLPOOL c353326d5a25123da9c6fbfb85c2a9435f036792f8442adb6650b91b9d51d8916eaded75aa68fdf05768db72bc4f9cccf5dae256e21559d7b5d26ccff6c48b41
EBUILD sniproxy-0.5.0.ebuild 1300 SHA256 3780a95a7d0b49c0c183b2a3f3665851d0ce1cf2ba183d02101eee094e4aa912 SHA512 b749fd7069ddf7716e610ea97033bce2de146a3e77c2219c6d6eb4b754a2d3c6e99514cfebd2931b53b8393cc6ba736c56116c36623a84a1c71bfcaab930b7a5 WHIRLPOOL 8704c72df400962ca7021406ce0e184be86e96af2c0510bc22a961a6569f763cd4c8c6c32a41169efde986722cd8ff3a8accc3204f0d8b578ccab22ee974c882
MISC metadata.xml 630 SHA256 737c49cb3f53fe0ed05458003c7f081058dfa521011a566f2da18f38e2aa7b60 SHA512 263e1b4f405a67f6e402cd842d95640664c9f961ee29c614022787be76a2d83b5dcb3c4e784bef4369424680bdf1888d440eeb0a195dd8dfa65132c137a2fb55 WHIRLPOOL 4e5a4aa7f9d370f5674c554d3f79fd7cb9a6b7f6ed01d70b24f41021e54495e9f02decf2718dd0e893ba9d467322627d2f9a8c53d003f01aaf770043e137d379

View File

@ -0,0 +1,17 @@
#!/sbin/openrc-run
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
name="sniproxy daemon"
description="Proxies incoming HTTP and TLS connections based on the hostname contained in the initial request."
SNIPROXY_CONFFILE=${SNIPROXY_CONFFILE:-/etc/sniproxy/${SVCNAME}.conf}
command="/usr/sbin/sniproxy"
command_args="-c \"${SNIPROXY_CONFFILE}\""
pidfile=${SNIPROXY_PIDFILE:-/var/run/sniproxy.pid}
depend() {
need net
use logger
}

View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>nemunaire@nemunai.re</email>
<name>Pierre-Olivier Mercier</name>
</maintainer>
<maintainer type="project">
<email>proxy-maint@gentoo.org</email>
<name>Proxy Maintainers</name>
</maintainer>
<use>
<flag name="dns">
Enable DNS resolver via net-libs/udns
</flag>
<flag name="largefile">
Enable large file support (so we can log more than 2GB)
</flag>
<flag name="rfc3339">
Use RFC3339 timestamp format in log.
</flag>
</use>
</pkgmetadata>

View File

@ -0,0 +1,63 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
inherit autotools user
if [[ ${PV} == 9999* ]]; then
EGIT_REPO_URI="https://github.com/dlundquist/sniproxy.git"
EGIT_BRANCH="master"
inherit git-r3
KEYWORDS=""
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"
RDEPEND="
dev-libs/libev
>=dev-libs/libpcre-3
dns? ( net-libs/udns )
"
DEPEND="${RDEPEND}"
src_prepare() {
default
eautoreconf
{
sed -i "/user/s/daemon/sniproxy/" debian/sniproxy.conf &&
sed -i "/create/s/daemon/sniproxy/" debian/logrotate.conf
} || die "Unable to replace configuration"
}
src_install() {
default
newinitd "${FILESDIR}/sniproxy.init" sniproxy
insinto /etc/sniproxy
doins "${S}"/debian/sniproxy.conf
keepdir /var/log/sniproxy
insinto /etc/logrotate.d
newins "${S}"/debian/logrotate.conf sniproxy
dodoc ARCHITECTURE.md AUTHORS README.md
doman man/sniproxy.8
doman man/sniproxy.conf.5
}
pkg_postinst() {
enewgroup ${PN}
enewuser ${PN} -1 -1 /var/lib/sniproxy ${PN}
}