comparison gnu/wget/wget.sh @ 1114:6de02aa035d2

gnu: move GNU packages to this category
author David Demelier <markand@malikania.fr>
date Thu, 19 Sep 2019 15:09:24 +0200
parents network/wget/wget.sh@7791d3dbfecf
children 297b5eef115e
comparison
equal deleted inserted replaced
1113:5c0dfe68c5a8 1114:6de02aa035d2
1 #!/bin/busybox 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 PKGNAME=wget
19 PKGVERSION=1.20.1
20 PKGREVISION=1
21 PKGLICENSE="GPLv30"
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="libunistring zlib"
25 PKGOPTIONS="NLS SSL UUID"
26
27 : ${CHOST:=$(uname -m)-linux-musl}
28 : ${CBUILD:=$(uname -m)-linux-musl}
29 : ${CC:=clang}
30 : ${CFLAGS:=-O2}
31 : ${LDFLAGS:=}
32 : ${LIBS:=}
33 : ${SSL:=gnutls} # Note: can be gnutls (or yes) or libressl.
34 : ${NLS:=yes}
35 : ${UUID:=yes}
36
37 if [ "$NLS" = "yes" ]; then
38 PKGDEPENDS="gettext $PKGDEPENDS"
39 with_nls="--enable-nls"
40 else
41 with_nls="--disable-nls"
42 fi
43
44 case $SSL in
45 "yes"|"gnutls")
46 PKGDEPENDS="gnutls $PKGDEPENDS"
47 with_ssl="--with-ssl=gnutls"
48 ;;
49 "libressl")
50 PKGDEPENDS="libressl $PKGDEPENDS"
51 with_ssl="--with-ssl=openssl"
52 ;;
53 *)
54 with_ssl="--without-ssl"
55 ;;
56 esac
57
58 if [ "$UUID" = "yes" ]; then
59 PKGDEPENDS="util-linux $PKGDEPENDS"
60 with_uuid="--with-uuid"
61 else
62 with_uuid="--without-uuid"
63 fi
64
65 build()
66 {
67 rm -rf $PKGNAME-$PKGVERSION
68 tar xvf $PKGNAME-$PKGVERSION.tar.lz
69 cd $PKGNAME-$PKGVERSION
70
71 CC="$CC" \
72 CFLAGS="$CFLAGS" \
73 LDFLAGS="$LDFLAGS" \
74 LIBS="$LIBS" \
75 ./configure \
76 --build=$CBUILD \
77 --host=$CHOST \
78 --prefix= \
79 --without-included-libunistring \
80 $with_nls \
81 $with_ssl \
82 $with_uuid
83 make
84 make install DESTDIR=$DESTDIR
85
86 cd ..
87 rm -rf $PKGNAME-$PKGVERSION
88 }