Mercurial > vanilla
comparison core/util-linux/util-linux.sh @ 83:5511fb992e74
core/util-linux: initial import, closes #1060
author | David Demelier <markand@malikania.fr> |
---|---|
date | Thu, 07 Mar 2019 20:05:00 +0100 |
parents | |
children | f55c9ef41a9a |
comparison
equal
deleted
inserted
replaced
82:3600de78994f | 83:5511fb992e74 |
---|---|
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 ./util-linux.info | |
24 | |
25 set -ex | |
26 | |
27 if [ "${BASHCMP:-yes}" = "no" ]; then | |
28 with_bash="--disable-bash-completion" | |
29 else | |
30 with_bash="--enable-bash-completion" | |
31 fi | |
32 if [ "${NLS:-yes}" = "no" ]; then | |
33 with_nls="--disable-nls" | |
34 else | |
35 with_nls="--enable-nls" | |
36 fi | |
37 if [ "${PYTHON:-yes}" = "no" ]; then | |
38 with_python="--without-python" | |
39 else | |
40 with_python="--with-python=3" | |
41 fi | |
42 | |
43 rm -rf $PKGNAME-$PKGVERSION | |
44 tar xvaf $PKGNAME-$PKGVERSION.tar.xz | |
45 pushd $PKGNAME-$PKGVERSION | |
46 | |
47 CC="$CC" \ | |
48 CFLAGS="$CFLAGS" \ | |
49 ./configure \ | |
50 --build=$CBUILD \ | |
51 --host=$CHOST \ | |
52 --prefix=/usr \ | |
53 --libdir=/usr/lib \ | |
54 --bindir=/usr/bin \ | |
55 --sbindir=/usr/sbin \ | |
56 --disable-static \ | |
57 --enable-shared \ | |
58 --enable-vipw \ | |
59 --without-systemd \ | |
60 --enable-usrdir-path \ | |
61 ${with_bash} \ | |
62 ${with_nls} \ | |
63 ${with_python} | |
64 make | |
65 make install DESTDIR=$DESTDIR | |
66 rm -f $DESTDIR/usr/lib/lib{fdisk,smartcols,mount,blkid,uuid}.la | |
67 | |
68 popd | |
69 rm -rf $PKGNAME-$PKGVERSION |