summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGary Wong <gtw@gnu.org>2020-09-28 23:16:06 -0600
committerGary Wong <gtw@gnu.org>2020-09-28 23:16:06 -0600
commita3d17046c037357452dc92e211f7245e5b8395a3 (patch)
tree69149739e20f153a4d8efdb8b26f482b60c2ab2b
parentab052c5d97f793177a721aad32e4a7513da126f4 (diff)
net-p2p/transmission: Add dbus, natpmp and upnp USE flags.
-rw-r--r--net-p2p/transmission/Manifest10
-rw-r--r--net-p2p/transmission/files/60-transmission.conf2
-rw-r--r--net-p2p/transmission/files/cmake-unused-command-line.patch21
-rw-r--r--net-p2p/transmission/files/transmission-3.00-optional-dbus.patch28
-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-3.00-r1.ebuild147
-rw-r--r--net-p2p/transmission/transmission-9999.ebuild141
10 files changed, 428 insertions, 0 deletions
diff --git a/net-p2p/transmission/Manifest b/net-p2p/transmission/Manifest
new file mode 100644
index 0000000..3f44763
--- /dev/null
+++ b/net-p2p/transmission/Manifest
@@ -0,0 +1,10 @@
+AUX 60-transmission.conf 56 BLAKE2B 4c2aadb19b4c85ce8ecec4f190f83da81a8b9e27f02cb20b785251122b5a495d1b3b7425378c4e17d3cda3c1c5b92c4297140dcfc3d4973dfbd1ac8e713245ca SHA512 9f79cfb00fa92e6d9054aad615f0ca7a1ad9d57b750e40b8942b7987a4a93d97b1f1ba9774a64f2b16e7c49fe7ae5fb4978d7aca3c481431ff333d508ed36410
+AUX cmake-unused-command-line.patch 875 BLAKE2B 3f86d8cd5977504e89d09948120a09a152be54a5f705c3a0e44b35bb26610750f526e5dcff2f781215a66be3b3a1fba0be797187972adcbfacf41c5835d00341 SHA512 58278a26998f560f52b76bbc76bf4c2981464e2f5c8e13672c288b9eedd0944228ee104abb99422154ba23646135baabb8400344122ad13b1333156af73fea8f
+AUX transmission-3.00-optional-dbus.patch 1060 BLAKE2B c9f91718e9520478ede80fd78bc18957313fe942c7cb2fb5069c24566c6964fef427d298fe1f41d637e8cca9aaaf03369643ba251db4dd5e746c259aecd93167 SHA512 588c4b114844b3cb39f9b43765b1d9acb9913f40a5d7302379755ea3057db20b650f11f7165d0f3591c3e767cd780fc9926b77810f7e2182d79db548bddab051
+AUX transmission-daemon.confd.4 735 BLAKE2B bc4c06dcf4a12282d36d446537ae8d3a461a9bb84f93b54f7d13be1c430209647bae89054b60f5d8dd434049140f74c1cb4ad04064d03b37ad88a851c28c07fa SHA512 47e78c85857eefb9be6c25d1e789cfb2a276d5816ba911ba1511e764469b2d9998edafe44247aff784113ca28926748bc5fb2b879280b780fd69ffb1e4e40736
+AUX transmission-daemon.initd.10 1707 BLAKE2B 57857fa0b628f0c49ebaf13544b366bf9db39c70f31556a21262556ad89657a7f13c84e19f882839e4bc10f2b8afef96aa51f833478e38f215499244ca8b388b SHA512 30d9fe7d06ca3c92ff436e9bbe84729a5b343b52965f8d1d3d43f14f5fa25881dbc9676c5d3d916cff552aad5872ed41c2930e9ce3a5f7c958dbeec0d1ab1ac4
+AUX transmission-daemon.service.conf 69 BLAKE2B 6e38a28f54366850ae794896f2954c3af77afead303197c49970873fa604d6b375e71122de8d3645f9fcc8abed4f696ac257bd59ba87ebdc5cdd5839d32c0a7b SHA512 3dc02be596296fc1efbf1bc690be3953709af00c230f55db4d067ff592d87e1a465faa4067bc15d65a8a27fed2cf07d108abb2ed45fc76b47b0642ce2e182946
+DIST transmission-3.00.tar.xz 3995080 BLAKE2B fb1be44aa630e6a1cf15511ab4ab40156edb16f9410b83058c53548f466fb9502c23157756a29e921e4468db1ebac7832b755cfcf98451c663c64401559f5498 SHA512 c8fb96086ba4b18f04d6181a29f6e2af85864840c533f3470a202dfa686e9431caeccd25f12c975a9a8f9b7802ca0bd73c4edc1ca06bdbada682326cad188a76
+EBUILD transmission-3.00-r1.ebuild 3410 BLAKE2B df816ea245b704797077d130508bada5cd05e5e028425e7ec9bbc75ba1d7e00bd00e1570d15409a16b2cae55979bf2edb6c0fb42aaa122fae460cc9d8edc86b8 SHA512 1d53404221ead017e5c84edec7391bb39fbb32f29338426c02f6ac029db380900a02b3e9a6d1996ba0ff501e13793235ff5d0832ac539b54272407ecf4ab5de7
+EBUILD transmission-9999.ebuild 3196 BLAKE2B bd91eee69c5ba68e2bd9d168190eeeda69b1199844d217fd6eff1adfd71085c649b1b66823efe6b66dcd97bcdc32f95eb18686cb3bd986997246b4ea9815fbeb SHA512 f1d288b3406c460485535242af24064b194d43ab02f3b6c17764f3329e58202839202205c230a2b37f87f92788bab0c58398a7b03c5ba6494985db9f456286fe
+MISC metadata.xml 553 BLAKE2B f825610ffb3564bdc8bdfb421b0965ebca77feb0ce591dd39a31feaa6b1f96c70ad841acaaee119b0a0fc4f7b5125196718f2be09c556c4eae2c9e5371bf60f1 SHA512 e7d91c3f55ecb6bf4603fc40f74e0d288bd5d079d6f985edf88b611ea2097b40f7c7f8fea19cec726014b46dc33759f03f7ea8426a40bc514c931e827ba33bef
diff --git a/net-p2p/transmission/files/60-transmission.conf b/net-p2p/transmission/files/60-transmission.conf
new file mode 100644
index 0000000..bdf0de2
--- /dev/null
+++ b/net-p2p/transmission/files/60-transmission.conf
@@ -0,0 +1,2 @@
+net.core.rmem_max = 4194304
+net.core.wmem_max = 1048576
diff --git a/net-p2p/transmission/files/cmake-unused-command-line.patch b/net-p2p/transmission/files/cmake-unused-command-line.patch
new file mode 100644
index 0000000..6e0af5d
--- /dev/null
+++ b/net-p2p/transmission/files/cmake-unused-command-line.patch
@@ -0,0 +1,21 @@
+From 63b8fd6391cd30bb45e1c9432f69c43ade9bb7ea Mon Sep 17 00:00:00 2001
+From: Mike Gilbert <floppym@gentoo.org>
+Date: Sat, 23 May 2020 22:25:42 -0400
+Subject: [PATCH] Do not warn about unused command line options
+
+---
+ cmake/TrMacros.cmake | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/cmake/TrMacros.cmake b/cmake/TrMacros.cmake
+index 5e439126f..674b2ede0 100644
+--- a/cmake/TrMacros.cmake
++++ b/cmake/TrMacros.cmake
+@@ -95,6 +95,7 @@ macro(tr_add_external_auto_library ID DIRNAME LIBNAME)
+ PREFIX "${${ID}_PREFIX}"
+ CMAKE_ARGS
+ -Wno-dev # We don't want to be warned over unused variables
++ --no-warn-unused-cli
+ "-DCMAKE_TOOLCHAIN_FILE:PATH=${CMAKE_TOOLCHAIN_FILE}"
+ "-DCMAKE_USER_MAKE_RULES_OVERRIDE=${CMAKE_USER_MAKE_RULES_OVERRIDE}"
+ "-DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS}"
diff --git a/net-p2p/transmission/files/transmission-3.00-optional-dbus.patch b/net-p2p/transmission/files/transmission-3.00-optional-dbus.patch
new file mode 100644
index 0000000..3848b10
--- /dev/null
+++ b/net-p2p/transmission/files/transmission-3.00-optional-dbus.patch
@@ -0,0 +1,28 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 62bf87be..acb32511 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -36,6 +36,7 @@ tr_auto_option(WITH_INOTIFY "Enable inotify support (on systems that sup
+ tr_auto_option(WITH_KQUEUE "Enable kqueue support (on systems that support it)" AUTO)
+ tr_auto_option(WITH_LIBAPPINDICATOR "Use libappindicator in GTK+ client" AUTO)
+ tr_auto_option(WITH_SYSTEMD "Add support for systemd startup notification (on systems that support it)" AUTO)
++ option(ENABLE_DBUS "Enable dbus support" ON)
+
+ set(TR_NAME ${PROJECT_NAME})
+
+@@ -245,13 +246,13 @@ if(ENABLE_QT)
+ endif()
+ endif()
+
+- if(Qt5DBus_FOUND)
++ if(ENABLE_DBUS)
+ set(ENABLE_QT_DBUS_INTEROP ON)
+ endif()
+ endif()
+
+ set(QT_FOUND ON)
+- if(NOT QT_TARGETS OR NOT (ENABLE_QT_COM_INTEROP OR ENABLE_QT_DBUS_INTEROP))
++ if(NOT QT_TARGETS)
+ if(QT_IS_REQUIRED)
+ message(FATAL_ERROR "Unable to find required Qt libraries.")
+ endif()
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 0000000..64ecd80
--- /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 0000000..a8afd2a
--- /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 0000000..ae543ca
--- /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 0000000..9300aa6
--- /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>gtw@gnu.org</email>
+ </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="natpmp">Use net-libs/libnatpmp for NAT traversal</flag>
+ <flag name="upnp">Use net-libs/miniupnpc</flag>
+ </use>
+</pkgmetadata>
diff --git a/net-p2p/transmission/transmission-3.00-r1.ebuild b/net-p2p/transmission/transmission-3.00-r1.ebuild
new file mode 100644
index 0000000..fd310f4
--- /dev/null
+++ b/net-p2p/transmission/transmission-3.00-r1.ebuild
@@ -0,0 +1,147 @@
+# Copyright 2006-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake systemd xdg-utils
+
+if [[ ${PV} == 9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/transmission/transmission"
+else
+ SRC_URI="https://dev.gentoo.org/~floppym/dist/${P}.tar.xz"
+ KEYWORDS="amd64 ~arm ~arm64 ~mips ppc ppc64 x86 ~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="appindicator dbus gtk libressl lightweight natpmp nls mbedtls qt5 systemd test upnp"
+RESTRICT="!test? ( test )"
+
+ACCT_DEPEND="
+ acct-group/transmission
+ acct-user/transmission
+"
+BDEPEND="${ACCT_DEPEND}
+ virtual/pkgconfig
+ nls? (
+ gtk? (
+ dev-util/intltool
+ sys-devel/gettext
+ )
+ qt5? (
+ dev-qt/linguist-tools:5
+ )
+ )
+"
+COMMON_DEPEND="
+ >=dev-libs/libevent-2.0.10:=
+ !mbedtls? (
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= )
+ )
+ mbedtls? ( net-libs/mbedtls:0= )
+ natpmp? ( net-libs/libnatpmp )
+ upnp? ( >=net-libs/miniupnpc-1.7:= )
+ >=net-misc/curl-7.16.3[ssl]
+ sys-libs/zlib:=
+ nls? ( virtual/libintl )
+ gtk? (
+ dbus? ( >=dev-libs/dbus-glib-0.100 )
+ >=dev-libs/glib-2.32:2
+ >=x11-libs/gtk+-3.4:3
+ appindicator? ( >=dev-libs/libappindicator-0.4.30:3 )
+ )
+ qt5? (
+ dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qtwidgets:5
+ dev-qt/qtnetwork:5
+ dbus? ( dev-qt/qtdbus:5 )
+ )
+ systemd? ( >=sys-apps/systemd-209:= )
+"
+DEPEND="${COMMON_DEPEND}
+ nls? (
+ virtual/libintl
+ gtk? (
+ dev-util/intltool
+ sys-devel/gettext
+ )
+ qt5? (
+ dev-qt/linguist-tools:5
+ )
+ )
+"
+RDEPEND="${COMMON_DEPEND}
+ ${ACCT_DEPEND}
+"
+
+PATCHES=(
+ "${FILESDIR}"/cmake-unused-command-line.patch
+ "${FILESDIR}/transmission-3.00-optional-dbus.patch"
+)
+
+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)
+ -DENABLE_DBUS=$(usex dbus ON OFF)
+
+ -DUSE_SYSTEM_EVENT2=ON
+ -DUSE_SYSTEM_DHT=OFF
+ -DUSE_SYSTEM_MINIUPNPC=$(usex upnp ON OFF)
+ -DUSE_SYSTEM_NATPMP=$(usex natpmp ON OFF)
+ -DUSE_SYSTEM_UTP=OFF
+ -DUSE_SYSTEM_B64=OFF
+
+ -DWITH_CRYPTO=$(usex mbedtls polarssl openssl)
+ -DWITH_INOTIFY=ON
+ -DWITH_LIBAPPINDICATOR=$(usex appindicator ON OFF)
+ -DWITH_SYSTEMD=$(usex systemd ON OFF)
+ )
+
+ cmake_src_configure
+}
+
+src_install() {
+ cmake_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
+
+ insinto /usr/lib/sysctl.d
+ doins "${FILESDIR}"/60-transmission.conf
+
+ if [[ ${EUID} == 0 ]]; then
+ diropts -o transmission -g transmission
+ fi
+ keepdir /var/lib/transmission
+}
+
+pkg_postrm() {
+ if use gtk || use qt5; then
+ xdg_desktop_database_update
+ xdg_icon_cache_update
+ fi
+}
+
+pkg_postinst() {
+ if use gtk || use qt5; then
+ xdg_desktop_database_update
+ xdg_icon_cache_update
+ fi
+}
diff --git a/net-p2p/transmission/transmission-9999.ebuild b/net-p2p/transmission/transmission-9999.ebuild
new file mode 100644
index 0000000..bc3afb5
--- /dev/null
+++ b/net-p2p/transmission/transmission-9999.ebuild
@@ -0,0 +1,141 @@
+# Copyright 2006-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake systemd 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-releases/raw/master/${P}.tar.xz"
+ KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~x86 ~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="appindicator gtk libressl lightweight nls mbedtls qt5 systemd test"
+RESTRICT="!test? ( test )"
+
+ACCT_DEPEND="
+ acct-group/transmission
+ acct-user/transmission
+"
+BDEPEND="${ACCT_DEPEND}
+ virtual/pkgconfig
+ nls? (
+ gtk? (
+ dev-util/intltool
+ sys-devel/gettext
+ )
+ qt5? (
+ dev-qt/linguist-tools:5
+ )
+ )
+"
+COMMON_DEPEND="
+ >=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:=
+ nls? ( virtual/libintl )
+ gtk? (
+ >=dev-libs/dbus-glib-0.100
+ >=dev-libs/glib-2.32:2
+ >=x11-libs/gtk+-3.4:3
+ appindicator? ( >=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="${COMMON_DEPEND}
+ nls? (
+ virtual/libintl
+ gtk? (
+ dev-util/intltool
+ sys-devel/gettext
+ )
+ qt5? (
+ dev-qt/linguist-tools:5
+ )
+ )
+"
+RDEPEND="${COMMON_DEPEND}
+ ${ACCT_DEPEND}
+"
+
+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_SYSTEM_EVENT2=ON
+ -DUSE_SYSTEM_DHT=OFF
+ -DUSE_SYSTEM_MINIUPNPC=ON
+ -DUSE_SYSTEM_NATPMP=ON
+ -DUSE_SYSTEM_UTP=OFF
+ -DUSE_SYSTEM_B64=OFF
+
+ -DWITH_CRYPTO=$(usex mbedtls polarssl openssl)
+ -DWITH_INOTIFY=ON
+ -DWITH_LIBAPPINDICATOR=$(usex appindicator ON OFF)
+ -DWITH_SYSTEMD=$(usex systemd ON OFF)
+ )
+
+ cmake_src_configure
+}
+
+src_install() {
+ cmake_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
+
+ insinto /usr/lib/sysctl.d
+ doins "${FILESDIR}"/60-transmission.conf
+
+ if [[ ${EUID} == 0 ]]; then
+ diropts -o transmission -g transmission
+ fi
+ keepdir /var/lib/transmission
+}
+
+pkg_postrm() {
+ if use gtk || use qt5; then
+ xdg_desktop_database_update
+ xdg_icon_cache_update
+ fi
+}
+
+pkg_postinst() {
+ if use gtk || use qt5; then
+ xdg_desktop_database_update
+ xdg_icon_cache_update
+ fi
+}