From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 6448F138359 for ; Thu, 9 Jul 2020 14:15:47 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 85431E0891; Thu, 9 Jul 2020 14:15:46 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 6A4D0E0891 for ; Thu, 9 Jul 2020 14:15:46 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id ED80F34F893 for ; Thu, 9 Jul 2020 14:15:44 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 559092C4 for ; Thu, 9 Jul 2020 14:15:42 +0000 (UTC) From: "Yixun Lan" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Yixun Lan" Message-ID: <1594303700.33e1f9a1d5d9f7377a2a386d96b252d9d0e71d32.dlan@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-proxy/trojan/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-proxy/trojan/Manifest net-proxy/trojan/trojan-1.16.0.ebuild X-VCS-Directories: net-proxy/trojan/ X-VCS-Committer: dlan X-VCS-Committer-Name: Yixun Lan X-VCS-Revision: 33e1f9a1d5d9f7377a2a386d96b252d9d0e71d32 X-VCS-Branch: master Date: Thu, 9 Jul 2020 14:15:42 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: fa633cda-768d-4d3d-a4b7-9526ddcc226f X-Archives-Hash: 8b3b76f9806bd3e493f7ea05c5229676 commit: 33e1f9a1d5d9f7377a2a386d96b252d9d0e71d32 Author: Yixun Lan gentoo org> AuthorDate: Thu Jul 9 14:07:55 2020 +0000 Commit: Yixun Lan gentoo org> CommitDate: Thu Jul 9 14:08:20 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=33e1f9a1 net-proxy/trojan: version bump, 1.16.0 Package-Manager: Portage-2.3.100, Repoman-2.3.22 Signed-off-by: Yixun Lan gentoo.org> net-proxy/trojan/Manifest | 1 + net-proxy/trojan/trojan-1.16.0.ebuild | 61 +++++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+) diff --git a/net-proxy/trojan/Manifest b/net-proxy/trojan/Manifest index 68ef8ddb402..493d1564747 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 00000000000..21f494f1364 --- /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 "" +}