]>
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 | |
00900554 | 5 | %bcond_with verchange # changes client version identification to 2.42 |
45cd44dc | 6 | |
c72d551a JP |
7 | %define qtver 5.2 |
8 | ||
0f16bf9a | 9 | Summary: A versatile and multi-platform BitTorrent client |
f2dfe381 | 10 | Summary(hu.UTF-8): Egy sokoldalú és multiplatformos BitTorrent kliens |
bb59eb4f | 11 | Summary(pl.UTF-8): Wszechstronny i wieloplatformowy klient BitTorrenta |
905dacdd | 12 | Name: transmission |
c72d551a JP |
13 | Version: 3.00 |
14 | Release: 1 | |
0f16bf9a PZ |
15 | License: MIT |
16 | Group: Applications/Communications | |
f9a02be3 | 17 | Source0: https://github.com/transmission/transmission-releases/raw/master/%{name}-%{version}.tar.xz |
c72d551a | 18 | # Source0-md5: a23a32672b83c89b9b61e90408f53d98 |
9232dd57 PG |
19 | Source1: %{name}.sysconfig |
20 | Source2: %{name}.init | |
147f3fba | 21 | Patch0: %{name}-ckb_po.patch |
07b38397 | 22 | Patch2: %{name}-version.patch |
ec12ede2 | 23 | URL: http://transmissionbt.com/ |
e9d3e015 | 24 | BuildRequires: autoconf |
39ef82b2 | 25 | BuildRequires: automake >= 1:1.9 |
071083d3 | 26 | BuildRequires: curl-devel >= 7.16.3 |
9bafbf8d | 27 | BuildRequires: gettext-tools |
7b5e04bd | 28 | %if %{with gtk} |
d4984600 | 29 | BuildRequires: glib2-devel >= 1:2.32.0 |
5ea5fb34 | 30 | BuildRequires: gtk+3-devel >= 3.4.0 |
7b5e04bd | 31 | %endif |
0f16bf9a | 32 | BuildRequires: intltool >= 0.35.5 |
c3bb290c | 33 | BuildRequires: libevent-devel >= 2.0.10 |
c72d551a | 34 | BuildRequires: libnatpmp-devel |
f237c99d | 35 | BuildRequires: libstdc++-devel |
e9d3e015 | 36 | BuildRequires: libtool |
4c544984 | 37 | BuildRequires: lsb-release |
c72d551a | 38 | BuildRequires: miniupnpc-devel >= 1.7 |
07b38397 | 39 | BuildRequires: openssl-devel >= 0.9.7 |
0f16bf9a | 40 | BuildRequires: pkgconfig |
4c544984 | 41 | BuildRequires: rpmbuild(macros) >= 1.357 |
c80b5c00 | 42 | BuildRequires: systemd-devel |
05606945 | 43 | BuildRequires: tar >= 1:1.22 |
d8e696e8 | 44 | BuildRequires: util-linux |
4c544984 | 45 | BuildRequires: which |
071083d3 | 46 | BuildRequires: xfsprogs-devel |
05606945 | 47 | BuildRequires: xz |
07b38397 | 48 | BuildRequires: zlib-devel >= 1.2.3 |
7b5e04bd JP |
49 | %if %{with qt} |
50 | BuildRequires: Qt5Core-devel >= %{qtver} | |
51 | BuildRequires: Qt5DBus-devel >= %{qtver} | |
52 | BuildRequires: Qt5Gui-devel >= %{qtver} | |
53 | BuildRequires: Qt5Network-devel >= %{qtver} | |
54 | BuildRequires: Qt5Widgets-devel >= %{qtver} | |
55 | BuildRequires: qt5-build >= %{qtver} | |
56 | BuildRequires: qt5-qmake >= %{qtver} | |
57 | %endif | |
c72d551a JP |
58 | Requires: curl-libs >= 7.16.3 |
59 | Requires: libevent >= 2.0.10 | |
60 | Requires: miniupnpc >= 1.7 | |
61 | Requires: openssl >= 0.9.7 | |
62 | Requires: zlib >= 1.2.3 | |
f237c99d | 63 | Obsoletes: Transmission <= 1.05 |
b4dc7e64 | 64 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
0f16bf9a | 65 | |
c6dfa0bb | 66 | %define _appdir %{_datadir}/%{name}/web |
67 | ||
0f16bf9a PZ |
68 | %description |
69 | Transmission has been built from the ground up to be a lightweight, | |
70 | yet powerful BitTorrent client. Its simple, intuitive interface is | |
71 | designed to integrate tightly with whatever computing environment you | |
72 | choose to use. Transmission strikes a balance between providing useful | |
73 | functionality without feature bloat. | |
74 | ||
f2dfe381 | 75 | %description -l hu.UTF-8 |
d8e696e8 | 76 | Transmission egy könnyűsúlyú, de mégis egy erőteljes BitTorrent |
77 | kliens. Egyszerű, intuitív felülete szorosan illeszkedik bármilyen | |
f2dfe381 ZU |
78 | számítógépes környezetbe, amit csak választasz. A Transmission célja |
79 | megtalálni a használható funkcionalitást lehetőségek áradata nélkül. | |
80 | ||
bb59eb4f JB |
81 | %description -l pl.UTF-8 |
82 | Transmission został stworzony od podstaw, aby być lekkim lecz mającym | |
83 | duże możliwości klientem BitTorrenta. Jego prosty, intuicyjny | |
84 | interfejs jest zaprojektowany spójnie z dowolnym środowiskiem wybranym | |
85 | przez użytkownika. Transmission stawia na równowagę zapewnienia | |
86 | przydatnej funkcjonalności bez nadmiaru opcji. | |
87 | ||
9232dd57 | 88 | %package init |
00900554 JB |
89 | Summary: Daemon package for BitTorrent client |
90 | Summary(pl.UTF-8): Pakiet demona dla klienta BitTorrenta | |
4c544984 | 91 | Group: Networking/Daemons |
9232dd57 PG |
92 | Requires: %{name} = %{version}-%{release} |
93 | ||
94 | %description init | |
00900554 JB |
95 | Daemon package for BitTorrent client. |
96 | ||
97 | %description init -l pl.UTF-8 | |
98 | Pakiet demona dla klienta BitTorrenta. | |
9232dd57 | 99 | |
f237c99d KK |
100 | %package gui |
101 | Summary: A versatile and multi-platform BitTorrent client | |
102 | Summary(pl.UTF-8): Wszechstronny i wieloplatformowy klient BitTorrenta | |
4c544984 | 103 | Group: X11/Applications/Networking |
a29d91d7 | 104 | Requires(post,postun): gtk-update-icon-cache |
4c544984 | 105 | Requires(post,postun): hicolor-icon-theme |
30875bc9 | 106 | Requires: %{name} = %{version}-%{release} |
d4984600 | 107 | Requires: glib2 >= 1:2.32.0 |
c72d551a JP |
108 | Requires: gtk+3 >= 3.4.0 |
109 | Requires: libcanberra-gtk3 | |
f237c99d KK |
110 | |
111 | %description gui | |
112 | Transmission has been built from the ground up to be a lightweight, | |
113 | yet powerful BitTorrent client. Its simple, intuitive interface is | |
114 | designed to integrate tightly with whatever computing environment you | |
115 | choose to use. Transmission strikes a balance between providing useful | |
116 | functionality without feature bloat. | |
117 | ||
118 | %description gui -l hu.UTF-8 | |
119 | Transmission egy könnyűsúlyú de mégis egy erőteljes BitTorrent kliens. | |
120 | Egyszerű, intuitív felülete szorosan illeszkedik bármilyen | |
121 | számítógépes környezetbe, amit csak választasz. A Transmission célja | |
122 | megtalálni a használható funkcionalitást lehetőségek áradata nélkül. | |
123 | ||
124 | %description gui -l pl.UTF-8 | |
125 | Transmission został stworzony od podstaw, aby być lekkim lecz mającym | |
126 | duże możliwości klientem BitTorrenta. Jego prosty, intuicyjny | |
127 | interfejs jest zaprojektowany spójnie z dowolnym środowiskiem wybranym | |
128 | przez użytkownika. Transmission stawia na równowagę zapewnienia | |
129 | przydatnej funkcjonalności bez nadmiaru opcji. | |
130 | ||
820ff2df | 131 | %package gui-qt |
00900554 JB |
132 | Summary: A GUI to Transmission based on Qt 5 |
133 | Summary(pl.UTF-8): Graficzny interfejs do Transmission oparty na Qt 5 | |
4c544984 | 134 | Group: X11/Applications/Networking |
071083d3 | 135 | # doesn't require base |
c72d551a JP |
136 | Requires: Qt5Core >= %{qtver} |
137 | Requires: Qt5DBus >= %{qtver} | |
138 | Requires: Qt5Gui >= %{qtver} | |
139 | Requires: Qt5Network >= %{qtver} | |
140 | Requires: Qt5Widgets >= %{qtver} | |
141 | Requires: libcanberra-gtk3 | |
820ff2df ZU |
142 | |
143 | %description gui-qt | |
00900554 JB |
144 | A GUI to Transmission based on Qt 5. |
145 | ||
146 | %description gui-qt -l pl.UTF-8 | |
147 | Graficzny interfejs do Transmission oparty na Qt 5. | |
820ff2df | 148 | |
0f16bf9a | 149 | %prep |
4c544984 | 150 | %setup -qc |
00900554 | 151 | %{__mv} %{name}-%{version}/* . |
147f3fba | 152 | %patch0 -p1 |
45cd44dc | 153 | %if %{with verchange} |
07b38397 | 154 | %patch2 -p1 |
45cd44dc KK |
155 | ./update-version-h.sh |
156 | %endif | |
157 | ||
ec12ede2 | 158 | %{__rm} po/ckb.po |
5a14d6ed | 159 | %{__sed} -i 's/\(^CONFIG.*\)\( debug\)/\1/' qt/qtr.pro |
0f16bf9a PZ |
160 | |
161 | %build | |
39ef82b2 | 162 | %configure \ |
7b5e04bd | 163 | %{__with_without gtk} \ |
07b38397 | 164 | --disable-silent-rules \ |
c72d551a JP |
165 | --enable-cli \ |
166 | --enable-external-natpmp | |
0f16bf9a PZ |
167 | %{__make} |
168 | ||
7b5e04bd | 169 | %if %{with qt} |
820ff2df | 170 | cd qt |
b806da71 | 171 | qmake-qt5 |
820ff2df | 172 | %{__make} |
2b837bd5 | 173 | cd - |
7b5e04bd | 174 | %endif |
820ff2df | 175 | |
0f16bf9a PZ |
176 | %install |
177 | rm -rf $RPM_BUILD_ROOT | |
4c544984 | 178 | install -d $RPM_BUILD_ROOT/etc/{sysconfig,rc.d/init.d} \ |
179 | $RPM_BUILD_ROOT%{_sysconfdir}/%{name} \ | |
9232dd57 | 180 | $RPM_BUILD_ROOT/var/lib/%{name} |
0f16bf9a PZ |
181 | |
182 | %{__make} install \ | |
183 | DESTDIR=$RPM_BUILD_ROOT | |
184 | ||
9232dd57 | 185 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/sysconfig/%{name} |
61330340 | 186 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name} |
9232dd57 | 187 | |
7b5e04bd | 188 | %if %{with qt} |
67a32c48 KK |
189 | install qt/transmission-qt $RPM_BUILD_ROOT%{_bindir} |
190 | install qt/transmission-qt.desktop $RPM_BUILD_ROOT%{_desktopdir} | |
191 | install gtk/transmission.png $RPM_BUILD_ROOT%{_pixmapsdir}/transmission-qt.png | |
7b5e04bd JP |
192 | %endif |
193 | %if %{with gtk} | |
c72d551a | 194 | %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/jbo |
65730317 ZU |
195 | |
196 | %find_lang %{name} --all-name --with-gnome | |
7b5e04bd | 197 | %endif |
ec12ede2 | 198 | |
199 | # copy of GPLv2 not needed | |
39ef82b2 | 200 | %{__rm} $RPM_BUILD_ROOT%{_appdir}/LICENSE |
ec12ede2 | 201 | |
0f16bf9a PZ |
202 | %clean |
203 | rm -rf $RPM_BUILD_ROOT | |
204 | ||
9232dd57 PG |
205 | %post init |
206 | /sbin/chkconfig --add transmission | |
207 | %service transmission restart | |
208 | ||
209 | %preun init | |
210 | if [ "$1" = "0" ]; then | |
211 | %service transmission stop | |
212 | /sbin/chkconfig --del transmission | |
213 | fi | |
214 | ||
f237c99d | 215 | %post gui |
0f16bf9a | 216 | %update_desktop_database_post |
e65cafbb | 217 | %update_icon_cache hicolor |
0f16bf9a | 218 | |
f237c99d | 219 | %postun gui |
0f16bf9a | 220 | %update_desktop_database_postun |
e65cafbb | 221 | %update_icon_cache hicolor |
0f16bf9a | 222 | |
7b5e04bd | 223 | %files %{?with_gtk:-f %{name}.lang} |
0f16bf9a | 224 | %defattr(644,root,root,755) |
c72d551a | 225 | %doc AUTHORS NEWS.md README.md |
fccbf9d7 CM |
226 | %attr(755,root,root) %{_bindir}/transmission-cli |
227 | %attr(755,root,root) %{_bindir}/transmission-create | |
09c73228 | 228 | %attr(755,root,root) %{_bindir}/transmission-daemon |
fccbf9d7 | 229 | %attr(755,root,root) %{_bindir}/transmission-edit |
09c73228 | 230 | %attr(755,root,root) %{_bindir}/transmission-remote |
fccbf9d7 CM |
231 | %attr(755,root,root) %{_bindir}/transmission-show |
232 | %{_mandir}/man1/transmission-cli.1* | |
233 | %{_mandir}/man1/transmission-create.1* | |
5de6d863 | 234 | %{_mandir}/man1/transmission-daemon.1* |
fccbf9d7 | 235 | %{_mandir}/man1/transmission-edit.1* |
5de6d863 | 236 | %{_mandir}/man1/transmission-remote.1* |
fccbf9d7 | 237 | %{_mandir}/man1/transmission-show.1* |
147f3fba | 238 | %dir %{_datadir}/%{name} |
c4a49d1e | 239 | %dir %{_appdir} |
c6dfa0bb | 240 | %{_appdir}/images |
241 | %{_appdir}/javascript | |
39ef82b2 | 242 | %{_appdir}/style |
c6dfa0bb | 243 | %{_appdir}/index.html |
f237c99d | 244 | |
9232dd57 PG |
245 | %files init |
246 | %defattr(644,root,root,755) | |
4c544984 | 247 | %attr(751,root,daemon) %dir %{_sysconfdir}/%{name} |
248 | #%attr(640,root,daemon) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/* | |
9232dd57 | 249 | %attr(640,root,daemon) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name} |
61330340 | 250 | %attr(754,root,root) /etc/rc.d/init.d/%{name} |
9232dd57 PG |
251 | %attr(750,daemon,root) %dir /var/lib/%{name} |
252 | ||
7b5e04bd | 253 | %if %{with gtk} |
f237c99d | 254 | %files gui |
c1ca1d17 | 255 | %defattr(644,root,root,755) |
fccbf9d7 CM |
256 | %attr(755,root,root) %{_bindir}/transmission-gtk |
257 | %{_mandir}/man1/transmission-gtk.1* | |
258 | %{_desktopdir}/transmission-gtk.desktop | |
f237c99d | 259 | %{_pixmapsdir}/transmission.png |
f237c99d | 260 | %{_iconsdir}/hicolor/*/apps/transmission.svg |
c72d551a | 261 | %{_datadir}/appdata/transmission-gtk.appdata.xml |
7b5e04bd | 262 | %endif |
820ff2df | 263 | |
7b5e04bd | 264 | %if %{with qt} |
820ff2df ZU |
265 | %files gui-qt |
266 | %defattr(644,root,root,755) | |
67a32c48 KK |
267 | %attr(755,root,root) %{_bindir}/transmission-qt |
268 | %{_desktopdir}/transmission-qt.desktop | |
269 | %{_pixmapsdir}/transmission-qt.png | |
7b5e04bd | 270 | %endif |