]> git.pld-linux.org Git - packages/libtorrent.git/blob - libtorrent.spec
- release 4 (by relup.sh)
[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.6
11 Release:        4
12 Epoch:          1
13 License:        GPL v2+
14 Group:          Libraries
15 Source0:        http://rtorrent.net/downloads/%{name}-%{version}.tar.gz
16 # Source0-md5:  66f18044432a62c006c75f6d0bb4d7dc
17 Patch0:         %{name}-client_list.patch
18 Patch1:         %{name}-build.patch
19 Patch2:         libtorrent-bencoded-error.patch
20 URL:            https://github.com/rakshasa/rtorrent/wiki
21 BuildRequires:  autoconf >= 2.50
22 BuildRequires:  automake
23 BuildRequires:  cppunit-devel >= 1.9.6
24 BuildRequires:  libstdc++-devel
25 BuildRequires:  libtool >= 2:2
26 BuildRequires:  openssl-devel >= 0.9.7d
27 BuildRequires:  pkgconfig
28 BuildRequires:  zlib-devel
29 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31 %description
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.
37
38 %description -l pl.UTF-8
39 LibTorrent to biblioteka BitTorrenta napisana w C++ dla Uniksa. Jest
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ę
43 select.
44
45 %package devel
46 Summary:        Development files for libtorrent
47 Summary(pl.UTF-8):      Pliki programistyczne libtorrent
48 Group:          Development/Libraries
49 Requires:       %{name} = %{epoch}:%{version}-%{release}
50 Requires:       libstdc++-devel
51 Requires:       openssl-devel >= 0.9.7d
52 Requires:       zlib-devel
53
54 %description devel
55 Development files for libtorrent.
56
57 %description devel -l pl.UTF-8
58 Pliki programistyczne libtorrent.
59
60 %package static
61 Summary:        Static libtorrent library
62 Summary(pl.UTF-8):      Statyczna biblioteka libtorrent
63 Group:          Development/Libraries
64 Requires:       %{name}-devel = %{epoch}:%{version}-%{release}
65
66 %description static
67 Static libtorrent library.
68
69 %description static -l pl.UTF-8
70 Statyczna biblioteka libtorrent.
71
72 %prep
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
78 %setup -q
79 %patch0 -p1
80 %patch1 -p1
81 %patch2 -p1
82
83 # force refresh
84 %{__rm} scripts/{libtool,lt*}.m4
85
86 %build
87 %{__libtoolize}
88 %{__aclocal} -I scripts
89 %{__autoconf}
90 %{__autoheader}
91 %{__automake}
92
93 %configure \
94         --%{?with_ipv6:en}%{!?with_ipv6:dis}able-ipv6 \
95         --%{?debug:en}%{!?debug:dis}able-debug \
96         %{?with_static_libs:--enable-static} \
97 %ifarch i386 i486
98         --disable-instrumentation
99 %endif
100
101 %{__make}
102
103 %install
104 rm -rf $RPM_BUILD_ROOT
105
106 %{__make} install \
107         DESTDIR=$RPM_BUILD_ROOT
108
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)
117 %doc AUTHORS README
118 %attr(755,root,root) %{_libdir}/libtorrent.so.*.*.*
119 %attr(755,root,root) %ghost %{_libdir}/libtorrent.so.19
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
128 %if %{with static_libs}
129 %files static
130 %defattr(644,root,root,755)
131 %{_libdir}/libtorrent.a
132 %endif
This page took 0.074637 seconds and 3 git commands to generate.