]>
Commit | Line | Data |
---|---|---|
375b25b5 KK |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without static_libs # don't build static library | |
e3c6d985 | 4 | %bcond_without ipv6 # disable IPv6 support |
375b25b5 | 5 | # |
f2ca030d | 6 | Summary: LibTorrent - a BitTorrent library written in C++ for Unix |
bd348243 | 7 | Summary(pl.UTF-8): LibTorrent - biblioteka BitTorrenta napisana w C++ dla Uniksa |
f2ca030d | 8 | Name: libtorrent |
017c7b50 | 9 | # keep stable line, see URL below |
55ec7f79 | 10 | Version: 0.13.6 |
69c25153 | 11 | Release: 4 |
84fe40de | 12 | Epoch: 1 |
c7190a9a | 13 | License: GPL v2+ |
f2ca030d | 14 | Group: Libraries |
55ec7f79 JB |
15 | Source0: http://rtorrent.net/downloads/%{name}-%{version}.tar.gz |
16 | # Source0-md5: 66f18044432a62c006c75f6d0bb4d7dc | |
f3547b0f | 17 | Patch0: %{name}-client_list.patch |
4d925a97 | 18 | Patch1: %{name}-build.patch |
42275ee1 | 19 | Patch2: libtorrent-bencoded-error.patch |
9e8c8320 | 20 | URL: https://github.com/rakshasa/rtorrent/wiki |
f9a933d6 | 21 | BuildRequires: autoconf >= 2.50 |
fd14c138 | 22 | BuildRequires: automake |
e175d55e | 23 | BuildRequires: cppunit-devel >= 1.9.6 |
ca0459ae JB |
24 | BuildRequires: libstdc++-devel |
25 | BuildRequires: libtool >= 2:2 | |
e4e1ab6e | 26 | BuildRequires: openssl-devel >= 0.9.7d |
f2ca030d | 27 | BuildRequires: pkgconfig |
55ec7f79 | 28 | BuildRequires: zlib-devel |
f2ca030d KK |
29 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
30 | ||
31 | %description | |
a7c7e499 ER |
32 | LibTorrent is a BitTorrent library written in C++ for *nix, with a |
33 | focus on high performance and good code. The library differentiates | |
34 | itself from other implementations by transfering directly from file | |
35 | pages to the network stack. On high-bandwidth connections it is able | |
36 | to seed at 3 times the speed of the official client. | |
f2ca030d | 37 | |
ac2d8d9c | 38 | %description -l pl.UTF-8 |
f6340f5a | 39 | LibTorrent to biblioteka BitTorrenta napisana w C++ dla Uniksa. Jest |
ac2d8d9c JR |
40 | zaprojektowana aby uniknąć nadmiarowego kopiowania buforów i danych, |
41 | będącego wadą większości (wszystkich?) innych implementacji | |
42 | BitTorrenta. Biblioteka jest jednowątkowa, klient obsługuje pętlę | |
f6340f5a JB |
43 | select. |
44 | ||
f2ca030d KK |
45 | %package devel |
46 | Summary: Development files for libtorrent | |
bd348243 | 47 | Summary(pl.UTF-8): Pliki programistyczne libtorrent |
f2ca030d | 48 | Group: Development/Libraries |
84fe40de | 49 | Requires: %{name} = %{epoch}:%{version}-%{release} |
ca0459ae | 50 | Requires: libstdc++-devel |
bae8c60c | 51 | Requires: openssl-devel >= 0.9.7d |
55ec7f79 | 52 | Requires: zlib-devel |
f2ca030d KK |
53 | |
54 | %description devel | |
55 | Development files for libtorrent. | |
56 | ||
ac2d8d9c | 57 | %description devel -l pl.UTF-8 |
f2ca030d KK |
58 | Pliki programistyczne libtorrent. |
59 | ||
60 | %package static | |
61 | Summary: Static libtorrent library | |
bd348243 | 62 | Summary(pl.UTF-8): Statyczna biblioteka libtorrent |
f2ca030d | 63 | Group: Development/Libraries |
ad866d2e | 64 | Requires: %{name}-devel = %{epoch}:%{version}-%{release} |
f2ca030d KK |
65 | |
66 | %description static | |
67 | Static libtorrent library. | |
68 | ||
ac2d8d9c | 69 | %description static -l pl.UTF-8 |
f2ca030d KK |
70 | Statyczna biblioteka libtorrent. |
71 | ||
72 | %prep | |
a97435eb ER |
73 | v=%{version}; IFS=.; set -- $v |
74 | if [ $(($2 % 2)) = 0 ]; then | |
75 | echo "WARNING Version %{version} is probably unstable, check it first!" | |
76 | exit 1 | |
77 | fi | |
f2ca030d | 78 | %setup -q |
f3547b0f | 79 | %patch0 -p1 |
4d925a97 | 80 | %patch1 -p1 |
42275ee1 | 81 | %patch2 -p1 |
f2ca030d | 82 | |
ca0459ae | 83 | # force refresh |
a189b12d | 84 | %{__rm} scripts/{libtool,lt*}.m4 |
f9a933d6 | 85 | |
f2ca030d | 86 | %build |
f9a933d6 | 87 | %{__libtoolize} |
c8eed48f PS |
88 | %{__aclocal} -I scripts |
89 | %{__autoconf} | |
f9a933d6 JB |
90 | %{__autoheader} |
91 | %{__automake} | |
c8eed48f | 92 | |
f2ca030d | 93 | %configure \ |
e3c6d985 | 94 | --%{?with_ipv6:en}%{!?with_ipv6:dis}able-ipv6 \ |
f2ca030d | 95 | --%{?debug:en}%{!?debug:dis}able-debug \ |
9e8c8320 | 96 | %{?with_static_libs:--enable-static} \ |
90230e93 AM |
97 | %ifarch i386 i486 |
98 | --disable-instrumentation | |
99 | %endif | |
c8eed48f | 100 | |
f2ca030d KK |
101 | %{__make} |
102 | ||
103 | %install | |
104 | rm -rf $RPM_BUILD_ROOT | |
105 | ||
106 | %{__make} install \ | |
107 | DESTDIR=$RPM_BUILD_ROOT | |
108 | ||
f2ca030d KK |
109 | %clean |
110 | rm -rf $RPM_BUILD_ROOT | |
111 | ||
112 | %post -p /sbin/ldconfig | |
113 | %postun -p /sbin/ldconfig | |
114 | ||
115 | %files | |
116 | %defattr(644,root,root,755) | |
e23f3e19 | 117 | %doc AUTHORS README |
f2ca030d | 118 | %attr(755,root,root) %{_libdir}/libtorrent.so.*.*.* |
55ec7f79 | 119 | %attr(755,root,root) %ghost %{_libdir}/libtorrent.so.19 |
f2ca030d KK |
120 | |
121 | %files devel | |
122 | %defattr(644,root,root,755) | |
123 | %attr(755,root,root) %{_libdir}/libtorrent.so | |
124 | %{_libdir}/libtorrent.la | |
125 | %{_includedir}/torrent | |
126 | %{_pkgconfigdir}/libtorrent.pc | |
127 | ||
375b25b5 | 128 | %if %{with static_libs} |
f2ca030d KK |
129 | %files static |
130 | %defattr(644,root,root,755) | |
131 | %{_libdir}/libtorrent.a | |
375b25b5 | 132 | %endif |