# -*- coding: ascii; tab-width: 4; -*-
Package: aria2
Version: 1.19.3
Revision: 1
Description: Downloader for HTTP/FTP/BitTorrent/Metalink
Homepage: https://aria2.github.io/
License: GPL
Maintainer: Daniel Johnson <daniel@daniel-johnson.org>
DescDetail: <<
	aria2 is a utility for downloading files. The supported protocols are
	HTTP(S), FTP, BitTorrent (DHT, PEX, MSE/PE), and Metalink.

	It can download one or more files individually or from multiple
	sources/protocols at the same time and tries to utilize your maximum
	download bandwidth (by using multiple threads and downloading data from
	HTTP(S)/FTP, while also uploading to the BitTorrent swarm).

	Using Metalink's chunk checksums, aria2 automatically validates chunks
	of data while downloading a file like BitTorrent.

	There are other alternative applications. But aria2 has 2 distinctive
	features: (1) aria2 can download a file from several
	URLs(http/ftp/BitTorrent) and (2) If you give aria2 list of URLs, then
	aria2 downloads them concurrently. You don't have to wait for the
	current download queue to finish one file at a time anymore. aria2 uses
	your maximum bandwidth and downloads files quickly.
<<
DescPort: <<
	Set ZLIB_LIBS manually to avoid a spurious -L/usr/lib.
	Don't use libuv. It works but better to use kqueue directly.
<<

Source: https://github.com/tatsuhiro-t/aria2/releases/download/release-%v/%n-%v.tar.xz
Source-Checksum: SHA256(6abcc6c28437a519cc1016736cb446ed38db360cb9828c4a7105526ea82299e3)

Depends: <<
	ca-bundle,
	libcares2-shlibs (>= 1.10.0-1),
	libgettext8-shlibs,
	libiconv,
	libssh2.1-shlibs (>= 1.6.0-2),
	libxml2-shlibs,
	sqlite3-shlibs
<<
BuildDepends: <<
	clang (>= 4.2),
	fink (>= 0.32),
	fink-package-precedence,
	gettext-tools,
	libcares2 (>= 1.10.0-1),
	libgettext8-dev,
	libiconv-dev,
	libssh2.1 (>= 1.6.0-2),
	libxml2,
	pkgconfig,
	sqlite3-dev
<<
Conflicts: aria2c (<< 1.1.2-1)
Replaces: aria2c (<< 1.1.2-1)

SetCXXFLAGS: -Os
SetCFLAGS: -Os
SetLDFLAGS: -Wl,-dead_strip_dylibs
GCC: 4.0
UseMaxBuildJobs: true

ConfigureParams: <<
	--enable-dependency-tracking \
	--with-appletls \
	--without-gnutls \
	--without-libnettle \
	--without-libgcrypt \
	--without-libuv \
	--with-sqlite3 \
	--without-openssl \
	--without-libgmp \
	--with-libcares \
	--with-libxml2 \
	--with-libz \
	--with-libssh2 \
	--with-bashcompletiondir=%p/etc/bash_completion.d \
	ZLIB_LIBS="-lz" ZLIB_CFLAGS=" "
<<

CompileScript: <<
	%{default_script}
	fink-package-precedence .
<<

# Disabling tests for now because some firewall configs can cause hangs.
#InfoTest: <<
#	TestDepends: cppunit1.12.1
#	TestScript: <<
#		make check || exit 2
#	<<
#<<

InstallScript: <<
	make install DESTDIR=%d
<<

DocFiles: AUTHORS ChangeLog COPYING LICENSE.OpenSSL NEWS README.html