comparison core/sed/sed.sh @ 136:e737b80da269

core: merge .sh and .info
author David Demelier <markand@malikania.fr>
date Mon, 11 Mar 2019 14:59:13 +0100
parents 6262fa438d54
children 605b4a7b264a
comparison
equal deleted inserted replaced
135:3565bfc4a451 136:e737b80da269
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=sed
19 PKGVERSION=4.7
20 PKGREVISION=1
21 PKGLICENSE="GPLv3+"
22 PKGSUMMARY="GNU stream editor"
23 PKGDOWNLOAD="https://ftp.gnu.org/pub/gnu/sed/$PKGNAME-$PKGVERSION.tar.xz"
24 PKGOPTIONS="ACL NLS"
25
18 : ${CHOST:=$(uname -m)-linux-musl} 26 : ${CHOST:=$(uname -m)-linux-musl}
19 : ${CBUILD:=$(uname -m)-linux-musl} 27 : ${CBUILD:=$(uname -m)-linux-musl}
20 : ${CC:=gcc} 28 : ${CC:=gcc}
21 : ${CFLAGS:=-O2} 29 : ${CFLAGS:=-O2}
22 30 : ${LDFLAGS:=}
23 source ./sed.info 31 : ${LIBS:=}
24 32 : ${ACL:=yes}
25 set -ex 33 : ${NLS:=yes}
26 34
27 if [ "$ACL" = "yes" ]; then 35 if [ "$ACL" = "yes" ]; then
36 PKGDEPENDS="core/acl $PKGDEPENDS"
28 with_acl="--with-acl" 37 with_acl="--with-acl"
29 else 38 else
30 with_acl="--without-acl" 39 with_acl="--without-acl"
31 fi 40 fi
32 if [ "$NLS" = "yes" ]; then 41 if [ "$NLS" = "yes" ]; then
42 PKGDEPENDS="core/gettext $PKGDEPENDS"
33 with_nls="--enable-nls" 43 with_nls="--enable-nls"
34 else 44 else
35 with_nls="--disable-nls" 45 with_nls="--disable-nls"
36 fi 46 fi
37 47
38 rm -rf $PKGNAME-$PKGVERSION 48 build()
39 tar xvaf $PKGNAME-$PKGVERSION.tar.xz 49 {
40 pushd $PKGNAME-$PKGVERSION 50 rm -rf $PKGNAME-$PKGVERSION
51 tar xvaf $PKGNAME-$PKGVERSION.tar.xz
52 pushd $PKGNAME-$PKGVERSION
41 53
42 CC="$CC" \ 54 CC="$CC" \
43 CFLAGS="$CFLAGS" \ 55 CFLAGS="$CFLAGS" \
44 ./configure \ 56 LDFLAGS="$LDFLAGS" \
45 --build=$CBUILD \ 57 LIBS="$LIBS" \
46 --host=$CHOST \ 58 ./configure \
47 --prefix=/usr \ 59 --build=$CBUILD \
48 ${with_acl} \ 60 --host=$CHOST \
49 ${with_nls} 61 --prefix=/usr \
50 make 62 ${with_acl} \
51 make install DESTDIR=$DESTDIR 63 ${with_nls}
64 make
65 make install DESTDIR=$DESTDIR
52 66
53 popd 67 popd
54 rm -rf $PKGNAME-$PKGVERSION 68 rm -rf $PKGNAME-$PKGVERSION
69 }