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