Mercurial > vanilla
changeset 397:b24a931a5da5
core/util-linux: add more options
author | David Demelier <markand@malikania.fr> |
---|---|
date | Tue, 02 Apr 2019 20:14:00 +0200 |
parents | fe4234e3cfe3 |
children | 89ac6810e2ee |
files | core/util-linux/util-linux.sh |
diffstat | 1 files changed, 43 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/core/util-linux/util-linux.sh Tue Apr 02 20:11:00 2019 +0200 +++ b/core/util-linux/util-linux.sh Tue Apr 02 20:14:00 2019 +0200 @@ -20,8 +20,8 @@ PKGREVISION=1 PKGLICENSE="GPLv2+" PKGSUMMARY="standard Linux utilities" -PKGDOWNLOAD="https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v2.33/$PKGNAME-$PKGVERSION.tar.xz" -PKGOPTIONS="NLS PYTHON" +PKGDOWNLOAD="https://mirrors.edge.kernel.org/pub/linux/utils/$PKGNAME/v2.33/$PKGNAME-$PKGVERSION.tar.xz" +PKGOPTIONS="AUDIT COLORS COMPONENTS NCURSES NLS PYTHON SELINUX" : ${CHOST:=$(uname -m)-linux-musl} : ${CBUILD:=$(uname -m)-linux-musl} @@ -29,8 +29,33 @@ : ${CFLAGS:=-O2} : ${LDFLAGS:=} : ${LIBS:=} +: ${AUDIT:=no} +: ${COLORS:=yes} +: ${COMPONENTS:=} +: ${NCURSES:=yes} : ${NLS:=yes} : ${PYTHON:=yes} +: ${SELINUX:=no} + +if [ "$AUDIT" = "yes" ]; then + with_audit="--with-audit" +else + with_audit="--without-audit" +fi + +if [ -n "$COMPONENTS" ]; then + with_components="--disable-all-programs" + + for c in $COMPONENTS; do + with_components="$with_components --enable-$c" + done +fi + +if [ "$COLORS" = "yes" ]; then + with_colors="--enable-colors-default" +else + with_colors="--disable-colors-default" +fi if [ "$NLS" = "yes" ]; then PKGDEPENDS="core/gettext $PKGDEPENDS" @@ -38,6 +63,7 @@ else with_nls="--disable-nls" fi + if [ "$PYTHON" = "yes" ]; then PKGDEPENDS="python/python $PKGDEPENDS" with_python="--with-python=3" @@ -45,12 +71,19 @@ with_python="--without-python" fi +if [ "$SELINUX" = "yes" ]; then + with_selinux="--with-selinux" +else + with_selinux="--without-selinux" +fi + build() { rm -rf $PKGNAME-$PKGVERSION tar xvaf $PKGNAME-$PKGVERSION.tar.xz pushd $PKGNAME-$PKGVERSION + # disable login, su, sulogin, provided by shadow. CC="$CC" \ CFLAGS="$CFLAGS" \ LDFLAGS="$LDFLAGS" \ @@ -59,17 +92,23 @@ --build=$CBUILD \ --host=$CHOST \ --bindir=/usr/bin \ + --disable-gtk-doc \ --disable-static \ --disable-su \ + --disable-sulogin \ + --disable-login \ --enable-shared \ --enable-usrdir-path \ - --enable-vipw \ --libdir=/usr/lib \ --prefix=/usr \ --sbindir=/usr/sbin \ --without-systemd \ + $with_audit \ + $with_colors \ + $with_components \ $with_nls \ - $with_python + $with_python \ + $with_selinux make make install DESTDIR=$DESTDIR rm -f $DESTDIR/usr/lib/lib{fdisk,smartcols,mount,blkid,uuid}.la