comparison network/wget/wget.sh @ 106:70d465d61d60

network/wget: initial import, closes #1176
author David Demelier <markand@malikania.fr>
date Sat, 09 Mar 2019 14:43:58 +0100
parents
children 21e18b280dea
comparison
equal deleted inserted replaced
105:afd993bb2410 106:70d465d61d60
1 #!/bin/sh
2 #
3 # Copyright (c) 2019 David Demelier <markand@malikania.fr>
4 #
5 # Permission to use, copy, modify, and/or distribute this software for any
6 # purpose with or without fee is hereby granted, provided that the above
7 # copyright notice and this permission notice appear in all copies.
8 #
9 # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
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
15 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 #
17
18 : ${CHOST:=$(uname -m)-linux-musl}
19 : ${CBUILD:=$(uname -m)-linux-musl}
20 : ${CC:=gcc}
21 : ${CFLAGS:=-O2}
22 : ${SSL:=gnutls} # upstream default
23 : ${NLS:=yes}
24 : ${UUID:=yes}
25
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
39 with_nls="--enable-nls"
40 else
41 with_nls="--disable-nls"
42 fi
43
44 if [ "$UUID" = "yes" ]; then
45 with_uuid="--with-uuid"
46 else
47 with_uuid="--without-uuid"
48 fi
49
50 rm -rf $PKGNAME-$PKGVERSION
51 tar xvaf $PKGNAME-$PKGVERSION.tar.lz
52 pushd $PKGNAME-$PKGVERSION
53
54 CC="$CC" \
55 CFLAGS="$CFLAGS" \
56 ./configure \
57 --build=$CBUILD \
58 --host=$CHOST \
59 --prefix=/usr \
60 --without-included-libunistring \
61 ${with_nls} \
62 ${with_ssl} \
63 ${with_uuid}
64 make
65 make install DESTDIR=$DESTDIR
66
67 popd
68 rm -rf $PKGNAME-$PKGVERSION