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.
48 lines
1.0 KiB
48 lines
1.0 KiB
3 years ago
|
# Copyright 1999-2021 Gentoo Authors
|
||
7 years ago
|
# Distributed under the terms of the GNU General Public License v2
|
||
|
|
||
3 years ago
|
EAPI=7
|
||
7 years ago
|
|
||
|
if [[ ${PV} != *9999* ]]; then
|
||
|
SRC_URI="https://github.com/darkk/${PN}/archive/release-${PV}.tar.gz -> ${P}.tar.gz"
|
||
3 years ago
|
S="${WORKDIR}"/"${PN}"-release-"${PV}"
|
||
7 years ago
|
KEYWORDS="~amd64 ~x86"
|
||
|
else
|
||
|
GIT_ECLASS="git-r3"
|
||
7 years ago
|
EGIT_REPO_URI="https://github.com/darkk/${PN}.git"
|
||
7 years ago
|
fi
|
||
|
|
||
3 years ago
|
inherit systemd toolchain-funcs ${GIT_ECLASS}
|
||
7 years ago
|
|
||
|
DESCRIPTION="Transparent redirector of any TCP connection to proxy"
|
||
|
HOMEPAGE="http://darkk.net.ru/redsocks/"
|
||
|
LICENSE="Apache-2.0 LGPL-2.1+ ZLIB"
|
||
|
SLOT="0"
|
||
|
IUSE="doc"
|
||
7 years ago
|
RESTRICT="test"
|
||
7 years ago
|
|
||
|
DEPEND="dev-libs/libevent:0="
|
||
3 years ago
|
RDEPEND="
|
||
|
${DEPEND}
|
||
|
acct-group/redsocks
|
||
|
acct-user/redsocks
|
||
|
net-firewall/iptables
|
||
|
"
|
||
7 years ago
|
|
||
|
src_compile() {
|
||
5 years ago
|
CC="$(tc-getCC)" emake
|
||
7 years ago
|
}
|
||
|
|
||
|
src_install() {
|
||
|
dosbin redsocks
|
||
|
doman debian/redsocks.8
|
||
|
use doc && dodoc README doc/*
|
||
|
insinto /etc
|
||
|
newins debian/redsocks.conf redsocks.conf
|
||
|
|
||
3 years ago
|
newinitd "${FILESDIR}"/redsocks.init-r2 redsocks
|
||
7 years ago
|
newconfd "${FILESDIR}"/redsocks.conf redsocks
|
||
|
|
||
|
systemd_dounit "${FILESDIR}"/redsocks.service
|
||
|
}
|