]>
Commit | Line | Data |
---|---|---|
00900554 | 1 | # |
a1d9536a | 2 | # Conditional build: |
7b5e04bd JP |
3 | %bcond_without gtk # without GTK GUI |
4 | %bcond_without qt # without Qt GUI | |
b04b9fcb | 5 | %bcond_without systemd # without systemd unit |
00900554 | 6 | %bcond_with verchange # changes client version identification to 2.42 |
45cd44dc | 7 | |
c72d551a JP |
8 | %define qtver 5.2 |
9 | ||
0f16bf9a | 10 | Summary: A versatile and multi-platform BitTorrent client |
f2dfe381 | 11 | Summary(hu.UTF-8): Egy sokoldalú és multiplatformos BitTorrent kliens |
bb59eb4f | 12 | Summary(pl.UTF-8): Wszechstronny i wieloplatformowy klient BitTorrenta |
905dacdd | 13 | Name: transmission |
c72d551a | 14 | Version: 3.00 |
35de15cb | 15 | Release: 2 |
0f16bf9a PZ |
16 | License: MIT |
17 | Group: Applications/Communications | |
f9a02be3 | 18 | Source0: https://github.com/transmission/transmission-releases/raw/master/%{name}-%{version}.tar.xz |
c72d551a | 19 | # Source0-md5: a23a32672b83c89b9b61e90408f53d98 |
9232dd57 PG |
20 | Source1: %{name}.sysconfig |
21 | Source2: %{name}.init | |
147f3fba | 22 | Patch0: %{name}-ckb_po.patch |
07b38397 | 23 | Patch2: %{name}-version.patch |
ec12ede2 | 24 | URL: http://transmissionbt.com/ |
e9d3e015 | 25 | BuildRequires: autoconf |
39ef82b2 | 26 | BuildRequires: automake >= 1:1.9 |
071083d3 | 27 | BuildRequires: curl-devel >= 7.16.3 |
9bafbf8d | 28 | BuildRequires: gettext-tools |
7b5e04bd | 29 | %if %{with gtk} |
d4984600 | 30 | BuildRequires: glib2-devel >= 1:2.32.0 |
5ea5fb34 | 31 | BuildRequires: gtk+3-devel >= 3.4.0 |
7b5e04bd | 32 | %endif |
0f16bf9a | 33 | BuildRequires: intltool >= 0.35.5 |
c3bb290c | 34 | BuildRequires: libevent-devel >= 2.0.10 |
c72d551a | 35 | BuildRequires: libnatpmp-devel |
f237c99d | 36 | BuildRequires: libstdc++-devel |
e9d3e015 | 37 | BuildRequires: libtool |
4c544984 | 38 | BuildRequires: lsb-release |
c72d551a | 39 | BuildRequires: miniupnpc-devel >= 1.7 |
07b38397 | 40 | BuildRequires: openssl-devel >= 0.9.7 |
0f16bf9a | 41 | BuildRequires: pkgconfig |
4c544984 | 42 | BuildRequires: rpmbuild(macros) >= 1.357 |
c80b5c00 | 43 | BuildRequires: systemd-devel |
05606945 | 44 | BuildRequires: tar >= 1:1.22 |
d8e696e8 | 45 | BuildRequires: util-linux |
4c544984 | 46 | BuildRequires: which |
071083d3 | 47 | BuildRequires: xfsprogs-devel |
05606945 | 48 | BuildRequires: xz |
07b38397 | 49 | BuildRequires: zlib-devel >= 1.2.3 |
7b5e04bd JP |
50 | %if %{with qt} |
51 | BuildRequires: Qt5Core-devel >= %{qtver} | |
52 | BuildRequires: Qt5DBus-devel >= %{qtver} | |
53 | BuildRequires: Qt5Gui-devel >= %{qtver} | |
54 | BuildRequires: Qt5Network-devel >= %{qtver} | |
55 | BuildRequires: Qt5Widgets-devel >= %{qtver} | |
56 | BuildRequires: qt5-build >= %{qtver} | |
57 | BuildRequires: qt5-qmake >= %{qtver} | |
58 | %endif | |
b4dc7e64 | 59 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
0f16bf9a | 60 | |
c6dfa0bb | 61 | %define _appdir %{_datadir}/%{name}/web |
62 | ||
0f16bf9a PZ |
63 | %description |
64 | Transmission has been built from the ground up to be a lightweight, | |
65 | yet powerful BitTorrent client. Its simple, intuitive interface is | |
66 | designed to integrate tightly with whatever computing environment you | |
67 | choose to use. Transmission strikes a balance between providing useful | |
68 | functionality without feature bloat. | |
69 | ||
f2dfe381 | 70 | %description -l hu.UTF-8 |
d8e696e8 | 71 | Transmission egy könnyűsúlyú, de mégis egy erőteljes BitTorrent |
72 | kliens. Egyszerű, intuitív felülete szorosan illeszkedik bármilyen | |
f2dfe381 ZU |
73 | számítógépes környezetbe, amit csak választasz. A Transmission célja |
74 | megtalálni a használható funkcionalitást lehetőségek áradata nélkül. | |
75 | ||
bb59eb4f JB |
76 | %description -l pl.UTF-8 |
77 | Transmission został stworzony od podstaw, aby być lekkim lecz mającym | |
78 | duże możliwości klientem BitTorrenta. Jego prosty, intuicyjny | |
79 | interfejs jest zaprojektowany spójnie z dowolnym środowiskiem wybranym | |
80 | przez użytkownika. Transmission stawia na równowagę zapewnienia | |
81 | przydatnej funkcjonalności bez nadmiaru opcji. | |
82 | ||
35de15cb JP |
83 | %package cli |
84 | Summary: Command line implementation for BitTorrent client | |
85 | Summary(pl.UTF-8): Implementacja w wierszu poleceń dla klienta BitTorrenta | |
86 | Group: Applications/Networking | |
87 | Requires: %{name}-common = %{version}-%{release} | |
88 | Requires: curl-libs >= 7.16.3 | |
89 | Requires: libevent >= 2.0.10 | |
90 | Requires: miniupnpc >= 1.7 | |
91 | Requires: openssl >= 0.9.7 | |
92 | Requires: zlib >= 1.2.3 | |
93 | ||
94 | %description cli | |
95 | Transmission has been built from the ground up to be a lightweight, | |
96 | yet powerful BitTorrent client. Its simple, intuitive interface is | |
97 | designed to integrate tightly with whatever computing environment you | |
98 | choose to use. Transmission strikes a balance between providing useful | |
99 | functionality without feature bloat. | |
100 | ||
101 | Command line implementation for BitTorrent client. | |
102 | ||
103 | %description cli -l hu.UTF-8 | |
104 | Transmission egy könnyűsúlyú, de mégis egy erőteljes BitTorrent | |
105 | kliens. Egyszerű, intuitív felülete szorosan illeszkedik bármilyen | |
106 | számítógépes környezetbe, amit csak választasz. A Transmission célja | |
107 | megtalálni a használható funkcionalitást lehetőségek áradata nélkül. | |
108 | ||
109 | %description cli -l pl.UTF-8 | |
110 | Transmission został stworzony od podstaw, aby być lekkim lecz mającym | |
111 | duże możliwości klientem BitTorrenta. Jego prosty, intuicyjny | |
112 | interfejs jest zaprojektowany spójnie z dowolnym środowiskiem wybranym | |
113 | przez użytkownika. Transmission stawia na równowagę zapewnienia | |
114 | przydatnej funkcjonalności bez nadmiaru opcji. | |
115 | ||
116 | Implementacja w wierszu poleceń dla klienta BitTorrenta. | |
117 | ||
118 | %package common | |
119 | Summary: Common files for Transmission BitTorrent client | |
120 | Summary(pl.UTF-8): Pliki wspólne dla klienta BitTorrenta Transmission | |
121 | Group: Applications/Networking | |
d42be15d | 122 | BuildArch: noarch |
35de15cb JP |
123 | |
124 | %description common | |
125 | Common files for Transmission BitTorrent client. | |
126 | ||
127 | %description common -l pl.UTF-8 | |
128 | Pliki wspólne dla klienta BitTorrenta Transmission. | |
129 | ||
130 | %package daemon | |
00900554 JB |
131 | Summary: Daemon package for BitTorrent client |
132 | Summary(pl.UTF-8): Pakiet demona dla klienta BitTorrenta | |
4c544984 | 133 | Group: Networking/Daemons |
35de15cb JP |
134 | Requires: %{name}-common = %{version}-%{release} |
135 | Requires: curl-libs >= 7.16.3 | |
136 | Requires: libevent >= 2.0.10 | |
137 | Requires: miniupnpc >= 1.7 | |
138 | Requires: openssl >= 0.9.7 | |
b04b9fcb | 139 | %{?with_systemd:Requires: systemd-units >= 38} |
35de15cb | 140 | Requires: zlib >= 1.2.3 |
6cdf40a0 JP |
141 | Provides: group(transmission) |
142 | Provides: user(transmission) | |
35de15cb JP |
143 | Obsoletes: Transmission <= 1.05 |
144 | Obsoletes: transmission < 3.00-2 | |
145 | Obsoletes: transmission-init < 3.00-2 | |
146 | ||
147 | %description daemon | |
148 | Transmission has been built from the ground up to be a lightweight, | |
149 | yet powerful BitTorrent client. Its simple, intuitive interface is | |
150 | designed to integrate tightly with whatever computing environment you | |
151 | choose to use. Transmission strikes a balance between providing useful | |
152 | functionality without feature bloat. | |
9232dd57 | 153 | |
00900554 JB |
154 | Daemon package for BitTorrent client. |
155 | ||
35de15cb JP |
156 | %description daemon -l hu.UTF-8 |
157 | Transmission egy könnyűsúlyú, de mégis egy erőteljes BitTorrent | |
158 | kliens. Egyszerű, intuitív felülete szorosan illeszkedik bármilyen | |
159 | számítógépes környezetbe, amit csak választasz. A Transmission célja | |
160 | megtalálni a használható funkcionalitást lehetőségek áradata nélkül. | |
161 | ||
162 | %description daemon -l pl.UTF-8 | |
163 | Transmission został stworzony od podstaw, aby być lekkim lecz mającym | |
164 | duże możliwości klientem BitTorrenta. Jego prosty, intuicyjny | |
165 | interfejs jest zaprojektowany spójnie z dowolnym środowiskiem wybranym | |
166 | przez użytkownika. Transmission stawia na równowagę zapewnienia | |
167 | przydatnej funkcjonalności bez nadmiaru opcji. | |
168 | ||
00900554 | 169 | Pakiet demona dla klienta BitTorrenta. |
9232dd57 | 170 | |
f237c99d KK |
171 | %package gui |
172 | Summary: A versatile and multi-platform BitTorrent client | |
173 | Summary(pl.UTF-8): Wszechstronny i wieloplatformowy klient BitTorrenta | |
4c544984 | 174 | Group: X11/Applications/Networking |
a29d91d7 | 175 | Requires(post,postun): gtk-update-icon-cache |
4c544984 | 176 | Requires(post,postun): hicolor-icon-theme |
35de15cb JP |
177 | Requires: %{name}-common = %{version}-%{release} |
178 | Requires: curl-libs >= 7.16.3 | |
d4984600 | 179 | Requires: glib2 >= 1:2.32.0 |
c72d551a JP |
180 | Requires: gtk+3 >= 3.4.0 |
181 | Requires: libcanberra-gtk3 | |
35de15cb JP |
182 | Requires: libevent >= 2.0.10 |
183 | Requires: miniupnpc >= 1.7 | |
184 | Requires: openssl >= 0.9.7 | |
185 | Requires: zlib >= 1.2.3 | |
f237c99d KK |
186 | |
187 | %description gui | |
188 | Transmission has been built from the ground up to be a lightweight, | |
189 | yet powerful BitTorrent client. Its simple, intuitive interface is | |
190 | designed to integrate tightly with whatever computing environment you | |
191 | choose to use. Transmission strikes a balance between providing useful | |
192 | functionality without feature bloat. | |
193 | ||
194 | %description gui -l hu.UTF-8 | |
195 | Transmission egy könnyűsúlyú de mégis egy erőteljes BitTorrent kliens. | |
196 | Egyszerű, intuitív felülete szorosan illeszkedik bármilyen | |
197 | számítógépes környezetbe, amit csak választasz. A Transmission célja | |
198 | megtalálni a használható funkcionalitást lehetőségek áradata nélkül. | |
199 | ||
200 | %description gui -l pl.UTF-8 | |
201 | Transmission został stworzony od podstaw, aby być lekkim lecz mającym | |
202 | duże możliwości klientem BitTorrenta. Jego prosty, intuicyjny | |
203 | interfejs jest zaprojektowany spójnie z dowolnym środowiskiem wybranym | |
204 | przez użytkownika. Transmission stawia na równowagę zapewnienia | |
205 | przydatnej funkcjonalności bez nadmiaru opcji. | |
206 | ||
820ff2df | 207 | %package gui-qt |
00900554 JB |
208 | Summary: A GUI to Transmission based on Qt 5 |
209 | Summary(pl.UTF-8): Graficzny interfejs do Transmission oparty na Qt 5 | |
4c544984 | 210 | Group: X11/Applications/Networking |
35de15cb | 211 | Requires: %{name}-common = %{version}-%{release} |
c72d551a JP |
212 | Requires: Qt5Core >= %{qtver} |
213 | Requires: Qt5DBus >= %{qtver} | |
214 | Requires: Qt5Gui >= %{qtver} | |
215 | Requires: Qt5Network >= %{qtver} | |
216 | Requires: Qt5Widgets >= %{qtver} | |
35de15cb | 217 | Requires: curl-libs >= 7.16.3 |
c72d551a | 218 | Requires: libcanberra-gtk3 |
35de15cb JP |
219 | Requires: libevent >= 2.0.10 |
220 | Requires: miniupnpc >= 1.7 | |
221 | Requires: openssl >= 0.9.7 | |
222 | Requires: zlib >= 1.2.3 | |
820ff2df ZU |
223 | |
224 | %description gui-qt | |
00900554 JB |
225 | A GUI to Transmission based on Qt 5. |
226 | ||
227 | %description gui-qt -l pl.UTF-8 | |
228 | Graficzny interfejs do Transmission oparty na Qt 5. | |
820ff2df | 229 | |
35de15cb JP |
230 | %package utils |
231 | Summary: Utilities for Transmission BitTorrent client | |
232 | Summary(pl.UTF-8): Narzędzia dla klienta BitTorrenta Transmission | |
233 | Group: Applications/Networking | |
234 | ||
235 | %description utils | |
236 | Utilities for Transmission BitTorrent client. | |
237 | ||
238 | %description utils -l pl.UTF-8 | |
239 | Narzędzia dla klienta BitTorrenta Transmission. | |
240 | ||
0f16bf9a | 241 | %prep |
8f94c0ac | 242 | %setup -q |
147f3fba | 243 | %patch0 -p1 |
45cd44dc | 244 | %if %{with verchange} |
07b38397 | 245 | %patch2 -p1 |
45cd44dc KK |
246 | ./update-version-h.sh |
247 | %endif | |
248 | ||
ec12ede2 | 249 | %{__rm} po/ckb.po |
5a14d6ed | 250 | %{__sed} -i 's/\(^CONFIG.*\)\( debug\)/\1/' qt/qtr.pro |
0f16bf9a PZ |
251 | |
252 | %build | |
39ef82b2 | 253 | %configure \ |
7b5e04bd | 254 | %{__with_without gtk} \ |
07b38397 | 255 | --disable-silent-rules \ |
c72d551a JP |
256 | --enable-cli \ |
257 | --enable-external-natpmp | |
0f16bf9a PZ |
258 | %{__make} |
259 | ||
7b5e04bd | 260 | %if %{with qt} |
820ff2df | 261 | cd qt |
b806da71 | 262 | qmake-qt5 |
820ff2df | 263 | %{__make} |
2b837bd5 | 264 | cd - |
7b5e04bd | 265 | %endif |
820ff2df | 266 | |
0f16bf9a PZ |
267 | %install |
268 | rm -rf $RPM_BUILD_ROOT | |
4c544984 | 269 | install -d $RPM_BUILD_ROOT/etc/{sysconfig,rc.d/init.d} \ |
270 | $RPM_BUILD_ROOT%{_sysconfdir}/%{name} \ | |
b04b9fcb JP |
271 | $RPM_BUILD_ROOT/var/lib/%{name} \ |
272 | %{?with_systemd:$RPM_BUILD_ROOT%{systemdunitdir}} | |
0f16bf9a PZ |
273 | |
274 | %{__make} install \ | |
275 | DESTDIR=$RPM_BUILD_ROOT | |
276 | ||
9232dd57 | 277 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/sysconfig/%{name} |
61330340 | 278 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name} |
9232dd57 | 279 | |
b04b9fcb JP |
280 | %if %{with systemd} |
281 | cp -p daemon/transmission-daemon.service $RPM_BUILD_ROOT%{systemdunitdir} | |
282 | %endif | |
283 | ||
7b5e04bd | 284 | %if %{with qt} |
67a32c48 KK |
285 | install qt/transmission-qt $RPM_BUILD_ROOT%{_bindir} |
286 | install qt/transmission-qt.desktop $RPM_BUILD_ROOT%{_desktopdir} | |
287 | install gtk/transmission.png $RPM_BUILD_ROOT%{_pixmapsdir}/transmission-qt.png | |
7b5e04bd JP |
288 | %endif |
289 | %if %{with gtk} | |
c72d551a | 290 | %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/jbo |
65730317 ZU |
291 | |
292 | %find_lang %{name} --all-name --with-gnome | |
7b5e04bd | 293 | %endif |
ec12ede2 | 294 | |
295 | # copy of GPLv2 not needed | |
39ef82b2 | 296 | %{__rm} $RPM_BUILD_ROOT%{_appdir}/LICENSE |
ec12ede2 | 297 | |
0f16bf9a PZ |
298 | %clean |
299 | rm -rf $RPM_BUILD_ROOT | |
300 | ||
6cdf40a0 JP |
301 | %triggerpostun daemon -- transmission < 3.00-2 |
302 | if [ -d /var/lib/transmission ] ; then | |
303 | chown -R transmission:transmission /var/lib/transmission || : | |
304 | fi | |
305 | ||
306 | %pre daemon | |
307 | %groupadd -g 339 transmission | |
308 | %useradd -u 339 -r -d /var/lib/transmission -s /bin/false -c "Transmission user" -g transmission transmission | |
309 | ||
35de15cb | 310 | %post daemon |
9232dd57 PG |
311 | /sbin/chkconfig --add transmission |
312 | %service transmission restart | |
b04b9fcb | 313 | %{?with_systemd:%systemd_post transmission-daemon.service} |
9232dd57 | 314 | |
35de15cb | 315 | %preun daemon |
9232dd57 PG |
316 | if [ "$1" = "0" ]; then |
317 | %service transmission stop | |
318 | /sbin/chkconfig --del transmission | |
319 | fi | |
b04b9fcb JP |
320 | %{?with_systemd:%systemd_preun transmission-daemon.service} |
321 | ||
322 | %postun daemon | |
6cdf40a0 JP |
323 | if [ "$1" = "0" ]; then |
324 | %userremove transmission | |
325 | %groupremove transmission | |
326 | fi | |
b04b9fcb | 327 | %{?with_systemd:%systemd_reload} |
9232dd57 | 328 | |
f237c99d | 329 | %post gui |
0f16bf9a | 330 | %update_desktop_database_post |
e65cafbb | 331 | %update_icon_cache hicolor |
0f16bf9a | 332 | |
f237c99d | 333 | %postun gui |
0f16bf9a | 334 | %update_desktop_database_postun |
e65cafbb | 335 | %update_icon_cache hicolor |
0f16bf9a | 336 | |
35de15cb | 337 | %files cli |
0f16bf9a | 338 | %defattr(644,root,root,755) |
fccbf9d7 | 339 | %attr(755,root,root) %{_bindir}/transmission-cli |
fccbf9d7 | 340 | %{_mandir}/man1/transmission-cli.1* |
35de15cb JP |
341 | |
342 | %files common | |
343 | %defattr(644,root,root,755) | |
344 | %doc AUTHORS NEWS.md README.md | |
147f3fba | 345 | %dir %{_datadir}/%{name} |
c4a49d1e | 346 | %dir %{_appdir} |
c6dfa0bb | 347 | %{_appdir}/images |
348 | %{_appdir}/javascript | |
39ef82b2 | 349 | %{_appdir}/style |
c6dfa0bb | 350 | %{_appdir}/index.html |
f237c99d | 351 | |
35de15cb | 352 | %files daemon |
9232dd57 | 353 | %defattr(644,root,root,755) |
4c544984 | 354 | %attr(751,root,daemon) %dir %{_sysconfdir}/%{name} |
9232dd57 | 355 | %attr(640,root,daemon) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name} |
61330340 | 356 | %attr(754,root,root) /etc/rc.d/init.d/%{name} |
35de15cb | 357 | %attr(755,root,root) %{_bindir}/transmission-daemon |
b04b9fcb | 358 | %{?with_systemd:%{systemdunitdir}/transmission-daemon.service} |
35de15cb | 359 | %{_mandir}/man1/transmission-daemon.1* |
6cdf40a0 | 360 | %attr(750,transmission,transmission) %dir /var/lib/%{name} |
9232dd57 | 361 | |
7b5e04bd | 362 | %if %{with gtk} |
b911b3bd | 363 | %files gui -f %{name}.lang |
c1ca1d17 | 364 | %defattr(644,root,root,755) |
fccbf9d7 CM |
365 | %attr(755,root,root) %{_bindir}/transmission-gtk |
366 | %{_mandir}/man1/transmission-gtk.1* | |
367 | %{_desktopdir}/transmission-gtk.desktop | |
f237c99d | 368 | %{_pixmapsdir}/transmission.png |
f237c99d | 369 | %{_iconsdir}/hicolor/*/apps/transmission.svg |
c72d551a | 370 | %{_datadir}/appdata/transmission-gtk.appdata.xml |
7b5e04bd | 371 | %endif |
820ff2df | 372 | |
7b5e04bd | 373 | %if %{with qt} |
820ff2df ZU |
374 | %files gui-qt |
375 | %defattr(644,root,root,755) | |
67a32c48 KK |
376 | %attr(755,root,root) %{_bindir}/transmission-qt |
377 | %{_desktopdir}/transmission-qt.desktop | |
378 | %{_pixmapsdir}/transmission-qt.png | |
7b5e04bd | 379 | %endif |
35de15cb JP |
380 | |
381 | %files utils | |
382 | %defattr(644,root,root,755) | |
383 | %attr(755,root,root) %{_bindir}/transmission-create | |
384 | %attr(755,root,root) %{_bindir}/transmission-edit | |
385 | %attr(755,root,root) %{_bindir}/transmission-remote | |
386 | %attr(755,root,root) %{_bindir}/transmission-show | |
387 | %{_mandir}/man1/transmission-create.1* | |
388 | %{_mandir}/man1/transmission-edit.1* | |
389 | %{_mandir}/man1/transmission-remote.1* | |
390 | %{_mandir}/man1/transmission-show.1* |