diff options
Diffstat (limited to 'source/a/util-linux/util-linux.SlackBuild')
-rwxr-xr-x | source/a/util-linux/util-linux.SlackBuild | 80 |
1 files changed, 39 insertions, 41 deletions
diff --git a/source/a/util-linux/util-linux.SlackBuild b/source/a/util-linux/util-linux.SlackBuild index b348d83eb..4d6046024 100755 --- a/source/a/util-linux/util-linux.SlackBuild +++ b/source/a/util-linux/util-linux.SlackBuild @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright 2008, 2009, 2010, 2011, 2012, 2013 Patrick J. Volkerding, Sebeka, MN, USA +# Copyright 2008, 2009, 2010, 2011, 2012, 2013, 2015 Patrick J. Volkerding, Sebeka, MN, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -22,25 +22,27 @@ # Slackware build script for util-linux -VERSION=${VERSION:-$(echo util-linux*.tar.?z* | cut -d - -f 3 | rev | cut -f 3- -d . | rev)} -BUILD=${BUILD:-6} +VERSION=${VERSION:-$(echo util-linux*.tar.xz | cut -d - -f 3 | rev | cut -f 3- -d . | rev)} +BUILD=${BUILD:-1} ADJTIMEXVERS=1.29 SETSERIALVERS=2.17 ZIPTOOLVERS=1.4.0 +NUMJOBS=${--j8} + # Automatically determine the architecture we're building on: if [ -z "$ARCH" ]; then case "$( uname -m )" in - i?86) export ARCH=i486 ;; + i?86) export ARCH=i586 ;; arm*) export ARCH=arm ;; # Unless $ARCH is already set, use uname -m for all other archs: *) export ARCH=$( uname -m ) ;; esac fi -if [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "s390" ]; then SLKCFLAGS="-O2" @@ -70,38 +72,11 @@ find . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; -# Disabled login stuff from being built, as this is provided by shadow -# -# /sbin/elvtune is not built, as configure says it only works with 2.2 and -# 2.4 kernels - -# This block is handled near the bottom of the script in symlink creation -# /bin/setterm -- now located in /usr/bin/setterm -# /bin/getopt -- same as setterm -# /usr/bin/readprofile -- now in /usr/sbin -# /usr/bin/tunelp -- same as readprofile - # Changing the fdisk -l output (this was done prior to util-linux-ng) broke # our installation scripts, so we have changed the name of partition type # 83 back to "Linux swap": zcat $CWD/util-linux.fdisk-no-solaris.diff.gz | patch -p1 --verbose || exit 1 -# Fix loop encryption: -zcat $CWD/0001-mount-old-fix-encryption-usage.patch.gz | patch -p1 --verbose || exit 1 - -# Fix fdisk granularity on 512 byte sector size devices: -zcat $CWD/0002-fdisk-don-t-ignore-1MiB-granularity-on-512-byte-sect.patch.gz | patch -p1 --verbose || exit 1 - -# 20120814 bkw: fix "column --separator <anything>" segfault -zcat $CWD/column-fix_long_opts.diff.gz | patch -p1 --verbose || exit 1 - -# Fix data type in partx to prevent silently truncating partition sizes and -# offsets to 4GB on 32-bit platforms: -zcat $CWD/partx.data.type.diff.gz | patch -p1 --verbose || exit 1 - -# Regenerate, since patch 0001 hits mount/Makefile.am: -./autogen.sh - CFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr \ @@ -112,8 +87,8 @@ CFLAGS="$SLKCFLAGS" \ --infodir=/usr/info \ --docdir=/usr/doc/util-linux-$VERSION \ --disable-static \ - --enable-arch \ --enable-agetty \ + --disable-eject \ --enable-kill \ --disable-last \ --enable-line \ @@ -122,32 +97,46 @@ CFLAGS="$SLKCFLAGS" \ --enable-raw \ --enable-rename \ --enable-reset \ - --disable-login-utils \ + --disable-login \ --enable-schedutils \ --enable-wall \ --enable-write \ --enable-use-tty-group \ --enable-libblkid \ --enable-libmount \ - --enable-libmount-mount \ --enable-libuuid \ --disable-uuidd \ - --enable-ddate \ + --with-python=2 \ + --without-readline \ --build=$ARCH-slackware-linux \ || exit 1 -make || exit 1 +# UNUSED, but maybe needed if we enable readline here: +# +# Yet another project that doesn't seem to get that -readline requires either +# -ltermcap or -lncurses on systems that don't make assumptions... +#sed -i -e 's|-lreadline|\0 -lncursesw|g' Makefile + +make $NUMBJOBS || make || exit 1 make install DESTDIR=$PKG || make install DESTDIR=$PKG -# Move the libblkid, libmount, and libuuid libraries to /lib${LIBSUFFIX} +# Remove all overlap with the shadow package, since --disable-login doesn't quite do that: +rm $PKG/sbin/nologin $PKG/usr/man/man8/nologin.8 $PKG/sbin/sulogin $PKG/usr/man/man8/sulogin.8 + +# Move the libblkid, libfdisk, libmount, libsmartcols, and +# libuuid libraries to /lib${LIBSUFFIX}: mkdir -p $PKG/lib${LIBDIRSUFFIX} ( cd $PKG/usr/lib${LIBDIRSUFFIX} mv libblkid.so.1* $PKG/lib${LIBDIRSUFFIX} + mv libfdisk.so.1* $PKG/lib${LIBDIRSUFFIX} mv libmount.so.1* $PKG/lib${LIBDIRSUFFIX} + mv libsmartcols.so.1* $PKG/lib${LIBDIRSUFFIX} mv libuuid.so.1* $PKG/lib${LIBDIRSUFFIX} - rm -f libblkid.so libmount.so libuuid.so + rm -f libblkid.so libfdisk.so libmount.so libsmartcols.so libuuid.so ln -sf ../../lib${LIBDIRSUFFIX}/libblkid.so.1 libblkid.so + ln -sf ../../lib${LIBDIRSUFFIX}/libfdisk.so.1 libfdisk.so ln -sf ../../lib${LIBDIRSUFFIX}/libmount.so.1 libmount.so + ln -sf ../../lib${LIBDIRSUFFIX}/libsmartcols.so.1 libsmartcols.so ln -sf ../../lib${LIBDIRSUFFIX}/libuuid.so.1 libuuid.so ) @@ -165,6 +154,13 @@ if [ -r $PKG/usr/sbin/fdformat ]; then ) fi +# ddate.{1,c} taken from https://github.com/bo0ts/ddate: +cp -a $CWD/ddate.? . +cc -O -o ddate ddate.c +cp -a ddate $PKG/usr/bin +cat ddate.1 > $PKG/usr/man/man1/ddate.1 +chown root:root $PKG/usr/bin/ddate + # Build ziptool cd $TMP || exit 1 rm -rf ziptool-$ZIPTOOLVERS @@ -188,6 +184,7 @@ cd $TMP || exit 1 rm -rf bsdstrings tar xvf $CWD/bsdstrings.tar.gz || exit 1 cd bsdstrings || exit 1 +zcat $CWD/bsdstrings-util-linux_overflow.diff.gz | patch -p1 --verbose || exit 1 make || exit 1 strip strings cat strings > $PKG/usr/bin/strings @@ -279,7 +276,8 @@ cd $TMP/util-linux-$VERSION # Go back home :) ln -s ../../sbin/sfdisk . cd $PKG/usr/bin ln -s ../sbin/readprofile . - ln -s ../sbin/tunelp . + # tunelp was removed by upstream: + #ln -s ../sbin/tunelp . ln -s ../../bin/more . ln -s ../../sbin/raw . cd $PKG/usr/man/man1 |