From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- net-vpn/i2pd/Manifest | 14 +++ net-vpn/i2pd/files/99i2pd | 1 + .../i2pd-2.14.0-fix_installed_components.patch | 31 +++++++ .../i2pd-2.5.1-fix_installed_components.patch | 30 +++++++ net-vpn/i2pd/files/i2pd-2.6.0-r3.confd | 12 +++ net-vpn/i2pd/files/i2pd-2.6.0-r3.initd | 45 ++++++++++ net-vpn/i2pd/files/i2pd-2.6.0-r3.logrotate | 11 +++ net-vpn/i2pd/files/i2pd-2.6.0-r3.service | 21 +++++ net-vpn/i2pd/i2pd-2.13.0.ebuild | 98 ++++++++++++++++++++ net-vpn/i2pd/i2pd-2.14.0.ebuild | 98 ++++++++++++++++++++ net-vpn/i2pd/i2pd-2.15.0.ebuild | 100 +++++++++++++++++++++ net-vpn/i2pd/metadata.xml | 31 +++++++ 12 files changed, 492 insertions(+) create mode 100644 net-vpn/i2pd/Manifest create mode 100644 net-vpn/i2pd/files/99i2pd create mode 100644 net-vpn/i2pd/files/i2pd-2.14.0-fix_installed_components.patch create mode 100644 net-vpn/i2pd/files/i2pd-2.5.1-fix_installed_components.patch create mode 100644 net-vpn/i2pd/files/i2pd-2.6.0-r3.confd create mode 100644 net-vpn/i2pd/files/i2pd-2.6.0-r3.initd create mode 100644 net-vpn/i2pd/files/i2pd-2.6.0-r3.logrotate create mode 100644 net-vpn/i2pd/files/i2pd-2.6.0-r3.service create mode 100644 net-vpn/i2pd/i2pd-2.13.0.ebuild create mode 100644 net-vpn/i2pd/i2pd-2.14.0.ebuild create mode 100644 net-vpn/i2pd/i2pd-2.15.0.ebuild create mode 100644 net-vpn/i2pd/metadata.xml (limited to 'net-vpn/i2pd') diff --git a/net-vpn/i2pd/Manifest b/net-vpn/i2pd/Manifest new file mode 100644 index 000000000000..45f03974f682 --- /dev/null +++ b/net-vpn/i2pd/Manifest @@ -0,0 +1,14 @@ +AUX 99i2pd 44 SHA256 ecc85329d663182165bf6b5f672237a9f4f129f39f168d38c876345f3b83d765 SHA512 0bd08ff5b1b2ad8d91572efee848a760e2fb46d9c1a5ead3fbdde91d679d832d985905952b393eb523ec9d8f1815bf1512ae61fbc059d10f0773991ac097c23f WHIRLPOOL 08404eab764fa25ae0f5cbda5fa38deabcae913baf3e0d4e151ae34a0fb3383994d0ab4db15e60827a3fc18ebaf4e4f541163cc3825b3baf3c75533a08d4c94e +AUX i2pd-2.14.0-fix_installed_components.patch 1033 SHA256 ca441afc8782660a4638eb7dc730304dc78a8255411b5a24e87f6ec2073158db SHA512 b4d91487657d1d0b89b8a43eb962e7f87dfb56fdb40fd7e10f4818d1d87cd814833f72c823e808756545c580517b7ce8bf1e11e55d15addd84abc343587f9d66 WHIRLPOOL 8a6c3b5f65dc643da08a0cfe7fb3b990f66c706399c932a6a8aae9d5030ccccec8ba36361e565ef0926a09542ed1a0776a5f8a73d195d6458c8900c370b583ff +AUX i2pd-2.5.1-fix_installed_components.patch 930 SHA256 82ca45cb7a9836bafabd1c9a36b45e6ac4f0f7d36ebeeb53ed7ee9acca1d8c89 SHA512 974fa4ab13b55cb6d88eb87c94ebf883531c1b0ea87defda350088e917e5ba293c00c3aff17fe6714cbb7fd1179561b4f0c63ccd584ca93ad3d2c64f6f04069b WHIRLPOOL 78fc32e19a83df48ad8a0726a42bbbd2402d82e7d9370eb4dc2eb3907678ee8ba547dd0ec5512ed966136d76e8f01b56ef211c75402c0949f0f7ed2d81fff109 +AUX i2pd-2.6.0-r3.confd 322 SHA256 7418efe4fa996231485039c9c23244f892d6fdf51e9c9941e64459e42d779e35 SHA512 083f4c860d7556bd14f2765b098743c25f996ef16de3982430ff27ac7711051738d48709654441099ea8c755b6d9a6e25b52286f7e8c928d3f39f1207a9517a9 WHIRLPOOL 910beb68c933e0ad180b2c40a675871c345322bb8902566a4ea0eb1d983b8c8a86e1ebd53af8b47a1060bc176678cf172b43356cec8f96b544ca02402bc47007 +AUX i2pd-2.6.0-r3.initd 1386 SHA256 65df95b69c72d4ea37bea3465aab8cdc3ee814ce756bd0a1eeeb85a7c54cbd2f SHA512 8c894dc2c0dcc5318fe9551d2b314412509542f4b7784966ae69744eca8f9ccd3650ccb63321de67cf2b9dfe456295866e3d05d54e718e0e9c0c22ecfd5c2f5e WHIRLPOOL 6aec2b9351455d8081b857d7b9e31a66bbc7468b2bff56a94a209fa3f26744882f9f52027ab860a1080e8ee020551db29608f8447a495b445b21696b50bcb505 +AUX i2pd-2.6.0-r3.logrotate 215 SHA256 1e0a53c5d6997513c02a3530e5bbec2c866b5afbc0f7861943d7ea79c30f8e33 SHA512 e6080b719cb1616a96b4e4e9ff7074881f88dc699147fd5a201861c5836cf4807a00767a2c370f36e847b0d4ddb2129d8c3c3fc8043325fb8f3d0bc27feca2a3 WHIRLPOOL a52c160d313c9c66c48f9bbe6c7c91e08202b92bd708d7fca043bfb48e1089638a11e942836aa0ae8718b714315ce6aaa8e2c87523ebe6c937614b0dec84de22 +AUX i2pd-2.6.0-r3.service 638 SHA256 4281eeb7a174798d2dc419fe52f3e0c84053802e540e362d7601f609aff4bc8e SHA512 8e35123ea30325e9f1de3d488d96a35b6e983e006084e983ab116aa5febd64feacb7643f3d9c3c7c7865375518e1acef060b4b02e9b052036f8d42f9dcc47a87 WHIRLPOOL e3c4d0148527a0764a260d97f295d98a6fbd20d08ff2fdaef3e38e359a8a3233ba7989986031f1554f2f7c5c7fe350769bf5cf4dcd0a77c03d5d2329ca11d685 +DIST i2pd-2.13.0.tar.gz 3131893 SHA256 9fbf9750503dd565ba5b31b16e1de959bda59530f088d40b14618d3ef238b065 SHA512 146e68559f44bcc8447857a0deb8be4a59d1b8032826af368355f9e9309b619a3575f99fed2b45071784c728a2265cb6446e816baf797b71aeffa09d1cbdd004 WHIRLPOOL 62b65f1b0cd8f9bf04bbaae61604e664f1b7f6f8eea30b9b41227659f6237e2739d3943ad91852462b229b0b4a718213b96aed63758680af135598224ca2d50f +DIST i2pd-2.14.0.tar.gz 1906272 SHA256 3cb5751d9584449721e2f3ae878411b652863fa7093994f1d8cce1fd3b40bf71 SHA512 39e6cc0ed0456b93c9a7462e5630d7be87c3dda91887bef7aec50b404212f1cef02b94488ded1918eaf4264d9be5da767dab4652cf2b8470fadfa89886e42e7b WHIRLPOOL fcfb403889f33a0cce4ed9d9508b59c5deeade85230aec4929b0ee3a00ec57d9c3bf9644e13796e158bd1cd893f69b0cb9f86dba25543e0348ed743188dd3d2c +DIST i2pd-2.15.0.tar.gz 1834673 SHA256 87649a1963b1d1b8f9424c0bccbdf6bbde0bb87db8dcf0b5c61f4c7f13181b86 SHA512 78f3b14ef7c4896528c6bd54adfcd251f3a94a0e9315924e8a9b58e3e6d0cc2c9334026d2faa9bff9da5dd3c4195e84473161ed7911c5e0155a79f456033f077 WHIRLPOOL 69c69fde4db194ee8a932a955b7e8088370a39782e96db9e730efabf4cf904b9a01ada732ce043064b8e950b1b9e995909da31889ebdb9a141d6a9e1a366d2a0 +EBUILD i2pd-2.13.0.ebuild 2712 SHA256 819410a3c4f13370a3e310b93694d89b64d8adf0964b2d9bc48108682527ef87 SHA512 527249a7351584a7c3b050a77a08f8d40f7cd48e3dd0f3cee880f5380c16d9fbe1751c7d5e84fd41ec79a3639d8d2688f63b5ce53a41d96f8a1a6eeae35366f5 WHIRLPOOL f5db35bf36d59256fac6244f58ba1a6c52b8947bc0a8220e6fa32efc714e4ebd41d03b777616a47677d8e5f4c5dd4ca033d4708a7f09020564cde0caa99bf22c +EBUILD i2pd-2.14.0.ebuild 2713 SHA256 67b89965e81cefba6658e62cef21299c9485ad44454805bbfcf125ea9c546873 SHA512 6dab357df919d88107ebf0490e4fd7f3f0986ad6a26b452a25e4e8f7f85c5c17da8f48262a02ba6f09cc31f9fde7e09b27f01353d2de3c9093439ff2a7bbc04d WHIRLPOOL bc62172d52fd6eecd10c20f2d9b8c8c4df7653c49b7d262d30547d619c387b4cf551213eab5197a9114ffd54896672732e9f2978fcc2a01f7fd0ffd1c340c7f0 +EBUILD i2pd-2.15.0.ebuild 2787 SHA256 8cc1a39d1d88e1362f4d718b7aa8e4f439e6161107a41755b8704eb90e964a12 SHA512 f90d7fa0780b31e923e37daf0b453a80277d532c61cdeff3970be0d2c148715ddc707673ae66ef0691c6d574fb6e0d04a56a751956bbc8156f48a08aa368f8cf WHIRLPOOL 67e94951cac39a5b9ad5b5fc55f53c4f1edc46093bf73dc398c362ee534ee3db7216708be729a037eaf5233156b130cb599aaffa33a26ef79342486eb39c877f +MISC metadata.xml 878 SHA256 bdbbcda7e96f504a10142047e6ff580a2d3a67aafac8d69a18402d0c001668dd SHA512 9aa7d6f8b88b8432c0e2b4df77292471fb6254622031fead20ea0c8eee0dfcf0bd9bda19a309d6526c30d412c45093dd2e9898c9a8270e6ada3f723dbb665c76 WHIRLPOOL e1431581efe813cf99cafe0307980da74236c39d8bfeac82f9c55dd752b9aacd2cee3db0885114d7676167f5fa36d7ba2ce4811137fd6b41a096a84eabdad3b8 diff --git a/net-vpn/i2pd/files/99i2pd b/net-vpn/i2pd/files/99i2pd new file mode 100644 index 000000000000..3cf3b46797c4 --- /dev/null +++ b/net-vpn/i2pd/files/99i2pd @@ -0,0 +1 @@ +CONFIG_PROTECT="/var/lib/i2pd/certificates" diff --git a/net-vpn/i2pd/files/i2pd-2.14.0-fix_installed_components.patch b/net-vpn/i2pd/files/i2pd-2.14.0-fix_installed_components.patch new file mode 100644 index 000000000000..fe7bdcc4083f --- /dev/null +++ b/net-vpn/i2pd/files/i2pd-2.14.0-fix_installed_components.patch @@ -0,0 +1,31 @@ +--- a/build/CMakeLists.txt ++++ b/build/CMakeLists.txt +@@ -455,20 +455,7 @@ if (WITH_BINARY) + endif () + endif () + +-install(FILES ../LICENSE +- DESTINATION . +- COMPONENT Runtime +- ) +-# Take a copy on Appveyor +-install(FILES "C:/projects/openssl-$ENV{OPENSSL}/LICENSE" +- DESTINATION . +- COMPONENT Runtime +- RENAME LICENSE_OPENSSL +- OPTIONAL # for local builds only! +- ) +- + file(GLOB_RECURSE I2PD_SOURCES "../libi2pd/*.cpp" "../libi2pd_client/*.cpp" "../daemon/*.cpp" "../build" "../Win32" "../Makefile*") +-install(FILES ${I2PD_SOURCES} DESTINATION src/ COMPONENT Source) + # install(DIRECTORY ../ DESTINATION src/ + # # OPTIONAL + # COMPONENT Source FILES_MATCHING +@@ -477,7 +464,6 @@ install(FILES ${I2PD_SOURCES} DESTINATION src/ COMPONENT Source) + # ) + + file(GLOB I2PD_HEADERS "../libi2pd/*.h" "../libi2pd_client/*.h" "../daemon/*.h") +-install(FILES ${I2PD_HEADERS} DESTINATION src/ COMPONENT Headers) + # install(DIRECTORY ../ DESTINATION src/ + # # OPTIONAL + # COMPONENT Headers FILES_MATCHING diff --git a/net-vpn/i2pd/files/i2pd-2.5.1-fix_installed_components.patch b/net-vpn/i2pd/files/i2pd-2.5.1-fix_installed_components.patch new file mode 100644 index 000000000000..0416901117c5 --- /dev/null +++ b/net-vpn/i2pd/files/i2pd-2.5.1-fix_installed_components.patch @@ -0,0 +1,30 @@ +--- a/build/CMakeLists.txt.old 2016-02-04 21:30:50.954251000 +0100 ++++ b/build/CMakeLists.txt 2016-02-04 21:34:50.457793484 +0100 +@@ -356,10 +356,6 @@ + endif () + endif () + +-install(FILES ../LICENSE +- DESTINATION . +- COMPONENT Runtime +- ) + # Take a copy on Appveyor + install(FILES "C:/projects/openssl-$ENV{OPENSSL}/LICENSE" + DESTINATION . +@@ -369,7 +365,6 @@ + ) + + file(GLOB_RECURSE I2PD_SOURCES "../*.cpp" "../build" "../Win32" "../Makefile*") +-install(FILES ${I2PD_SOURCES} DESTINATION src/ COMPONENT Source) + # install(DIRECTORY ../ DESTINATION src/ + # # OPTIONAL + # COMPONENT Source FILES_MATCHING +@@ -378,7 +373,7 @@ + # ) + + file(GLOB I2PD_HEADERS "../*.h") +-install(FILES ${I2PD_HEADERS} DESTINATION src/ COMPONENT Headers) ++install(FILES ${I2PD_HEADERS} DESTINATION "include/${PROJECT_NAME}" COMPONENT Headers) + # install(DIRECTORY ../ DESTINATION src/ + # # OPTIONAL + # COMPONENT Headers FILES_MATCHING diff --git a/net-vpn/i2pd/files/i2pd-2.6.0-r3.confd b/net-vpn/i2pd/files/i2pd-2.6.0-r3.confd new file mode 100644 index 000000000000..d2ef16b0f61c --- /dev/null +++ b/net-vpn/i2pd/files/i2pd-2.6.0-r3.confd @@ -0,0 +1,12 @@ +I2PD_USER=i2pd +I2PD_GROUP=i2pd +I2PD_LOG=/var/log/i2pd.log +I2PD_PID=/run/i2pd/i2pd.pid + +# max number of open files (for floodfill) +rc_ulimit="-n 4096" + +# Options to i2pd +I2PD_OPTIONS="--daemon --service --pidfile=${I2PD_PID} \ +--log=file --logfile=${I2PD_LOG} \ +--conf=/etc/i2pd/i2pd.conf --tunconf=/etc/i2pd/tunnels.conf" diff --git a/net-vpn/i2pd/files/i2pd-2.6.0-r3.initd b/net-vpn/i2pd/files/i2pd-2.6.0-r3.initd new file mode 100644 index 000000000000..09c83927b206 --- /dev/null +++ b/net-vpn/i2pd/files/i2pd-2.6.0-r3.initd @@ -0,0 +1,45 @@ +#!/sbin/openrc-run +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +description="C++ daemon for accessing the I2P network" +description_graceful="Graceful shutdown, takes 10 minutes" + +command="/usr/bin/i2pd" +command_args="${I2PD_OPTIONS}" +user="${I2PD_USER}:${I2PD_GROUP}" +start_stop_daemon_args=" + --user \"${user}\" + --pidfile \"${I2PD_PID}\" + --progress --retry 'SIGTERM/20/SIGKILL/20' +" +I2PD_PID_DIR=$(dirname "${I2PD_PID}") + +extra_started_commands="graceful" + +depend() { + use dns logger netmount +} + +start_pre() { + if [ -z "${I2PD_USER}" ] || \ + [ -z "${I2PD_GROUP}" ] || \ + [ -z "${I2PD_PID}" ] || \ + [ -z "${I2PD_LOG}" ] || \ + [ -z "${I2PD_OPTIONS}" ] ; then + eerror "Not all variables I2PD_USER, I2PD_GROUP, I2PD_PID, I2PD_OPTIONS, I2PD_LOG are defined." + eerror "Check your /etc/conf.d/i2pd." + return 1 + fi + checkpath -f -o "${user}" "${I2PD_LOG}" + checkpath -d -m 0750 -o "${user}" "${I2PD_PID_DIR}" +} + +graceful() { + # on SIGINT, i2pd stops accepting tunnels and shuts down in 600 seconds + ebegin "Gracefully stopping i2pd, this takes 10 minutes" + mark_service_stopping + eval start-stop-daemon --stop ${start_stop_daemon_args} \ + --exec "${command}" --retry 'SIGINT/620/SIGTERM/20/SIGKILL/20' + eend $? && mark_service_stopped +} diff --git a/net-vpn/i2pd/files/i2pd-2.6.0-r3.logrotate b/net-vpn/i2pd/files/i2pd-2.6.0-r3.logrotate new file mode 100644 index 000000000000..251128b7be78 --- /dev/null +++ b/net-vpn/i2pd/files/i2pd-2.6.0-r3.logrotate @@ -0,0 +1,11 @@ +/var/log/i2pd.log { + rotate 4 + weekly + missingok + notifempty + create 640 i2pd i2pd + postrotate + /bin/kill -HUP $(cat /run/i2pd/i2pd.pid) + endscript +} + diff --git a/net-vpn/i2pd/files/i2pd-2.6.0-r3.service b/net-vpn/i2pd/files/i2pd-2.6.0-r3.service new file mode 100644 index 000000000000..6821a00552df --- /dev/null +++ b/net-vpn/i2pd/files/i2pd-2.6.0-r3.service @@ -0,0 +1,21 @@ +[Unit] +Description=C++ daemon for accessing the I2P network +After=network.target + +[Service] +Type=forking +Restart=on-abnormal +PIDFile=/run/i2pd/i2pd.pid +User=i2pd +Group=i2pd +LimitNOFILE=4096 +PermissionsStartOnly=yes +ExecStartPre=/bin/mkdir -p /run/i2pd +ExecStartPre=/bin/chown i2pd:i2pd /run/i2pd +ExecStartPre=/bin/touch /run/i2pd/i2pd.pid /var/log/i2pd.log +ExecStartPre=/bin/chown i2pd:i2pd /run/i2pd/i2pd.pid /var/log/i2pd.log +ExecStart=/usr/bin/i2pd --daemon --service --pidfile=/run/i2pd/i2pd.pid --log=file --logfile=/var/log/i2pd.log --conf=/etc/i2pd/i2pd.conf --tunconf=/etc/i2pd/tunnels.conf + +[Install] +WantedBy=multi-user.target + diff --git a/net-vpn/i2pd/i2pd-2.13.0.ebuild b/net-vpn/i2pd/i2pd-2.13.0.ebuild new file mode 100644 index 000000000000..d4c839774f70 --- /dev/null +++ b/net-vpn/i2pd/i2pd-2.13.0.ebuild @@ -0,0 +1,98 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit eutils systemd user cmake-utils + +DESCRIPTION="A C++ daemon for accessing the I2P anonymous network" +HOMEPAGE="https://github.com/PurpleI2P/i2pd" +SRC_URI="https://github.com/PurpleI2P/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~arm ~x86" +IUSE="cpu_flags_x86_aes i2p-hardening libressl pch static +upnp" + +RDEPEND="!static? ( >=dev-libs/boost-1.49[threads] + !libressl? ( dev-libs/openssl:0[-bindist] ) + libressl? ( dev-libs/libressl ) + upnp? ( net-libs/miniupnpc ) + )" +DEPEND="${RDEPEND} + static? ( >=dev-libs/boost-1.49[static-libs,threads] + !libressl? ( dev-libs/openssl:0[static-libs] ) + libressl? ( dev-libs/libressl[static-libs] ) + upnp? ( net-libs/miniupnpc[static-libs] ) ) + i2p-hardening? ( >=sys-devel/gcc-4.7 ) + || ( >=sys-devel/gcc-4.7 >=sys-devel/clang-3.3 )" + +I2PD_USER=i2pd +I2PD_GROUP=i2pd + +CMAKE_USE_DIR="${S}/build" + +DOCS=( README.md contrib/i2pd.conf contrib/tunnels.conf ) + +PATCHES=( "${FILESDIR}/${PN}-2.5.1-fix_installed_components.patch" ) + +src_configure() { + mycmakeargs=( + -DWITH_AESNI=$(usex cpu_flags_x86_aes ON OFF) + -DWITH_HARDENING=$(usex i2p-hardening ON OFF) + -DWITH_PCH=$(usex pch ON OFF) + -DWITH_STATIC=$(usex static ON OFF) + -DWITH_UPNP=$(usex upnp ON OFF) + -DWITH_LIBRARY=ON + -DWITH_BINARY=ON + ) + cmake-utils_src_configure +} + +src_install() { + cmake-utils_src_install + + # config + insinto /etc/i2pd + doins contrib/i2pd.conf + doins contrib/tunnels.conf + + # grant i2pd group read and write access to config files + fowners "root:${I2PD_GROUP}" \ + /etc/i2pd/i2pd.conf \ + /etc/i2pd/tunnels.conf + fperms 660 \ + /etc/i2pd/i2pd.conf \ + /etc/i2pd/tunnels.conf + + # working directory + keepdir /var/lib/i2pd + insinto /var/lib/i2pd + doins -r contrib/certificates + fowners "${I2PD_USER}:${I2PD_GROUP}" /var/lib/i2pd/ + fperms 700 /var/lib/i2pd/ + + # add /var/lib/i2pd/certificates to CONFIG_PROTECT + doenvd "${FILESDIR}/99i2pd" + + # openrc and systemd daemon routines + newconfd "${FILESDIR}/i2pd-2.6.0-r3.confd" i2pd + newinitd "${FILESDIR}/i2pd-2.6.0-r3.initd" i2pd + systemd_newunit "${FILESDIR}/i2pd-2.6.0-r3.service" i2pd.service + + # logrotate + insinto /etc/logrotate.d + newins "${FILESDIR}/i2pd-2.6.0-r3.logrotate" i2pd +} + +pkg_setup() { + enewgroup "${I2PD_GROUP}" + enewuser "${I2PD_USER}" -1 -1 /var/lib/run/i2pd "${I2PD_GROUP}" +} + +pkg_postinst() { + if [[ -f ${EROOT%/}/etc/i2pd/subscriptions.txt ]]; then + ewarn + ewarn "Configuration of the subscriptions has been moved from" + ewarn "subscriptions.txt to i2pd.conf. We recommend updating" + ewarn "i2pd.conf accordingly and deleting subscriptions.txt." + fi +} diff --git a/net-vpn/i2pd/i2pd-2.14.0.ebuild b/net-vpn/i2pd/i2pd-2.14.0.ebuild new file mode 100644 index 000000000000..752102811a0f --- /dev/null +++ b/net-vpn/i2pd/i2pd-2.14.0.ebuild @@ -0,0 +1,98 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit eutils systemd user cmake-utils + +DESCRIPTION="A C++ daemon for accessing the I2P anonymous network" +HOMEPAGE="https://github.com/PurpleI2P/i2pd" +SRC_URI="https://github.com/PurpleI2P/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~arm ~x86" +IUSE="cpu_flags_x86_aes i2p-hardening libressl pch static +upnp" + +RDEPEND="!static? ( >=dev-libs/boost-1.49[threads] + !libressl? ( dev-libs/openssl:0[-bindist] ) + libressl? ( dev-libs/libressl ) + upnp? ( net-libs/miniupnpc ) + )" +DEPEND="${RDEPEND} + static? ( >=dev-libs/boost-1.49[static-libs,threads] + !libressl? ( dev-libs/openssl:0[static-libs] ) + libressl? ( dev-libs/libressl[static-libs] ) + upnp? ( net-libs/miniupnpc[static-libs] ) ) + i2p-hardening? ( >=sys-devel/gcc-4.7 ) + || ( >=sys-devel/gcc-4.7 >=sys-devel/clang-3.3 )" + +I2PD_USER=i2pd +I2PD_GROUP=i2pd + +CMAKE_USE_DIR="${S}/build" + +DOCS=( README.md contrib/i2pd.conf contrib/tunnels.conf ) + +PATCHES=( "${FILESDIR}/${PN}-2.14.0-fix_installed_components.patch" ) + +src_configure() { + mycmakeargs=( + -DWITH_AESNI=$(usex cpu_flags_x86_aes ON OFF) + -DWITH_HARDENING=$(usex i2p-hardening ON OFF) + -DWITH_PCH=$(usex pch ON OFF) + -DWITH_STATIC=$(usex static ON OFF) + -DWITH_UPNP=$(usex upnp ON OFF) + -DWITH_LIBRARY=ON + -DWITH_BINARY=ON + ) + cmake-utils_src_configure +} + +src_install() { + cmake-utils_src_install + + # config + insinto /etc/i2pd + doins contrib/i2pd.conf + doins contrib/tunnels.conf + + # grant i2pd group read and write access to config files + fowners "root:${I2PD_GROUP}" \ + /etc/i2pd/i2pd.conf \ + /etc/i2pd/tunnels.conf + fperms 660 \ + /etc/i2pd/i2pd.conf \ + /etc/i2pd/tunnels.conf + + # working directory + keepdir /var/lib/i2pd + insinto /var/lib/i2pd + doins -r contrib/certificates + fowners "${I2PD_USER}:${I2PD_GROUP}" /var/lib/i2pd/ + fperms 700 /var/lib/i2pd/ + + # add /var/lib/i2pd/certificates to CONFIG_PROTECT + doenvd "${FILESDIR}/99i2pd" + + # openrc and systemd daemon routines + newconfd "${FILESDIR}/i2pd-2.6.0-r3.confd" i2pd + newinitd "${FILESDIR}/i2pd-2.6.0-r3.initd" i2pd + systemd_newunit "${FILESDIR}/i2pd-2.6.0-r3.service" i2pd.service + + # logrotate + insinto /etc/logrotate.d + newins "${FILESDIR}/i2pd-2.6.0-r3.logrotate" i2pd +} + +pkg_setup() { + enewgroup "${I2PD_GROUP}" + enewuser "${I2PD_USER}" -1 -1 /var/lib/run/i2pd "${I2PD_GROUP}" +} + +pkg_postinst() { + if [[ -f ${EROOT%/}/etc/i2pd/subscriptions.txt ]]; then + ewarn + ewarn "Configuration of the subscriptions has been moved from" + ewarn "subscriptions.txt to i2pd.conf. We recommend updating" + ewarn "i2pd.conf accordingly and deleting subscriptions.txt." + fi +} diff --git a/net-vpn/i2pd/i2pd-2.15.0.ebuild b/net-vpn/i2pd/i2pd-2.15.0.ebuild new file mode 100644 index 000000000000..4dbcc37bd004 --- /dev/null +++ b/net-vpn/i2pd/i2pd-2.15.0.ebuild @@ -0,0 +1,100 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit eutils systemd user cmake-utils + +DESCRIPTION="A C++ daemon for accessing the I2P anonymous network" +HOMEPAGE="https://github.com/PurpleI2P/i2pd" +SRC_URI="https://github.com/PurpleI2P/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~arm ~x86" +IUSE="cpu_flags_x86_aes i2p-hardening libressl static +upnp websocket" + +RDEPEND="!static? ( >=dev-libs/boost-1.49[threads] + !libressl? ( dev-libs/openssl:0[-bindist] ) + libressl? ( dev-libs/libressl ) + upnp? ( net-libs/miniupnpc ) + websocket? ( dev-cpp/websocketpp ) + )" +DEPEND="${RDEPEND} + static? ( >=dev-libs/boost-1.49[static-libs,threads] + !libressl? ( dev-libs/openssl:0[static-libs] ) + libressl? ( dev-libs/libressl[static-libs] ) + upnp? ( net-libs/miniupnpc[static-libs] ) ) + i2p-hardening? ( >=sys-devel/gcc-4.7 ) + || ( >=sys-devel/gcc-4.7 >=sys-devel/clang-3.3 )" + +I2PD_USER=i2pd +I2PD_GROUP=i2pd + +CMAKE_USE_DIR="${S}/build" + +DOCS=( README.md contrib/i2pd.conf contrib/tunnels.conf ) + +PATCHES=( "${FILESDIR}/${PN}-2.14.0-fix_installed_components.patch" ) + +src_configure() { + mycmakeargs=( + -DWITH_AESNI=$(usex cpu_flags_x86_aes ON OFF) + -DWITH_HARDENING=$(usex i2p-hardening ON OFF) + -DWITH_PCH=OFF + -DWITH_STATIC=$(usex static ON OFF) + -DWITH_UPNP=$(usex upnp ON OFF) + -DWITH_WEBSOCKETS=$(usex websocket ON OFF) + -DWITH_LIBRARY=ON + -DWITH_BINARY=ON + ) + cmake-utils_src_configure +} + +src_install() { + cmake-utils_src_install + + # config + insinto /etc/i2pd + doins contrib/i2pd.conf + doins contrib/tunnels.conf + + # grant i2pd group read and write access to config files + fowners "root:${I2PD_GROUP}" \ + /etc/i2pd/i2pd.conf \ + /etc/i2pd/tunnels.conf + fperms 660 \ + /etc/i2pd/i2pd.conf \ + /etc/i2pd/tunnels.conf + + # working directory + keepdir /var/lib/i2pd + insinto /var/lib/i2pd + doins -r contrib/certificates + fowners "${I2PD_USER}:${I2PD_GROUP}" /var/lib/i2pd/ + fperms 700 /var/lib/i2pd/ + + # add /var/lib/i2pd/certificates to CONFIG_PROTECT + doenvd "${FILESDIR}/99i2pd" + + # openrc and systemd daemon routines + newconfd "${FILESDIR}/i2pd-2.6.0-r3.confd" i2pd + newinitd "${FILESDIR}/i2pd-2.6.0-r3.initd" i2pd + systemd_newunit "${FILESDIR}/i2pd-2.6.0-r3.service" i2pd.service + + # logrotate + insinto /etc/logrotate.d + newins "${FILESDIR}/i2pd-2.6.0-r3.logrotate" i2pd +} + +pkg_setup() { + enewgroup "${I2PD_GROUP}" + enewuser "${I2PD_USER}" -1 -1 /var/lib/run/i2pd "${I2PD_GROUP}" +} + +pkg_postinst() { + if [[ -f ${EROOT%/}/etc/i2pd/subscriptions.txt ]]; then + ewarn + ewarn "Configuration of the subscriptions has been moved from" + ewarn "subscriptions.txt to i2pd.conf. We recommend updating" + ewarn "i2pd.conf accordingly and deleting subscriptions.txt." + fi +} diff --git a/net-vpn/i2pd/metadata.xml b/net-vpn/i2pd/metadata.xml new file mode 100644 index 000000000000..3c324dceacc1 --- /dev/null +++ b/net-vpn/i2pd/metadata.xml @@ -0,0 +1,31 @@ + + + + + kaikaikai@yandex.ru + Alexey Korepanov + + + klondike@gentoo.org + Francisco Blas Izquierdo Riera + + + blueness@gentoo.org + Anthony G. Basile + + + tomboy64@sina.cn + Proxy maintainer. Please subscribe to bugs. + + + + Compile with hardening on vanilla compilers/linkers + + + Enable websocket server + + + + PurpleI2P/i2pd + + -- cgit v1.2.3