File aria2.spec of Package aria2

# spec file for package aria2
# Copyright (c) 2012 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

# The checks seem to need network connection
%bcond_with make_check

Name:           aria2
Version:        1.16.1
Release:        0
Summary:        Parallelizing Multi-Protocol Utility for Downloading Files
License:        SUSE-GPL-2.0-with-openssl-exception
Group:          Productivity/Networking/Other
BuildRequires:  gcc-c++
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(gnutls)
BuildRequires:  pkgconfig(libcares)
BuildRequires:  pkgconfig(libxml-2.0)
BuildRequires:  pkgconfig(sqlite3)
BuildRequires:  pkgconfig(zlib)
%if %{with make_check}
BuildRequires:  pkgconfig(cppunit)
# nettle wasn't available until openSUSE 12.1
%if 0%{?suse_version} >= 1210
BuildRequires:  gmp-devel
BuildRequires:  pkgconfig(nettle)
BuildRequires:  libgcrypt-devel
# In >= 12.2 try to avoid a rebuild when xz is modified
%if 0%{?suse_version} < 1220
BuildRequires:  xz
# aria2-bash-completion was splitted for last time in openSUSE 12.2
Provides:       aria2-bash-completion = %{version}
Obsoletes:      aria2-bash-completion < %{version}

aria2 is a utility for downloading files. It has completely new design
concept from its predecessor, Aria, and is written from scratch. aria2 has
a segmented downloading engine in its core. It can download one file from
multiple URLs or multiple connections from one URL. This results in very
high speed downloading, much faster than ordinary browsers. This engine in
was implemented in a single-thread model. The architecture is clean and easy
to extend.

aria2 currently supports HTTP, FTP, and BitTorrent.

%setup -q

# gnutls < 3.0.20 doesn't provide gnutls_certificate_set_x509_system_trust()
# so we use with-ca-bundle in < 12.2
%configure --docdir=%{_defaultdocdir}/%{name}/ \
%if 0%{?suse_version} < 1220
           --with-ca-bundle=%{_sysconfdir}/ssl/ca-bundle.pem \
make %{?_smp_mflags}

# I guess this is the correct thing to do until bnc#737549 is fixed
rm -rf %{buildroot}%{_mandir}/ru/
# Only installation instructions
rm -rf %{buildroot}%{_defaultdocdir}/%{name}/bash_completion
%find_lang aria2 --with-man

%if %{with make_check}
make check

%files -f aria2.lang
%config %{_sysconfdir}/bash_completion.d/aria2c

openSUSE Build Service is sponsored by