diff options
-rw-r--r-- | net-proxy/shadowsocks-libev/Manifest | 1 | ||||
-rw-r--r-- | net-proxy/shadowsocks-libev/shadowsocks-libev-3.3.4.ebuild | 84 |
2 files changed, 85 insertions, 0 deletions
diff --git a/net-proxy/shadowsocks-libev/Manifest b/net-proxy/shadowsocks-libev/Manifest index 5c5dfa0bd48a..28122f1784bb 100644 --- a/net-proxy/shadowsocks-libev/Manifest +++ b/net-proxy/shadowsocks-libev/Manifest @@ -1,2 +1,3 @@ DIST shadowsocks-libev-3.3.2.tar.gz 279477 BLAKE2B 4f40bf3b122f3ccc7da040fdf0d643e2138530e1c5fb295e0bb10d027a2ff525d5ee42febb12ad8fc254d1457e399a9b43904d9c2c9079ca0955c49c3bf808d0 SHA512 2b997680ff46a6888326aea59b554acf81f391663129fe05b75e2bd1474c0c1738292bbab0b5dbbfc2a8228b17759101b1cd266d40b2e7bfdb5912bd3408b3e2 DIST shadowsocks-libev-3.3.3.tar.gz 279655 BLAKE2B d2d229ae2b3223c987682b6ed3e87481dc2653cbaae0092a7502b7b740a671f805e241e8912a0dbb46741eae0d118acabfc3e08ecc678948d897ba4179e6359c SHA512 f02b43ee95b18b0a63fae1a1ad56b4d5e41cc79dc38cd9ad71c3830b7bb97a14110299f766b1e2cfbd6ce362f4c76c338693b1d8b558cf18b9c5e53a08fddd38 +DIST shadowsocks-libev-3.3.4.tar.gz 279666 BLAKE2B ea698a3cf29ed0b1268d17e25a492712cb90f515068de2f74d200ab04bb0d5ca859ea1d7f071714cc1c8dced0e566df4bfea0d780e24c9398f93ab1e362ec466 SHA512 4fb9e4a62f86f1504aab71022b5078a1f97b1f14da82c7b456dc9eaed23be990430769f37b7c2855c266be40ec215237bb0a40d254dffac8556ec4719cc9aa6d diff --git a/net-proxy/shadowsocks-libev/shadowsocks-libev-3.3.4.ebuild b/net-proxy/shadowsocks-libev/shadowsocks-libev-3.3.4.ebuild new file mode 100644 index 000000000000..7972f8f95872 --- /dev/null +++ b/net-proxy/shadowsocks-libev/shadowsocks-libev-3.3.4.ebuild @@ -0,0 +1,84 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +MY_PV="v${PV}" +inherit autotools eutils systemd + +DESCRIPTION="A lightweight secured SOCKS5 proxy for embedded devices and low end boxes" +HOMEPAGE="https://github.com/shadowsocks/shadowsocks-libev" + +#repack with git submodule populated: libbloom, libcork, libipset +#SRC_URI="https://dev.gentoo.org/~dlan/distfiles/${P}.tar.xz" + +SRC_URI="https://github.com/shadowsocks/${PN}/archive/${MY_PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-3+" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~x86" +IUSE="debug doc" + +RDEPEND="net-libs/mbedtls:= + net-libs/libbloom + net-libs/libcork + net-libs/libcorkipset + >=dev-libs/libsodium-1.0.8:= + dev-libs/libev + net-dns/c-ares + dev-libs/libpcre + " +DEPEND="${RDEPEND} + sys-kernel/linux-headers + doc? ( + app-text/asciidoc + app-text/xmlto + ) + " + +src_prepare() { + sed -i 's|AC_CONFIG_FILES(\[libbloom/Makefile libcork/Makefile libipset/Makefile\])||' \ + configure.ac || die + default + eautoreconf +} + +src_configure() { + local myconf=" + $(use_enable debug assert) + --enable-system-shared-lib + " + use doc || myconf+="--disable-documentation" + econf ${myconf} +} + +src_install() { + default + + find "${D}" -name '*.la' -type f -delete || die + + dodir "/etc/${PN}" + insinto "/etc/${PN}" + newins "${FILESDIR}/shadowsocks.json" shadowsocks.json + + newinitd "${FILESDIR}/shadowsocks.initd" shadowsocks + dosym shadowsocks /etc/init.d/shadowsocks.server + dosym shadowsocks /etc/init.d/shadowsocks.client + dosym shadowsocks /etc/init.d/shadowsocks.redir + dosym shadowsocks /etc/init.d/shadowsocks.tunnel + + dodoc -r acl + + systemd_newunit "${FILESDIR}/${PN}-local_at.service" "${PN}-local@.service" + systemd_newunit "${FILESDIR}/${PN}-server_at.service" "${PN}-server@.service" + systemd_newunit "${FILESDIR}/${PN}-redir_at.service" "${PN}-redir@.service" + systemd_newunit "${FILESDIR}/${PN}-tunnel_at.service" "${PN}-tunnel@.service" +} + +pkg_setup() { + elog "You need to choose the mode" + elog " server: rc-update add shadowsocks.server default" + elog " client: rc-update add shadowsocks.client default" + elog " redir: rc-update add shadowsocks.redir default" + elog " tunnel: rc-update add shadowsocks.tunnel default" +} |