Gentoo Archives: gentoo-commits

From: Mike Gilbert <floppym@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-p2p/transmission/files/, net-p2p/transmission/
Date: Fri, 04 Mar 2016 02:41:41
Message-Id: 1457059290.803531857196864988838036e52f5b255e855c42.floppym@gentoo
1 commit: 803531857196864988838036e52f5b255e855c42
2 Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
3 AuthorDate: Fri Mar 4 02:41:17 2016 +0000
4 Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
5 CommitDate: Fri Mar 4 02:41:30 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=80353185
7
8 net-p2p/transmission: Bump to 2.90
9
10 Also modernize the init script.
11
12 Package-Manager: portage-2.2.27_p64
13
14 net-p2p/transmission/Manifest | 1 +
15 .../files/transmission-daemon.initd.10 | 43 ++++++
16 net-p2p/transmission/transmission-2.90.ebuild | 158 +++++++++++++++++++++
17 3 files changed, 202 insertions(+)
18
19 diff --git a/net-p2p/transmission/Manifest b/net-p2p/transmission/Manifest
20 index 7de950d..13521d0 100644
21 --- a/net-p2p/transmission/Manifest
22 +++ b/net-p2p/transmission/Manifest
23 @@ -1 +1,2 @@
24 DIST transmission-2.84.tar.xz 3077836 SHA256 a9fc1936b4ee414acc732ada04e84339d6755cd0d097bcbd11ba2cfc540db9eb SHA512 d6c2b17e7f8180a41ac70f5b503dfdb0353c6419db25df1b393b18c987c56fda9e2fd4c3f4cda7f08c301877bd0b4711842c28121ceaaaae87f5792cc6c29a3d WHIRLPOOL 375f9c981d9d2ac308896e8b7d66d3643796c8e97d64a1e0d6fd2bffaafa55988b90ddb4eb98330edf062e835c0c5ce76749e7e66bf6806333673beb7569f342
25 +DIST transmission-2.90.tar.xz 3377720 SHA256 69ff8caf81684155926f437f46bf7df1b1fb304f52c7809f546257e8923f2fd2 SHA512 09c8e90cb1c7b508e3956d294ba9b5f01b4093c9f934c76d7515e96915c657b97f02819e1365dbbfecbdf489ae5757346d8bb2dd8e0070c304af434006495fda WHIRLPOOL a51a86603ddf208c73b6e86a05eda2d90636407c7c716fb959fa460a72908aafe2d82f46c1fe3d7afda52ba845d73924d0f26f107a2446644809f7cfd5985275
26
27 diff --git a/net-p2p/transmission/files/transmission-daemon.initd.10 b/net-p2p/transmission/files/transmission-daemon.initd.10
28 new file mode 100644
29 index 0000000..7acb222
30 --- /dev/null
31 +++ b/net-p2p/transmission/files/transmission-daemon.initd.10
32 @@ -0,0 +1,43 @@
33 +#!/sbin/openrc-run
34 +# Copyright 1999-2016 Gentoo Foundation
35 +# Distributed under the terms of the GNU General Public License v2
36 +# $Id$
37 +
38 +command="/usr/bin/transmission-daemon"
39 +extra_started_commands="reload"
40 +description="Transmission is a fast, easy and free bittorrent client"
41 +description_start="Start transmission-daemon server and web interface"
42 +description_stop="Stop transmission-daemon server and web interface"
43 +description_reload="Reload transmission-daemon settings"
44 +
45 +rundir=${rundir:-/var/run/transmission}
46 +pidfile=${pidfile:-${rundir}/transmission.pid}
47 +config_dir=${config_dir:-/var/lib/transmission/config}
48 +download_dir=${download_dir:-/var/lib/transmission/downloads}
49 +logfile=${logfile:-/var/log/transmission/transmission.log}
50 +runas_user=${runas_user:-transmission:transmission}
51 +
52 +retry="TERM/45/QUIT/15"
53 +
54 +start_pre() {
55 + command_args="
56 + --config-dir ${config_dir}
57 + --download-dir ${download_dir}
58 + --pid-file ${pidfile}
59 + ${TRANSMISSION_OPTIONS}
60 + "
61 + command_user="${runas_user}"
62 +
63 + checkpath -d -o ${runas_user} "${rundir}" /var/lib/transmission "${config_dir}" "${download_dir}" || return
64 +
65 + if [ "${logfile}" != syslog ]; then
66 + checkpath -d -o ${runas_user} /var/log/transmission || return
67 + command_args="${command_args} --logfile ${logfile}"
68 + fi
69 +}
70 +
71 +reload() {
72 + ebegin "Reloading ${RC_SVCNAME}"
73 + start-stop-daemon --signal HUP --exec "${command}" --pidfile "${pidfile}"
74 + eend $?
75 +}
76
77 diff --git a/net-p2p/transmission/transmission-2.90.ebuild b/net-p2p/transmission/transmission-2.90.ebuild
78 new file mode 100644
79 index 0000000..96c12ef
80 --- /dev/null
81 +++ b/net-p2p/transmission/transmission-2.90.ebuild
82 @@ -0,0 +1,158 @@
83 +# Copyright 1999-2016 Gentoo Foundation
84 +# Distributed under the terms of the GNU General Public License v2
85 +# $Id$
86 +
87 +EAPI=6
88 +inherit autotools fdo-mime gnome2-utils qmake-utils systemd user
89 +
90 +DESCRIPTION="A Fast, Easy and Free BitTorrent client"
91 +HOMEPAGE="http://www.transmissionbt.com/"
92 +SRC_URI="http://download.transmissionbt.com/${PN}/files/${P}.tar.xz"
93 +
94 +# web/LICENSE is always GPL-2 whereas COPYING allows either GPL-2 or GPL-3 for the rest
95 +# transmission in licenses/ is for mentioning OpenSSL linking exception
96 +# MIT is in several libtransmission/ headers
97 +LICENSE="|| ( GPL-2 GPL-3 Transmission-OpenSSL-exception ) GPL-2 MIT"
98 +SLOT=0
99 +IUSE="ayatana gtk libressl lightweight systemd qt4 qt5 xfs"
100 +KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~x86 ~x86-fbsd ~amd64-linux"
101 +
102 +RDEPEND=">=dev-libs/libevent-2.0.10:=
103 + !libressl? ( dev-libs/openssl:0= )
104 + libressl? ( dev-libs/libressl )
105 + net-libs/libnatpmp:=
106 + >=net-libs/miniupnpc-1.7:=
107 + >=net-misc/curl-7.16.3:=[ssl]
108 + sys-libs/zlib:=
109 + gtk? (
110 + >=dev-libs/dbus-glib-0.100:=
111 + >=dev-libs/glib-2.32:2=
112 + >=x11-libs/gtk+-3.4:3=
113 + ayatana? ( >=dev-libs/libappindicator-0.4.90:3= )
114 + )
115 + systemd? ( sys-apps/systemd:= )
116 + qt4? (
117 + dev-qt/qtcore:4
118 + dev-qt/qtgui:4
119 + dev-qt/qtdbus:4
120 + )
121 + qt5? (
122 + dev-qt/qtcore:5
123 + dev-qt/qtdbus:5
124 + dev-qt/qtgui:5
125 + dev-qt/qtnetwork:5
126 + dev-qt/qtwidgets:5
127 + )"
128 +DEPEND="${RDEPEND}
129 + >=dev-libs/glib-2.32
130 + dev-util/intltool
131 + sys-devel/gettext
132 + virtual/os-headers
133 + virtual/pkgconfig
134 + qt5? ( dev-qt/linguist-tools:5 )
135 + xfs? ( sys-fs/xfsprogs )"
136 +
137 +REQUIRED_USE="ayatana? ( gtk ) ?? ( qt4 qt5 )"
138 +
139 +DOCS="AUTHORS NEWS qt/README.txt"
140 +
141 +src_prepare() {
142 + sed -i -e '/CFLAGS/s:-ggdb3::' configure.ac || die
143 +
144 + # Trick to avoid automagic dependency
145 + use ayatana || { sed -i -e '/^LIBAPPINDICATOR_MINIMUM/s:=.*:=9999:' configure.ac || die; }
146 +
147 + # Pass our configuration dir to systemd unit file
148 + sed -i '/ExecStart/ s|$| -g /var/lib/transmission/config|' daemon/transmission-daemon.service || die
149 +
150 + # http://trac.transmissionbt.com/ticket/4324
151 + sed -i -e 's|noinst\(_PROGRAMS = $(TESTS)\)|check\1|' libtransmission/Makefile.am || die
152 +
153 + eapply_user
154 + eautoreconf
155 +}
156 +
157 +src_configure() {
158 + export ac_cv_header_xfs_xfs_h=$(usex xfs)
159 +
160 + econf \
161 + --enable-external-natpmp \
162 + $(use_enable lightweight) \
163 + $(use_with systemd systemd-daemon) \
164 + $(use_with gtk)
165 +
166 + if use qt4 || use qt5; then
167 + pushd qt >/dev/null || die
168 + use qt4 && eqmake4 qtr.pro
169 + use qt5 && eqmake5 qtr.pro
170 + popd >/dev/null || die
171 + fi
172 +}
173 +
174 +src_compile() {
175 + emake
176 +
177 + if use qt4 || use qt5; then
178 + local qt_bindir
179 + use qt4 && qt_bindir=$(qt4_get_bindir)
180 + use qt5 && qt_bindir=$(qt5_get_bindir)
181 + emake -C qt
182 + "${qt_bindir}"/lrelease qt/translations/*.ts || die
183 + fi
184 +}
185 +
186 +src_install() {
187 + default
188 +
189 + rm "${ED}"/usr/share/transmission/web/LICENSE || die
190 +
191 + newinitd "${FILESDIR}"/transmission-daemon.initd.10 transmission-daemon
192 + newconfd "${FILESDIR}"/transmission-daemon.confd.4 transmission-daemon
193 + systemd_dounit daemon/transmission-daemon.service
194 +
195 + if use qt4 || use qt5; then
196 + pushd qt >/dev/null || die
197 + emake INSTALL_ROOT="${ED}"/usr install
198 +
199 + domenu transmission-qt.desktop
200 +
201 + local res
202 + for res in 16 22 24 32 48 64 72 96 128 192 256; do
203 + doicon -s ${res} icons/hicolor/${res}x${res}/transmission-qt.png
204 + done
205 + doicon -s scalable icons/hicolor/scalable/transmission-qt.svg
206 +
207 + use qt4 && insinto /usr/share/qt4/translations
208 + use qt5 && insinto /usr/share/qt5/translations
209 + doins translations/*.qm
210 + popd >/dev/null || die
211 + fi
212 +}
213 +
214 +pkg_preinst() {
215 + gnome2_icon_savelist
216 +}
217 +
218 +pkg_postinst() {
219 + fdo-mime_desktop_database_update
220 + gnome2_icon_cache_update
221 +
222 + enewgroup transmission
223 + enewuser transmission -1 -1 -1 transmission
224 +
225 + elog "If you use transmission-daemon, please, set 'rpc-username' and"
226 + elog "'rpc-password' (in plain text, transmission-daemon will hash it on"
227 + elog "start) in settings.json file located at /var/lib/transmission/config or"
228 + elog "any other appropriate config directory."
229 + elog
230 + elog "Since µTP is enabled by default, transmission needs large kernel buffers for"
231 + elog "the UDP socket. You can append following lines into /etc/sysctl.conf:"
232 + elog " net.core.rmem_max = 4194304"
233 + elog " net.core.wmem_max = 1048576"
234 + elog "and run sysctl -p"
235 +}
236 +
237 +pkg_postrm() {
238 + fdo-mime_desktop_database_update
239 + gnome2_icon_cache_update
240 +}