summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYixun Lan <dlan@gentoo.org>2020-07-09 22:07:55 +0800
committerYixun Lan <dlan@gentoo.org>2020-07-09 22:08:20 +0800
commit33e1f9a1d5d9f7377a2a386d96b252d9d0e71d32 (patch)
tree6f8046a2d2934e5bd01e9d2a5bac3f47528eec77 /net-proxy
parentdev-python/pyro: Stabilize 4.80 ALLARCHES, #731514 (diff)
downloadgentoo-33e1f9a1d5d9f7377a2a386d96b252d9d0e71d32.tar.gz
gentoo-33e1f9a1d5d9f7377a2a386d96b252d9d0e71d32.tar.bz2
gentoo-33e1f9a1d5d9f7377a2a386d96b252d9d0e71d32.zip
net-proxy/trojan: version bump, 1.16.0
Package-Manager: Portage-2.3.100, Repoman-2.3.22 Signed-off-by: Yixun Lan <dlan@gentoo.org>
Diffstat (limited to 'net-proxy')
-rw-r--r--net-proxy/trojan/Manifest1
-rw-r--r--net-proxy/trojan/trojan-1.16.0.ebuild61
2 files changed, 62 insertions, 0 deletions
diff --git a/net-proxy/trojan/Manifest b/net-proxy/trojan/Manifest
index 68ef8ddb4025..493d1564747a 100644
--- a/net-proxy/trojan/Manifest
+++ b/net-proxy/trojan/Manifest
@@ -1 +1,2 @@
DIST trojan-1.15.1.tar.gz 48121 BLAKE2B 38f288d8b9a6c7a98ada85b6b2dd2448604f54068334380c2e6b49d6ee015a1fad2847747734ef1e670d201d9625e64859ccddde5b924ea09c4e87e206997431 SHA512 5e0dfb46116b9de54f5d4e6d0646ab5ba3746143c5ad0f275c894929ba7fc840cacb187e514bbfaa770f0651fc4d3ff9e662f648f515a972ddf72ad0e93d616f
+DIST trojan-1.16.0.tar.gz 51669 BLAKE2B 9238f9886820ca3625a894ac8de1e199e238029593634436f3aa529d5c576f2636d5183b64a2e6155a888fe8f45629c94625f02119fbfb4ada01b1bd9e502fcf SHA512 60aa8539731eee6f15cbcb18b20b45435fc2dfe439a2f67fe9770257c3b6ffe219efe376cfd909f748d523a18645c96f6859b8487cacaba04ac7d93cf762f153
diff --git a/net-proxy/trojan/trojan-1.16.0.ebuild b/net-proxy/trojan/trojan-1.16.0.ebuild
new file mode 100644
index 000000000000..21f494f1364d
--- /dev/null
+++ b/net-proxy/trojan/trojan-1.16.0.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python{3_6,3_7} )
+
+inherit cmake python-any-r1 systemd
+
+DESCRIPTION="An unidentifiable mechanism that helps you bypass GFW"
+HOMEPAGE="https://github.com/trojan-gfw/trojan"
+SRC_URI="https://github.com/trojan-gfw/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+IUSE="mysql test"
+
+# Some hiccups setting up local network server.
+RESTRICT="test"
+
+RDEPEND="
+ >=dev-libs/boost-1.66.0:=
+ dev-libs/openssl:0=
+ mysql? ( dev-db/mysql-connector-c:= )
+"
+DEPEND="${RDEPEND}
+ test? ( net-misc/curl ${PYTHON_DEPS} )
+"
+
+src_configure() {
+ local mycmakeargs=(
+ -DENABLE_MYSQL=$(usex mysql)
+ -DSYSTEMD_SERVICE=ON
+ -DSYSTEMD_SERVICE_PATH=$(systemd_get_systemunitdir)
+ )
+ cmake_src_configure
+}
+
+src_install() {
+ cmake_src_install
+ newinitd "${FILESDIR}/trojan.initd" trojan
+}
+
+src_test() {
+ cmake_src_test -j1
+}
+
+pkg_postinst() {
+ elog "Running Trojan with multi instances"
+ elog ""
+
+ elog "Prepare /etc/trojan/\${blah}.json first"
+ elog "Config with Openrc"
+ elog " ln -s /etc/init.d/trojan{,.\${blah}}"
+ elog " rc-update add trojan.\${blah} default"
+ elog ""
+ elog "Config with Systemd"
+ elog " systemctl enable trojan.\${blah}"
+ elog ""
+}