net-misc/axel: version bump to 2.15.
[gentoo.git] / net-misc / axel / axel-2.15.ebuild
1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 inherit autotools
7
8 DESCRIPTION="Light Unix download accelerator"
9 HOMEPAGE="https://github.com/axel-download-accelerator/axel"
10 SRC_URI="https://github.com/axel-download-accelerator/axel/archive/v${PV}.tar.gz -> ${P}.tar.gz"
11
12 LICENSE="GPL-2"
13 SLOT="0"
14 KEYWORDS="~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc64-solaris"
15 IUSE="debug libressl nls ssl"
16
17 REQUIRED_USE="libressl? ( ssl )"
18
19 CDEPEND="
20         ssl? (
21                 !libressl? ( dev-libs/openssl:0= )
22                 libressl? ( dev-libs/libressl:0= )
23         )
24 "
25 DEPEND="${CDEPEND}
26         nls? ( sys-devel/gettext )"
27 RDEPEND="${CDEPEND}
28         nls? ( virtual/libintl virtual/libiconv )"
29
30 DOCS=( doc/. )
31
32 src_prepare() {
33         default
34         eautoreconf
35 }
36
37 src_configure() {
38         econf \
39                 $(use_enable nls) \
40                 $(use_with ssl)
41 }
42
43 pkg_postinst() {
44         einfo 'To use axel with portage, create a script in'
45         einfo '/usr/local/bin/fetchwrapper.sh with the following content:'
46         einfo
47         einfo ' #!/bin/bash'
48         einfo ' set -e'
49         einfo ' /usr/bin/axel -o "$1.axel" "$2"'
50         einfo ' mv "$1.axel" "$1"'
51         einfo
52         einfo 'and then add the following to your make.conf:'
53         einfo ' FETCHCOMMAND='\''/usr/local/bin/fetchwrapper.sh "\${DISTDIR}/\${FILE}" "\${URI}"'\'
54         einfo ' RESUMECOMMAND="${FETCHCOMMAND}"'
55 }