comparison network/wget/wget.sh @ 141:21e18b280dea

network: merge .sh and .info
author David Demelier <markand@malikania.fr>
date Mon, 11 Mar 2019 20:10:00 +0100
parents 70d465d61d60
children 7c631ce1660f
comparison
equal deleted inserted replaced
140:ef65bd5eb573 141:21e18b280dea
13 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 13 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 14 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 # 16 #
17 17
18 PKGNAME=wget
19 PKGVERSION=1.20.1
20 PKGREVISION=1
21 PKGLICENSE="GPLv3"
22 PKGSUMMARY="GNU network utility to retrieve files from the web"
23 PKGDOWNLOAD="https://ftp.gnu.org/gnu/$PKGNAME/$PKGNAME-$PKGVERSION.tar.lz"
24 PKGDEPENDS="network/gnutls lib/libunistring lib/zlib"
25 PKGOPTIONS="NLS SSL UUID"
26
18 : ${CHOST:=$(uname -m)-linux-musl} 27 : ${CHOST:=$(uname -m)-linux-musl}
19 : ${CBUILD:=$(uname -m)-linux-musl} 28 : ${CBUILD:=$(uname -m)-linux-musl}
29 : ${CTARGET:=$(uname -m)-linux-musl}
20 : ${CC:=gcc} 30 : ${CC:=gcc}
21 : ${CFLAGS:=-O2} 31 : ${CFLAGS:=-O2}
32 : ${LDFLAGS:=}
33 : ${LIBS:=}
22 : ${SSL:=gnutls} # upstream default 34 : ${SSL:=gnutls} # upstream default
23 : ${NLS:=yes} 35 : ${NLS:=yes}
24 : ${UUID:=yes} 36 : ${UUID:=yes}
25 37
26 source ./wget.info
27
28 set -ex
29
30 if [ "$SSL" = "openssl" ]; then
31 with_ssl="--with-ssl=openssl"
32 elif [ "$SSL" = "gnutls" ]; then
33 with_ssl="--with-ssl=gnutls"
34 elif [ "$SSL" = "no" ]; then
35 with_ssl="--without-ssl"
36 fi
37
38 if [ "$NLS" = "yes" ]; then 38 if [ "$NLS" = "yes" ]; then
39 PKGDEPENDS="core/gettext $PKGDEPENDS"
39 with_nls="--enable-nls" 40 with_nls="--enable-nls"
40 else 41 else
41 with_nls="--disable-nls" 42 with_nls="--disable-nls"
42 fi 43 fi
43 44
45 if [ "$SSL" = "openssl" ]; then
46 PKGDEPENDS="network/openssl $PKGDEPENDS"
47 with_ssl="--with-ssl=openssl"
48 elif [ "$SSL" = "gnutls" ]; then
49 PKGDEPENDS="network/gnutls $PKGDEPENDS"
50 with_ssl="--with-ssl=gnutls"
51 else
52 with_ssl="--without-ssl"
53 fi
54
44 if [ "$UUID" = "yes" ]; then 55 if [ "$UUID" = "yes" ]; then
56 PKGDEPENDS="core/util-linux $PKGDEPENDS"
45 with_uuid="--with-uuid" 57 with_uuid="--with-uuid"
46 else 58 else
47 with_uuid="--without-uuid" 59 with_uuid="--without-uuid"
48 fi 60 fi
49 61
50 rm -rf $PKGNAME-$PKGVERSION 62 build()
51 tar xvaf $PKGNAME-$PKGVERSION.tar.lz 63 {
52 pushd $PKGNAME-$PKGVERSION 64 rm -rf $PKGNAME-$PKGVERSION
65 tar xvaf $PKGNAME-$PKGVERSION.tar.lz
66 pushd $PKGNAME-$PKGVERSION
53 67
54 CC="$CC" \ 68 CC="$CC" \
55 CFLAGS="$CFLAGS" \ 69 CFLAGS="$CFLAGS" \
56 ./configure \ 70 LDFLAGS="$LDFLAGS" \
57 --build=$CBUILD \ 71 LIBS="$LIBS" \
58 --host=$CHOST \ 72 ./configure \
59 --prefix=/usr \ 73 --build=$CBUILD \
60 --without-included-libunistring \ 74 --host=$CHOST \
61 ${with_nls} \ 75 --target=$CTARGET \
62 ${with_ssl} \ 76 --prefix=/usr
63 ${with_uuid} 77 --without-included-libunistring \
64 make 78 $with_nls \
65 make install DESTDIR=$DESTDIR 79 $with_ssl \
80 $with_uuid
81 make
82 make install DESTDIR=$DESTDIR
66 83
67 popd 84 popd
68 rm -rf $PKGNAME-$PKGVERSION 85 rm -rf $PKGNAME-$PKGVERSION
86 }