2011-04-11 03:07:13 +00:00
|
|
|
#
|
|
|
|
# spec file for package libtorrent-rasterbar
|
|
|
|
#
|
2015-02-20 11:32:16 +00:00
|
|
|
# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2011-04-11 03:07:13 +00:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
2011-12-09 15:38:42 +00:00
|
|
|
|
2013-01-18 14:24:08 +00:00
|
|
|
%define _soname 7
|
2011-06-07 15:23:03 +00:00
|
|
|
# for setting those bcond_with* configs see
|
|
|
|
# http://lizards.opensuse.org/2008/09/12/conditional-features-aka-use-flags/
|
|
|
|
# optionally build with examples
|
|
|
|
%bcond_with examples
|
2011-04-11 03:07:13 +00:00
|
|
|
|
|
|
|
Name: libtorrent-rasterbar
|
2015-02-20 11:32:16 +00:00
|
|
|
Version: 0.16.19
|
2011-12-09 09:06:02 +00:00
|
|
|
Release: 0
|
2011-04-11 03:07:13 +00:00
|
|
|
Summary: Libtorrent is a C++ implementation of the BitTorrent protocol
|
2011-12-09 09:06:02 +00:00
|
|
|
License: BSD-3-Clause
|
2011-04-11 03:07:13 +00:00
|
|
|
Group: Development/Libraries/C and C++
|
2012-01-24 18:41:32 +00:00
|
|
|
Url: http://www.rasterbar.com/products/libtorrent/
|
2014-03-30 17:13:59 +00:00
|
|
|
Source: http://downloads.sourceforge.net/project/libtorrent/libtorrent/%{name}-%{version}.tar.gz
|
2011-04-11 03:07:13 +00:00
|
|
|
BuildRequires: boost-devel >= 1.36
|
|
|
|
BuildRequires: gcc-c++
|
|
|
|
BuildRequires: libGeoIP-devel
|
2013-02-21 16:32:52 +00:00
|
|
|
BuildRequires: openssl-devel
|
2011-04-11 03:07:13 +00:00
|
|
|
BuildRequires: pkg-config
|
2013-02-21 16:32:52 +00:00
|
|
|
BuildRequires: python-devel
|
2011-04-11 03:07:13 +00:00
|
|
|
BuildRequires: pkgconfig(openssl)
|
|
|
|
BuildRequires: pkgconfig(python)
|
|
|
|
BuildRequires: pkgconfig(zlib)
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
|
|
|
|
%description
|
2015-02-20 11:32:16 +00:00
|
|
|
libtorrent is a C++ library that aims to be a good alternative to all the other
|
|
|
|
bittorrent implementations around. It is a library and not a full featured client,
|
|
|
|
although it comes with a working example client.
|
2011-04-11 03:07:13 +00:00
|
|
|
|
|
|
|
The main goals of libtorrent are:
|
|
|
|
* to be cpu efficient
|
|
|
|
* to be memory efficient
|
|
|
|
* to be very easy to use
|
|
|
|
|
|
|
|
This package holds the sample client and example files for libtorrent-rasterbar.
|
|
|
|
|
|
|
|
%package -n %{name}%{_soname}
|
|
|
|
Summary: Libtorrent is a C++ implementation of the BitTorrent protocol
|
|
|
|
Group: System/Libraries
|
|
|
|
|
|
|
|
%description -n %{name}%{_soname}
|
2015-02-20 11:32:16 +00:00
|
|
|
libtorrent is a C++ library that aims to be a good alternative to all the other
|
|
|
|
bittorrent implementations around. It is a library and not a full featured client,
|
|
|
|
although it comes with a working example client.
|
2011-04-11 03:07:13 +00:00
|
|
|
|
|
|
|
The main goals of libtorrent are:
|
|
|
|
* to be cpu efficient
|
|
|
|
* to be memory efficient
|
|
|
|
* to be very easy to use
|
|
|
|
|
|
|
|
%package -n python-%{name}
|
|
|
|
Summary: Python Bindings for libtorrent-rasterbar
|
|
|
|
Group: Development/Libraries/Python
|
|
|
|
Requires: python >= %{py_ver}
|
|
|
|
|
|
|
|
%description -n python-libtorrent-rasterbar
|
|
|
|
Python Bindings for package libtorrent-rasterbar.
|
|
|
|
|
2011-06-07 15:23:03 +00:00
|
|
|
%if %{with examples}
|
2011-06-22 08:47:57 +00:00
|
|
|
|
2011-06-07 15:23:03 +00:00
|
|
|
%package -n %{name}-tools
|
|
|
|
Summary: Example tools from libtorrent-rasterbar
|
|
|
|
Group: Development/Libraries/C and C++
|
2011-06-22 08:47:57 +00:00
|
|
|
|
2011-06-07 15:23:03 +00:00
|
|
|
%description -n %{name}-tools
|
|
|
|
Example tools from the libtorrent-rasterbar package.
|
|
|
|
%endif
|
|
|
|
|
2011-04-11 03:07:13 +00:00
|
|
|
%package devel
|
|
|
|
Summary: Libtorrent is a C++ implementation of the BitTorrent protocol
|
|
|
|
Group: Development/Libraries/C and C++
|
|
|
|
Requires: %{name}%{_soname} = %{version}
|
|
|
|
Requires: boost-devel >= 1.36
|
|
|
|
Requires: gcc-c++
|
|
|
|
Requires: libGeoIP-devel
|
|
|
|
Requires: pkgconfig(openssl)
|
|
|
|
Requires: pkgconfig(zlib)
|
|
|
|
|
|
|
|
%description devel
|
|
|
|
libtorrent is a C++ library that aims to be a good alternative to all the other bittorrent implementations around. It is a library and not a full featured client, although it comes with a working example client.
|
|
|
|
|
|
|
|
The main goals of libtorrent are:
|
|
|
|
* to be cpu efficient
|
|
|
|
* to be memory efficient
|
|
|
|
* to be very easy to use
|
|
|
|
|
|
|
|
This package holds the development files for libtorrent-rasterbar.
|
|
|
|
|
|
|
|
%package doc
|
|
|
|
Summary: Documentation for libtorrent-rasterbar
|
|
|
|
Group: Documentation/HTML
|
|
|
|
|
|
|
|
%description doc
|
|
|
|
Documentation for package libtorrent-rasterbar.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
|
|
|
|
|
|
|
%build
|
2013-04-26 13:16:11 +00:00
|
|
|
export CFLAGS="%{optflags} -fno-strict-aliasing"
|
|
|
|
export CXXFLAGS="%{optflags} -fno-strict-aliasing"
|
2013-02-21 16:32:52 +00:00
|
|
|
export LDFLAGS="%{optflags} -lrt"
|
2011-04-11 03:07:13 +00:00
|
|
|
|
|
|
|
%configure \
|
|
|
|
--disable-static \
|
2011-06-07 15:23:03 +00:00
|
|
|
--disable-silent-rules \
|
2013-02-21 16:32:52 +00:00
|
|
|
--with-libgeoip \
|
2011-04-11 03:07:13 +00:00
|
|
|
--with-boost-libdir=%{_libdir} \
|
2011-06-07 15:23:03 +00:00
|
|
|
%if %{with examples}
|
|
|
|
--enable-examples \
|
|
|
|
%endif
|
2013-04-26 13:16:11 +00:00
|
|
|
--enable-python-binding \
|
|
|
|
--enable-encryption
|
2011-04-11 03:07:13 +00:00
|
|
|
|
2013-02-21 16:32:52 +00:00
|
|
|
make %{?_smp_mflags}
|
2011-04-11 03:07:13 +00:00
|
|
|
|
|
|
|
%install
|
2013-02-21 16:32:52 +00:00
|
|
|
make DESTDIR=%{buildroot} install
|
2011-04-11 03:07:13 +00:00
|
|
|
rm -v %{buildroot}%{_libdir}/*.la
|
|
|
|
# move doc to separate package
|
|
|
|
mkdir -p %{buildroot}%{_defaultdocdir}/%{name}
|
|
|
|
install -m 644 docs/* %{buildroot}%{_defaultdocdir}/%{name}/
|
|
|
|
|
2013-12-13 11:42:43 +00:00
|
|
|
%if %{with examples}
|
|
|
|
# drop tests binaries from -tools subpackage
|
|
|
|
rm -v %{buildroot}%{_bindir}/client_test
|
|
|
|
rm -v %{buildroot}%{_bindir}/connection_tester
|
|
|
|
rm -v %{buildroot}%{_bindir}/enum_if
|
|
|
|
rm -v %{buildroot}%{_bindir}/fragmentation_test
|
|
|
|
rm -v %{buildroot}%{_bindir}/parse_hash_fails
|
|
|
|
rm -v %{buildroot}%{_bindir}/parse_request_log
|
|
|
|
rm -v %{buildroot}%{_bindir}/rss_reader
|
|
|
|
rm -v %{buildroot}%{_bindir}/upnp_test
|
|
|
|
rm -v %{buildroot}%{_bindir}/utp_test
|
|
|
|
%endif
|
|
|
|
|
2011-04-11 03:07:13 +00:00
|
|
|
%post -n %{name}%{_soname} -p /sbin/ldconfig
|
2011-06-22 08:47:57 +00:00
|
|
|
|
2011-04-11 03:07:13 +00:00
|
|
|
%postun -n %{name}%{_soname} -p /sbin/ldconfig
|
|
|
|
|
2011-06-07 15:23:03 +00:00
|
|
|
%if %{with examples}
|
|
|
|
%files -n %{name}-tools
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_bindir}/dump_torrent
|
|
|
|
%{_bindir}/make_torrent
|
|
|
|
%{_bindir}/simple_client
|
|
|
|
%endif
|
|
|
|
|
2011-04-11 03:07:13 +00:00
|
|
|
%files -n %{name}%{_soname}
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%doc AUTHORS COPYING ChangeLog NEWS README
|
|
|
|
%{_libdir}/%{name}.so.%{_soname}
|
|
|
|
%{_libdir}/%{name}.so.%{_soname}.0.0
|
|
|
|
|
|
|
|
%files -n python-%{name}
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%py_sitedir/libtorrent.so
|
|
|
|
%py_sitedir/python_libtorrent-%{version}-py%{py_ver}.egg-info
|
|
|
|
|
|
|
|
%files devel
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_includedir}/libtorrent/
|
|
|
|
%{_libdir}/%{name}.so
|
|
|
|
%{_libdir}/pkgconfig/%{name}.pc
|
|
|
|
|
|
|
|
%files doc
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%doc %{_defaultdocdir}/%{name}/
|
|
|
|
|
|
|
|
%changelog
|