comparison core/tar/tar.sh @ 96:71a54b93217a

core/tar: initial import, closes #1052
author David Demelier <markand@malikania.fr>
date Fri, 08 Mar 2019 22:14:47 +0100
parents
children e737b80da269
comparison
equal deleted inserted replaced
95:6262fa438d54 96:71a54b93217a
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
23 source ./tar.info
24
25 set -ex
26
27 if [ "$ACL" = "yes" ]; then
28 with_acl="--with-acl"
29 else
30 with_acl="--without-acl"
31 fi
32 if [ "$NLS" = "yes" ]; then
33 with_nls="--enable-nls"
34 else
35 with_nls="--disable-nls"
36 fi
37
38 rm -rf $PKGNAME-$PKGVERSION
39 tar xvaf $PKGNAME-$PKGVERSION.tar.xz
40 pushd $PKGNAME-$PKGVERSION
41
42 CC="$CC" \
43 CFLAGS="$CFLAGS" \
44 FORCE_UNSAFE_CONFIGURE=1 ./configure \
45 --build=$CBUILD \
46 --host=$CHOST \
47 --prefix=/usr \
48 --without-selinux \
49 ${with_acl} \
50 ${with_nls}
51 make
52 make install DESTDIR=$DESTDIR
53
54 popd
55 rm -rf $PKGNAME-$PKGVERSION