summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gentoo.org>2017-06-14 08:36:41 -0700
committerMatt Turner <mattst88@gentoo.org>2017-06-14 08:48:04 -0700
commit58ad6e14c853928499f34ee991120ee2196058e7 (patch)
tree2e790d43e098ce37ea25dc3cfa372abfd351ace5 /net-proxy/redsocks/redsocks-9999.ebuild
parentwww-apps/gitea: Remove old (diff)
downloadgentoo-58ad6e14c853928499f34ee991120ee2196058e7.tar.gz
gentoo-58ad6e14c853928499f34ee991120ee2196058e7.tar.bz2
gentoo-58ad6e14c853928499f34ee991120ee2196058e7.zip
net-proxy/redsocks: Ship man page, init files, etc
Also move config file to /etc/redsocks.conf (there's a single file, no need for a directory) and add a redsocks user and group.
Diffstat (limited to 'net-proxy/redsocks/redsocks-9999.ebuild')
-rw-r--r--net-proxy/redsocks/redsocks-9999.ebuild19
1 files changed, 15 insertions, 4 deletions
diff --git a/net-proxy/redsocks/redsocks-9999.ebuild b/net-proxy/redsocks/redsocks-9999.ebuild
index 609aff1f9571..984f5b196d5c 100644
--- a/net-proxy/redsocks/redsocks-9999.ebuild
+++ b/net-proxy/redsocks/redsocks-9999.ebuild
@@ -11,7 +11,7 @@ else
EGIT_REPO_URI="git://github.com/darkk/${PN}.git"
fi
-inherit toolchain-funcs ${GIT_ECLASS}
+inherit systemd toolchain-funcs user ${GIT_ECLASS}
DESCRIPTION="Transparent redirector of any TCP connection to proxy"
HOMEPAGE="http://darkk.net.ru/redsocks/"
@@ -25,13 +25,24 @@ RDEPEND="${DEPEND}
[[ ${PV} != *9999 ]] && S="${WORKDIR}"/"${PN}"-release-"${PV}"
+pkg_setup() {
+ enewgroup redsocks
+ enewuser redsocks -1 -1 /run/redsocks redsocks
+}
+
src_compile() {
CC="$(tc-getCC)" emake || die "emake failed"
}
src_install() {
- dobin redsocks
+ dosbin redsocks
+ doman debian/redsocks.8
use doc && dodoc README doc/*
- insinto /etc/redsocks
- newins redsocks.conf.example redsocks.conf
+ insinto /etc
+ newins debian/redsocks.conf redsocks.conf
+
+ newinitd "${FILESDIR}"/redsocks.init redsocks
+ newconfd "${FILESDIR}"/redsocks.conf redsocks
+
+ systemd_dounit "${FILESDIR}"/redsocks.service
}