File libtorrent-rasterbar.spec of Package libtorrent-rasterbar

#
# spec file for package libtorrent-rasterbar (Version 0.15.5)
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# 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/
#

%define _soname 6

Name:           libtorrent-rasterbar
Version:        0.15.5
Release:        1
License:        BSD
Group:          Development/Libraries/C and C++
Summary:        Libtorrent is a C++ implementation of the BitTorrent protocol
URL:            http://www.rasterbar.com/products/libtorrent/
Source:         http://libtorrent.googlecode.com/files/%{name}-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  boost-devel >= 1.36
BuildRequires:  gcc-c++ 
BuildRequires:  libGeoIP-devel
BuildRequires:  openssl-devel
BuildRequires:  pkg-config
BuildRequires:  python-devel
BuildRequires:  zlib-devel
# py_requires is no longer needed since 11.3
%{py_requires}
Conflicts:      rblibtorrent libtorrent-rasterbar-svn

%description
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 sample client and example files for libtorrent-rasterbar.

Authors:
--------
	Arvid Norberg <arvid@rasterbar.com>

%package -n %{name}%{_soname}
Group:          System/Libraries
License:        BSD
Summary:        Libtorrent is a C++ implementation of the BitTorrent protocol

%description -n %{name}%{_soname}
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

Authors:
--------
	Arvid Norberg <arvid@rasterbar.com>

%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.

%package devel
Summary:        Libtorrent is a C++ implementation of the BitTorrent protocol
Group:          Development/Libraries/C and C++
License:        BSD
Requires:       %{name}%{_soname} = %{version}
#Requires:       %{name} = %{version}
Requires:       gcc-c++
Requires:       boost-devel >= 1.36
Requires:       openssl-devel
Requires:       zlib-devel
Requires:       libGeoIP-devel

%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.

Authors:
--------
	Arvid Norberg <arvid@rasterbar.com>

%package doc
Summary:        Documentation for libtorrent-rasterbar
Group:          Documentation/HTML
License:        BSD

%description doc
Documentation for package libtorrent-rasterbar.

%prep
%setup -q

%build
export CFLAGS="$RPM_OPT_FLAGS -g -fno-strict-aliasing"
export CXXFLAGS="$RPM_OPT_FLAGS -g -fno-strict-aliasing"
export LDFLAGS="$RPM_OPT_FLAGS -lrt"

%configure \
        --disable-static \
        --with-libgeoip \
        --with-boost-libdir=%{_libdir} \
        --enable-examples \
        --enable-tests \
        --enable-python-binding 

make %{?_smp_mflags}

%install
%makeinstall
%{__rm} -v %{buildroot}%{_libdir}/*.la
# move doc to separate package
mkdir -p %{buildroot}%{_defaultdocdir}/%{name}
install -m 644 docs/* %{buildroot}%{_defaultdocdir}/%{name}/

%clean
%{__rm} -rf %{buildroot}

%post  -n %{name}%{_soname} -p /sbin/ldconfig
%postun -n %{name}%{_soname} -p /sbin/ldconfig

%files
%defattr(-,root,root)
%{_bindir}/client_test
%{_bindir}/dump_torrent
%{_bindir}/enum_if
%{_bindir}/make_torrent
%{_bindir}/simple_client

%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
openSUSE Build Service is sponsored by