summaryrefslogtreecommitdiff
path: root/net-p2p/transmission
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /net-p2p/transmission
reinit the tree, so we can have metadata
Diffstat (limited to 'net-p2p/transmission')
-rw-r--r--net-p2p/transmission/Manifest11
-rw-r--r--net-p2p/transmission/files/libsystemd.patch11
-rw-r--r--net-p2p/transmission/files/transmission-2.92-handshake.patch33
-rw-r--r--net-p2p/transmission/files/transmission-daemon.confd.415
-rw-r--r--net-p2p/transmission/files/transmission-daemon.initd.1049
-rw-r--r--net-p2p/transmission/files/transmission-daemon.service.conf2
-rw-r--r--net-p2p/transmission/metadata.xml13
-rw-r--r--net-p2p/transmission/transmission-2.92-r2.ebuild164
-rw-r--r--net-p2p/transmission/transmission-9999.ebuild151
9 files changed, 449 insertions, 0 deletions
diff --git a/net-p2p/transmission/Manifest b/net-p2p/transmission/Manifest
new file mode 100644
index 000000000000..05803818894b
--- /dev/null
+++ b/net-p2p/transmission/Manifest
@@ -0,0 +1,11 @@
+AUX libsystemd.patch 630 SHA256 ba963aa93c988934e9d3e90b21d1184033a0fb55cfb1517d81f7c7134f73d5b4 SHA512 5babefd3ab0216dd1cf0b08b1ad10c79d034782ce744c9a4df402036ed1529655b9e05c641e876e9629a8366363ad0bf2d5e7581a621f2b0749ff02c6ed742eb WHIRLPOOL aedece0f9f66293a9cae9678d725f0a27de62f9df07bf5396a677033267a447d5ab0949543782177dfb1e4d7854a32163bc09369417b4f84758d11f5ee1eb7d7
+AUX transmission-2.92-handshake.patch 1257 SHA256 c050cf28bf1318c8f414219b03a8d9896a71af84fc7a2752f2e6f9e2f430fc24 SHA512 d4272018ffc7ea9607dae475275d694e678119160225f00135ced711771ddf79af7271c42399bccf701d67ac07052a47f33439ba32bb74838786d3e915c364f6 WHIRLPOOL 1a3264085e00e28afd1233de704e817efc6d17092c27335233bd0d79004fefa8eb06c7849c8aab9b886fb40a276418f036253690ae8c05c53b8afa1c3b053afd
+AUX transmission-daemon.confd.4 735 SHA256 9065bcf729309aebd48ae2214a461d162924462fb2db51f33aed40dd0c3b4f25 SHA512 47e78c85857eefb9be6c25d1e789cfb2a276d5816ba911ba1511e764469b2d9998edafe44247aff784113ca28926748bc5fb2b879280b780fd69ffb1e4e40736 WHIRLPOOL bac8685d10d2211cc6a50df19de0b4b529eabd4ee0111a8e11e4e61954b0342c7cf52f6d449abc3d66ac54839c996f57cab82da445512897b09f8ce629a8e94b
+AUX transmission-daemon.initd.10 1707 SHA256 8925e7b2f59de7c116778fa9a498e8209358117b08870a9208fe37c8b2f01ee5 SHA512 30d9fe7d06ca3c92ff436e9bbe84729a5b343b52965f8d1d3d43f14f5fa25881dbc9676c5d3d916cff552aad5872ed41c2930e9ce3a5f7c958dbeec0d1ab1ac4 WHIRLPOOL 7915798dea7284973bbb3684f5b67f79b1dc71ce6c6c7f12137b71b65c80029ac706687872093a4a781cb6aa4956d6ff220c0fa9fa56368af98d3e263d2da55c
+AUX transmission-daemon.service.conf 69 SHA256 e73b846a40be0fea265cc6e920fefb5f79c3ad10da2fcfa9fa1f786d82e89131 SHA512 3dc02be596296fc1efbf1bc690be3953709af00c230f55db4d067ff592d87e1a465faa4067bc15d65a8a27fed2cf07d108abb2ed45fc76b47b0642ce2e182946 WHIRLPOOL b7cbee802b4bef994608317388587776c05fa0746de1ecf75b530473bb9910a2308c4a2d188ed9aa2725ed9dbee6e2bae05e51d5b8c8cbefd5a8763d1365e791
+DIST transmission-2.92.tar.xz 3378116 SHA256 3a8d045c306ad9acb7bf81126939b9594553a388482efa0ec1bfb67b22acd35f SHA512 4d99476bee88cedcc4238a0eee64a4089016933cbfc1cfb1cca023ad4ebcfe46375c9e7651a17af4aeaaf1feb19cbd8166aa56ef7992d9e745a7bbcbe8efca11 WHIRLPOOL a2eab113fd895001cf72cd79c4ac9a4767eb9fb756a3fb9b1d0db6aa283d19a6aec739b8681a3a5a26ef630cec68f004e14f8654221f0528e30927f37339887f
+EBUILD transmission-2.92-r2.ebuild 4347 SHA256 04cbaf286eea0af274c4628b57e07be3fc17c62812eea08626ecf0f73c5a4b1f SHA512 1dc44445ec7bda9aff29c70a0a368cfca377795e14d887e66c9c552f0629142398f13b49c8b1da8b46fa8f5d15f7a9c7c7430e772dfc135e45619c69e35bf332 WHIRLPOOL 6290eb5d36b3647a619b172b39f2b1cc26c793e8e0138ba0039d00f1e7ebf02030830d84994749d785f90662684462b79f69b5135d3fbbbfc38cd65be80ac25d
+EBUILD transmission-9999.ebuild 3738 SHA256 ef263f79917147646d5130206f6908bb530ba76e8cc7e49452a2c116a60ae446 SHA512 8ea1ae5d27f1db02eef27ddb4e9803c4146fd6d8fbeaff2cdfa749faad0e5df6b2095c42797775be021b50f25325fc31901ef883967c9178c635572781fb2aac WHIRLPOOL 2d51e4ae6b20ea6b2a8d6f587bea6a04f60f82836f6a20b32b148307b067ebcd4d7f62bdc8120a853ea094425b3337a61996c005972dc7bf2683484bbf5063d5
+MISC ChangeLog 9562 SHA256 3575a0a2436aa49457b377f1d66626137db3c6c303ab9c9045013a8b11f5481a SHA512 baaed0881db9085b81c8bee5318715b06bc041f4d320487f4c490208cce9e46aaf5056e6361f46c7b6be059b967875131056cf69155ce0a1864c7eec6037c0ee WHIRLPOOL 24083aadbe5a5ba6b9331a43f88825b98a187f810339caa9b4eb842101fd7cd4e66f319b6ee683025ce69f5352681e597b64a5c42aa7b94e41d9e257af5e7e20
+MISC ChangeLog-2015 44842 SHA256 9f1b3498aef31c65535f11e481362070f5cc5bb449cf9c946b28ad3ccfbd2457 SHA512 6f7d44abcec4edfc0f2930906a65a1409d9039a335cec9dead774a363f10d13e9e0eeb9f28165ccc6d174adc26ef977447a88e937801ee767a622b731399a670 WHIRLPOOL 794195cf1eb37646c42a55583a0722014258aba1f0ae55d1d017fb2e8d07bb3bda9208bf5b671bfe1d0d5389fc2100436a49790c0855caf9c2f48a9bee222008
+MISC metadata.xml 613 SHA256 0a14f95ae94cfa6ebef88b18532520c0c30eb17312a344fdce5316ac9767b8cb SHA512 ca6047c72ae050ed34068c21c52c47116c94db558b8919dfa88db98d9a13396ac31b7a31b702969d417486266a9ebddc0befd9c95b9842f82e04231d5e4d9352 WHIRLPOOL 35098c068798ba4ea27749687de4075c17b3282e27c8b0ce6f8f3ccd1924f0d51f5f7d342abac2f86558a75e778633b50930f15ba476888d78fc9f1982d702a0
diff --git a/net-p2p/transmission/files/libsystemd.patch b/net-p2p/transmission/files/libsystemd.patch
new file mode 100644
index 000000000000..5db47ef39bd9
--- /dev/null
+++ b/net-p2p/transmission/files/libsystemd.patch
@@ -0,0 +1,11 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -245,7 +245,7 @@
+ [Add support for systemd startup notification (default is autodetected)]),
+ [USE_SYSTEMD_DAEMON=$withval], [USE_SYSTEMD_DAEMON=auto])
+ AS_IF([test "x$USE_SYSTEMD_DAEMON" != "xno"], [
+- PKG_CHECK_MODULES([SYSTEMD_DAEMON], [libsystemd-daemon],
++ PKG_CHECK_MODULES([SYSTEMD_DAEMON], [libsystemd],
+ [AC_DEFINE(USE_SYSTEMD_DAEMON,1,[Use systemd startup notification])],
+ [AS_IF([test "x$USE_SYSTEMD_DAEMON" = "xyes"],
+ [AC_MSG_ERROR([systemd startup notification support requested, but libsystemd-daemon not found.])]
diff --git a/net-p2p/transmission/files/transmission-2.92-handshake.patch b/net-p2p/transmission/files/transmission-2.92-handshake.patch
new file mode 100644
index 000000000000..a30cd583fae0
--- /dev/null
+++ b/net-p2p/transmission/files/transmission-2.92-handshake.patch
@@ -0,0 +1,33 @@
+commit 4c00df9463ea4fd70b73c620e439f5c3ee5efa60
+Author: Mike Gelfand <mikedld@mikedld.com>
+Date: Sun Sep 18 13:58:15 2016 +0300
+
+ Abort handshake if establishing DH shared secret fails
+
+ Fixes #27
+
+diff --git a/libtransmission/handshake.c b/libtransmission/handshake.c
+index c728696..e7ff131 100644
+--- a/libtransmission/handshake.c
++++ b/libtransmission/handshake.c
+@@ -425,7 +425,8 @@ readYb (tr_handshake * handshake, struct evbuffer * inbuf)
+
+ /* compute the secret */
+ evbuffer_remove (inbuf, yb, KEY_LEN);
+- tr_cryptoComputeSecret (handshake->crypto, yb);
++ if (!tr_cryptoComputeSecret (handshake->crypto, yb))
++ return tr_handshakeDone (handshake, false);
+
+ /* now send these: HASH ('req1', S), HASH ('req2', SKEY) xor HASH ('req3', S),
+ * ENCRYPT (VC, crypto_provide, len (PadC), PadC, len (IA)), ENCRYPT (IA) */
+@@ -741,7 +742,9 @@ readYa (tr_handshake * handshake,
+
+ /* read the incoming peer's public key */
+ evbuffer_remove (inbuf, ya, KEY_LEN);
+- tr_cryptoComputeSecret (handshake->crypto, ya);
++ if (!tr_cryptoComputeSecret (handshake->crypto, ya))
++ return tr_handshakeDone (handshake, false);
++
+ computeRequestHash (handshake, "req1", handshake->myReq1);
+
+ /* send our public key to the peer */
diff --git a/net-p2p/transmission/files/transmission-daemon.confd.4 b/net-p2p/transmission/files/transmission-daemon.confd.4
new file mode 100644
index 000000000000..64ecd8091a3a
--- /dev/null
+++ b/net-p2p/transmission/files/transmission-daemon.confd.4
@@ -0,0 +1,15 @@
+# This is the transmission-daemon configuration file. For other options and
+# better explanation, take a look at transmission-daemon manual page Note: it's
+# better to configure some settings (like username/password) in
+# /var/lib/transmission/config/settings.json to avoid other users see it with `ps`
+
+# Parameters to pass to transmission-daemon
+# TRANSMISSION_OPTIONS=""
+
+# Run daemon as another user (username or username:groupname)
+# If you change this setting, chown -R /var/lib/transmission/config <and download directory, check web settings>
+#runas_user=transmission
+
+# Location of logfile (should be writeable for runas_user user)
+# Set logfile=syslog to use syslog for logging
+#logfile=/var/log/transmission/transmission.log
diff --git a/net-p2p/transmission/files/transmission-daemon.initd.10 b/net-p2p/transmission/files/transmission-daemon.initd.10
new file mode 100644
index 000000000000..a8afd2a243dd
--- /dev/null
+++ b/net-p2p/transmission/files/transmission-daemon.initd.10
@@ -0,0 +1,49 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+command="/usr/bin/transmission-daemon"
+extra_started_commands="reload"
+description="Transmission is a fast, easy and free bittorrent client"
+description_start="Start transmission-daemon server and web interface"
+description_stop="Stop transmission-daemon server and web interface"
+description_reload="Reload transmission-daemon settings"
+
+rundir=${rundir:-/var/run/transmission}
+pidfile=${pidfile:-${rundir}/transmission.pid}
+config_dir=${config_dir:-/var/lib/transmission/config}
+download_dir=${download_dir:-/var/lib/transmission/downloads}
+logfile=${logfile:-/var/log/transmission/transmission.log}
+runas_user=${runas_user:-transmission:transmission}
+
+retry="TERM/45/QUIT/15"
+
+start_pre() {
+ command_args="--config-dir ${config_dir} --pid-file ${pidfile}"
+ command_user="${runas_user}"
+
+ # Call mkdir -p in case parent dirs are missing
+ mkdir -p "${rundir}" "${config_dir}" "${download_dir}"
+
+ # Call checkpath to fixup permissions
+ checkpath -d -o "${runas_user}" "${rundir}" "${config_dir}" "${download_dir}" || return
+
+ if [ ! -e "${config_dir}/settings.json" ]; then
+ # Only set download dir if settings don't exist
+ # https://bugs.gentoo.org/576640
+ command_args="${command_args} --download-dir ${download_dir}"
+ fi
+
+ if [ "${logfile}" != syslog ]; then
+ checkpath -d -o "${runas_user}" /var/log/transmission || return
+ command_args="${command_args} --logfile ${logfile}"
+ fi
+
+ command_args="${command_args} ${TRANSMISSION_OPTIONS}"
+}
+
+reload() {
+ ebegin "Reloading ${RC_SVCNAME}"
+ start-stop-daemon --signal HUP --exec "${command}" --pidfile "${pidfile}"
+ eend $?
+}
diff --git a/net-p2p/transmission/files/transmission-daemon.service.conf b/net-p2p/transmission/files/transmission-daemon.service.conf
new file mode 100644
index 000000000000..ae543ca3f08f
--- /dev/null
+++ b/net-p2p/transmission/files/transmission-daemon.service.conf
@@ -0,0 +1,2 @@
+[Service]
+Environment=TRANSMISSION_HOME=/var/lib/transmission/config
diff --git a/net-p2p/transmission/metadata.xml b/net-p2p/transmission/metadata.xml
new file mode 100644
index 000000000000..e49e57cc90d4
--- /dev/null
+++ b/net-p2p/transmission/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>floppym@gentoo.org</email>
+ <name>Mike Gilbert</name>
+ </maintainer>
+ <use>
+ <flag name="lightweight">Optimize transmission for low-resource systems (smaller cache size, prefer unencrypted peer connections, etc.)</flag>
+ <flag name="mbedtls">Use mbed TLS instead of OpenSSL</flag>
+ <flag name="xfs">Enable XFS filesystem capabilities by using <pkg>sys-fs/xfsprogs</pkg> headers (in building of fdlimit(.c))</flag>
+ </use>
+</pkgmetadata>
diff --git a/net-p2p/transmission/transmission-2.92-r2.ebuild b/net-p2p/transmission/transmission-2.92-r2.ebuild
new file mode 100644
index 000000000000..ba43a7787f0c
--- /dev/null
+++ b/net-p2p/transmission/transmission-2.92-r2.ebuild
@@ -0,0 +1,164 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit autotools fdo-mime flag-o-matic gnome2-utils qmake-utils systemd user
+
+DESCRIPTION="A Fast, Easy and Free BitTorrent client"
+HOMEPAGE="http://www.transmissionbt.com/"
+SRC_URI="http://download.transmissionbt.com/${PN}/files/${P}.tar.xz"
+
+# web/LICENSE is always GPL-2 whereas COPYING allows either GPL-2 or GPL-3 for the rest
+# transmission in licenses/ is for mentioning OpenSSL linking exception
+# MIT is in several libtransmission/ headers
+LICENSE="|| ( GPL-2 GPL-3 Transmission-OpenSSL-exception ) GPL-2 MIT"
+SLOT=0
+IUSE="ayatana gtk libressl lightweight systemd qt5 xfs"
+KEYWORDS="amd64 ~arm ~mips ppc ppc64 x86 ~x86-fbsd ~amd64-linux"
+
+RDEPEND=">=dev-libs/libevent-2.0.10:=
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= )
+ net-libs/libnatpmp
+ >=net-libs/miniupnpc-1.7:=
+ >=net-misc/curl-7.16.3[ssl]
+ sys-libs/zlib:=
+ gtk? (
+ >=dev-libs/dbus-glib-0.100
+ >=dev-libs/glib-2.32:2
+ >=x11-libs/gtk+-3.4:3
+ ayatana? ( >=dev-libs/libappindicator-0.4.90:3 )
+ )
+ qt5? (
+ dev-qt/qtcore:5
+ dev-qt/qtdbus:5
+ dev-qt/qtgui:5
+ dev-qt/qtnetwork:5
+ dev-qt/qtwidgets:5
+ )
+ systemd? ( >=sys-apps/systemd-209:= )"
+DEPEND="${RDEPEND}
+ >=dev-libs/glib-2.32
+ dev-util/intltool
+ sys-devel/gettext
+ virtual/os-headers
+ virtual/pkgconfig
+ qt5? ( dev-qt/linguist-tools:5 )
+ xfs? ( sys-fs/xfsprogs )"
+
+REQUIRED_USE="ayatana? ( gtk )"
+
+DOCS=( AUTHORS NEWS qt/README.txt )
+
+PATCHES=(
+ "${FILESDIR}"/libsystemd.patch
+ "${FILESDIR}/${P}-handshake.patch"
+)
+
+src_prepare() {
+ sed -i -e '/CFLAGS/s:-ggdb3::' configure.ac || die
+
+ # Trick to avoid automagic dependency
+ if ! use ayatana ; then
+ sed -i -e '/^LIBAPPINDICATOR_MINIMUM/s:=.*:=9999:' configure.ac || die
+ fi
+
+ # http://trac.transmissionbt.com/ticket/4324
+ sed -i -e 's|noinst\(_PROGRAMS = $(TESTS)\)|check\1|' libtransmission/Makefile.am || die
+
+ # Prevent m4_copy error when running aclocal
+ # m4_copy: won't overwrite defined macro: glib_DEFUN
+ rm m4/glib-gettext.m4 || die
+
+ default
+ eautoreconf
+}
+
+src_configure() {
+ export ac_cv_header_xfs_xfs_h=$(usex xfs)
+
+ # https://bugs.gentoo.org/577528
+ append-lfs-flags
+
+ econf \
+ --enable-external-natpmp \
+ $(use_enable lightweight) \
+ $(use_with systemd systemd-daemon) \
+ $(use_with gtk)
+
+ if use qt5; then
+ pushd qt >/dev/null || die
+ eqmake5 qtr.pro
+ popd >/dev/null || die
+ fi
+}
+
+src_compile() {
+ emake
+
+ if use qt5; then
+ emake -C qt
+ $(qt5_get_bindir)/lrelease qt/translations/*.ts || die
+ fi
+}
+
+src_install() {
+ default
+
+ rm "${ED%/}"/usr/share/transmission/web/LICENSE || die
+
+ newinitd "${FILESDIR}"/transmission-daemon.initd.10 transmission-daemon
+ newconfd "${FILESDIR}"/transmission-daemon.confd.4 transmission-daemon
+ systemd_dounit daemon/transmission-daemon.service
+ systemd_install_serviced "${FILESDIR}"/transmission-daemon.service.conf
+
+ if use qt5; then
+ pushd qt >/dev/null || die
+ emake INSTALL_ROOT="${ED%/}"/usr install
+
+ domenu transmission-qt.desktop
+
+ local res
+ for res in 16 22 24 32 48 64 72 96 128 192 256; do
+ doicon -s ${res} icons/hicolor/${res}x${res}/transmission-qt.png
+ done
+ doicon -s scalable icons/hicolor/scalable/transmission-qt.svg
+
+ insinto /usr/share/qt5/translations
+ doins translations/*.qm
+ popd >/dev/null || die
+ fi
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+ gnome2_icon_cache_update
+
+ enewgroup transmission
+ enewuser transmission -1 -1 /var/lib/transmission transmission
+
+ if [[ ! -e "${EROOT%/}"/var/lib/transmission ]]; then
+ mkdir -p "${EROOT%/}"/var/lib/transmission || die
+ chown transmission:transmission "${EROOT%/}"/var/lib/transmission || die
+ fi
+
+ elog "If you use transmission-daemon, please, set 'rpc-username' and"
+ elog "'rpc-password' (in plain text, transmission-daemon will hash it on"
+ elog "start) in settings.json file located at /var/lib/transmission/config or"
+ elog "any other appropriate config directory."
+ elog
+ elog "Since µTP is enabled by default, transmission needs large kernel buffers for"
+ elog "the UDP socket. You can append following lines into /etc/sysctl.conf:"
+ elog " net.core.rmem_max = 4194304"
+ elog " net.core.wmem_max = 1048576"
+ elog "and run sysctl -p"
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+ gnome2_icon_cache_update
+}
diff --git a/net-p2p/transmission/transmission-9999.ebuild b/net-p2p/transmission/transmission-9999.ebuild
new file mode 100644
index 000000000000..77f58934f397
--- /dev/null
+++ b/net-p2p/transmission/transmission-9999.ebuild
@@ -0,0 +1,151 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-utils gnome2-utils readme.gentoo-r1 systemd user xdg-utils
+
+if [[ ${PV} == 9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/transmission/transmission"
+else
+ SRC_URI="https://github.com/transmission/transmission/archive/${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~x86 ~x86-fbsd ~amd64-linux"
+fi
+
+DESCRIPTION="A fast, easy, and free BitTorrent client"
+HOMEPAGE="https://transmissionbt.com/"
+
+# web/LICENSE is always GPL-2 whereas COPYING allows either GPL-2 or GPL-3 for the rest
+# transmission in licenses/ is for mentioning OpenSSL linking exception
+# MIT is in several libtransmission/ headers
+LICENSE="|| ( GPL-2 GPL-3 Transmission-OpenSSL-exception ) GPL-2 MIT"
+SLOT="0"
+IUSE="ayatana gtk libressl lightweight nls mbedtls qt5 systemd test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ dev-libs/libb64:0=
+ >=dev-libs/libevent-2.0.10:=
+ !mbedtls? (
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= )
+ )
+ mbedtls? ( net-libs/mbedtls:0= )
+ net-libs/libnatpmp
+ >=net-libs/miniupnpc-1.7:=
+ >=net-misc/curl-7.16.3[ssl]
+ sys-libs/zlib:=
+ gtk? (
+ >=dev-libs/dbus-glib-0.100
+ >=dev-libs/glib-2.32:2
+ >=x11-libs/gtk+-3.4:3
+ ayatana? ( >=dev-libs/libappindicator-0.4.30:3 )
+ )
+ qt5? (
+ dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qtwidgets:5
+ dev-qt/qtnetwork:5
+ dev-qt/qtdbus:5
+ )
+ systemd? ( >=sys-apps/systemd-209:= )
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ nls? (
+ virtual/libintl
+ gtk? (
+ dev-util/intltool
+ sys-devel/gettext
+ )
+ qt5? (
+ dev-qt/linguist-tools:5
+ )
+ )
+"
+
+src_unpack() {
+ if [[ ${PV} == 9999 ]]; then
+ git-r3_src_unpack
+ else
+ unpack ${P}.tar.gz
+ fi
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DCMAKE_INSTALL_DOCDIR=share/doc/${PF}
+
+ -DENABLE_GTK=$(usex gtk ON OFF)
+ -DENABLE_LIGHTWEIGHT=$(usex lightweight ON OFF)
+ -DENABLE_NLS=$(usex nls ON OFF)
+ -DENABLE_QT=$(usex qt5 ON OFF)
+ -DENABLE_TESTS=$(usex test ON OFF)
+ -DUSE_QT5=ON
+
+ -DUSE_SYSTEM_EVENT2=ON
+ -DUSE_SYSTEM_DHT=OFF
+ -DUSE_SYSTEM_MINIUPNPC=ON
+ -DUSE_SYSTEM_NATPMP=ON
+ -DUSE_SYSTEM_UTP=OFF
+ -DUSE_SYSTEM_B64=ON
+
+ -DWITH_CRYPTO=$(usex mbedtls polarssl openssl)
+ -DWITH_INOTIFY=ON
+ -DWITH_LIBAPPINDICATOR=$(usex ayatana ON OFF)
+ -DWITH_SYSTEMD=$(usex systemd ON OFF)
+ )
+
+ cmake-utils_src_configure
+}
+
+DISABLE_AUTOFORMATTING=1
+DOC_CONTENTS="\
+If you use transmission-daemon, please, set 'rpc-username' and
+'rpc-password' (in plain text, transmission-daemon will hash it on
+start) in settings.json file located at /var/lib/transmission/config or
+any other appropriate config directory.
+
+Since µTP is enabled by default, transmission needs large kernel buffers for
+the UDP socket. You can append following lines into /etc/sysctl.conf:
+
+net.core.rmem_max = 4194304
+net.core.wmem_max = 1048576
+
+and run sysctl -p"
+
+src_install() {
+ cmake-utils_src_install
+
+ newinitd "${FILESDIR}"/transmission-daemon.initd.10 transmission-daemon
+ newconfd "${FILESDIR}"/transmission-daemon.confd.4 transmission-daemon
+ systemd_dounit daemon/transmission-daemon.service
+ systemd_install_serviced "${FILESDIR}"/transmission-daemon.service.conf
+
+ readme.gentoo_create_doc
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postrm() {
+ xdg_desktop_database_update
+ gnome2_icon_cache_update
+}
+
+pkg_postinst() {
+ xdg_desktop_database_update
+ gnome2_icon_cache_update
+
+ enewgroup transmission
+ enewuser transmission -1 -1 /var/lib/transmission transmission
+
+ if [[ ! -e "${EROOT%/}"/var/lib/transmission ]]; then
+ mkdir -p "${EROOT%/}"/var/lib/transmission || die
+ chown transmission:transmission "${EROOT%/}"/var/lib/transmission || die
+ fi
+
+ readme.gentoo_print_elog
+}