|
|
d215b49 |
Name: rb_libtorrent
|
|
|
d215b49 |
Version: 0.11
|
|
|
d215b49 |
Release: 4%{?dist}
|
|
|
d215b49 |
Summary: A C++ BitTorrent library aiming to be the best alternative
|
|
|
d215b49 |
|
|
|
d215b49 |
Group: System Environment/Libraries
|
|
|
d215b49 |
License: BSD
|
|
|
d215b49 |
URL: http://www.rasterbar.com/products/libtorrent/
|
|
|
d215b49 |
|
|
|
d215b49 |
Source0: http://dl.sourceforge.net/sourceforge/libtorrent/libtorrent-%{version}.tar.gz
|
|
|
d215b49 |
Source1: %{name}-README-renames.Fedora
|
|
|
d215b49 |
Source2: %{name}-COPYING.Boost
|
|
|
d215b49 |
Source3: %{name}-COPYING.zlib
|
|
|
d215b49 |
|
|
|
d215b49 |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|
|
d215b49 |
|
|
|
d215b49 |
BuildRequires: boost-devel
|
|
|
d215b49 |
BuildRequires: zlib-devel
|
|
|
d215b49 |
|
|
|
d215b49 |
## The following is taken from it's website listing...mostly.
|
|
|
d215b49 |
%description
|
|
|
d215b49 |
%{name} is a C++ library that aims to be a good alternative to all
|
|
|
d215b49 |
the other BitTorrent implementations around. It is a library and not a full
|
|
|
d215b49 |
featured client, although it comes with a working example client.
|
|
|
d215b49 |
|
|
|
d215b49 |
Its main goals are to be very efficient (in terms of CPU and memory usage) as
|
|
|
d215b49 |
well as being very easy to use both as a user and developer. (Due to potential
|
|
|
d215b49 |
namespace conflicts, a couple of the examples had to be renamed. See the
|
|
|
d215b49 |
included documentation for more details.)
|
|
|
d215b49 |
|
|
|
d215b49 |
|
|
|
d215b49 |
%package devel
|
|
|
d215b49 |
Summary: Development files for %{name}
|
|
|
d215b49 |
Group: Development/Libraries
|
|
|
d215b49 |
License: BSD, zlib/libpng License, Boost Software License
|
|
|
d215b49 |
Requires: %{name} = %{version}-%{release}
|
|
|
d215b49 |
Requires: pkgconfig
|
|
|
a5f2397 |
## Same pkgconfig file, and unsuffixed shared library symlink. :(
|
|
|
a5f2397 |
Conflicts: libtorrent-devel
|
|
|
d215b49 |
## Needed for various headers retrieved via #include directives...
|
|
|
d215b49 |
Requires: boost-devel
|
|
|
d215b49 |
Requires: openssl-devel
|
|
|
d215b49 |
|
|
|
d215b49 |
%description devel
|
|
|
d215b49 |
The %{name}-devel package contains libraries and header files for
|
|
|
d215b49 |
developing applications that use %{name}.
|
|
|
d215b49 |
|
|
|
d215b49 |
The various source and header files included in this package are licensed
|
|
|
d215b49 |
under the revised BSD, zlib/libpng, and Boost Public licenses. See the various
|
|
|
d215b49 |
COPYING files in the included documentation for the full text of these
|
|
|
d215b49 |
licenses, as well as the comments blocks in the source code for which license
|
|
|
d215b49 |
a given source or header file is released under.
|
|
|
d215b49 |
|
|
|
d215b49 |
|
|
|
d215b49 |
%prep
|
|
|
d215b49 |
%setup -q -n "libtorrent-%{version}"
|
|
|
d215b49 |
## Some of the sources and docs are executable, which makes rpmlint against
|
|
|
d215b49 |
## the resulting -debuginfo and -devel packages, respectively, quite angry. :]
|
|
|
d215b49 |
find src/ docs/ -type f -exec chmod a-x '{}' \;
|
|
|
d215b49 |
find . -type f -regex '.*\.[hc]pp' -exec chmod a-x '{}' \;
|
|
|
d215b49 |
## The RST files are the sources used to create the final HTML files; and are
|
|
|
d215b49 |
## not needed.
|
|
|
d215b49 |
rm -f docs/*.rst
|
|
|
d215b49 |
## Ensure that we get the licenses installed appropriately.
|
|
|
d215b49 |
install -p -m 0644 COPYING COPYING.BSD
|
|
|
d215b49 |
install -p -m 0644 %{SOURCE2} COPYING.Boost
|
|
|
d215b49 |
install -p -m 0644 %{SOURCE3} COPYING.zlib
|
|
|
d215b49 |
|
|
|
d215b49 |
|
|
|
d215b49 |
%build
|
|
|
d215b49 |
## We don't need multiple zlib link options in the installed pkgconfig file.
|
|
|
d215b49 |
%{__sed} -i -e 's/@ZLIB@//' libtorrent.pc.in
|
|
|
d215b49 |
%configure --disable-static --enable-examples --with-zlib=system
|
|
|
d215b49 |
make %{?_smp_mflags}
|
|
|
d215b49 |
|
|
|
d215b49 |
|
|
|
d215b49 |
%check
|
|
|
d215b49 |
make check
|
|
|
d215b49 |
|
|
|
d215b49 |
|
|
|
d215b49 |
%install
|
|
|
d215b49 |
rm -rf %{buildroot}
|
|
|
a5f2397 |
## Ensure that we preserve our timestamps properly.
|
|
|
d215b49 |
export CPPROG="%{__cp} -p"
|
|
|
d215b49 |
make install DESTDIR=%{buildroot} INSTALL="%{__install} -c -p"
|
|
|
d215b49 |
## Do the renaming due to the somewhat limited %%_bindir namespace.
|
|
|
d215b49 |
rename client torrent_client %{buildroot}%{_bindir}/*
|
|
|
d215b49 |
install -p -m 0644 %{SOURCE1} README-renames.Fedora
|
|
|
d215b49 |
|
|
|
d215b49 |
|
|
|
d215b49 |
%clean
|
|
|
d215b49 |
rm -rf %{buildroot}
|
|
|
d215b49 |
|
|
|
d215b49 |
|
|
|
d215b49 |
%post -p /sbin/ldconfig
|
|
|
d215b49 |
|
|
|
d215b49 |
|
|
|
d215b49 |
%postun -p /sbin/ldconfig
|
|
|
d215b49 |
|
|
|
d215b49 |
|
|
|
d215b49 |
%files
|
|
|
d215b49 |
%defattr(-,root,root,-)
|
|
|
d215b49 |
%doc AUTHORS ChangeLog COPYING README README-renames.Fedora
|
|
|
d215b49 |
%{_bindir}/*torrent*
|
|
|
d215b49 |
%{_libdir}/libtorrent.so.*
|
|
|
d215b49 |
%exclude %{_libdir}/*.la
|
|
|
d215b49 |
|
|
|
d215b49 |
%files devel
|
|
|
d215b49 |
%defattr(-,root,root,-)
|
|
|
d215b49 |
%doc COPYING.Boost COPYING.BSD COPYING.zlib docs/
|
|
|
d215b49 |
%{_libdir}/pkgconfig/libtorrent.pc
|
|
|
d215b49 |
%{_includedir}/libtorrent/
|
|
|
d215b49 |
%{_libdir}/libtorrent.so
|
|
|
d215b49 |
|
|
|
d215b49 |
|
|
|
d215b49 |
%changelog
|
|
|
d215b49 |
* Sat Jan 27 2007 Peter Gordon <peter@thecodergeek.com> - 0.11-4
|
|
|
d215b49 |
- Clarify potential licensing issues in the -devel subpackage:
|
|
|
d215b49 |
+ COPYING.zlib
|
|
|
d215b49 |
+ COPYING.Boost
|
|
|
d215b49 |
- Add my name in the Fedora-specific documentation (README-renames.Fedora) and
|
|
|
d215b49 |
fix some spacing issues in it.
|
|
|
d215b49 |
- Strip the @ZLIB@ (and thus, the extra '-lz' link option) from the installed
|
|
|
d215b49 |
pkgconfig file, as that is only useful when building a statically-linked
|
|
|
d215b49 |
libtorrent binary.
|
|
|
a5f2397 |
- Fix conflict: The -devel subpackage should conflict with the -devel
|
|
|
a5f2397 |
subpackage of libtorrent, not the main package.
|
|
|
a5f2397 |
- Preserve timestamps in %%install.
|
|
|
d215b49 |
|
|
|
d215b49 |
* Wed Jan 17 2007 Peter Gordon <peter@thecodergeek.com> - 0.11-3
|
|
|
d215b49 |
- Fix License (GPL -> BSD)
|
|
|
d215b49 |
- Don't package RST (docs sources) files.
|
|
|
d215b49 |
- Only make the -devel subpackage conflict with libtorrent-devel.
|
|
|
d215b49 |
- Rename some of the examples more appropriately; and add the
|
|
|
d215b49 |
README-renames.Fedora file to %%doc which explains this.
|
|
|
d215b49 |
|
|
|
d215b49 |
* Fri Jan 05 2007 Peter Gordon <peter@thecodergeek.com> - 0.11-2
|
|
|
d215b49 |
- Add Requires: pkgconfig to the -devel subpackage since it installs a .pc
|
|
|
d215b49 |
file.
|
|
|
d215b49 |
|
|
|
d215b49 |
* Wed Jan 03 2007 Peter Gordon <peter@thecodergeek.com> - 0.11-1
|
|
|
d215b49 |
- Initial packaging for Fedora Extras
|