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