diff options
Diffstat (limited to 'source/l/elfutils/elfutils.SlackBuild')
-rwxr-xr-x | source/l/elfutils/elfutils.SlackBuild | 31 |
1 files changed, 23 insertions, 8 deletions
diff --git a/source/l/elfutils/elfutils.SlackBuild b/source/l/elfutils/elfutils.SlackBuild index d7853d066..82d3e8e5c 100755 --- a/source/l/elfutils/elfutils.SlackBuild +++ b/source/l/elfutils/elfutils.SlackBuild @@ -1,6 +1,6 @@ -#!/bin/sh +#!/bin/bash -# Copyright 2010, 2011, 2014, 2015 Patrick J. Volkerding, Sebeka, Minnesota, USA +# Copyright 2010, 2011, 2014, 2015, 2016, 2017, 2018 Patrick J. Volkerding, Sebeka, Minnesota, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -20,10 +20,11 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +cd $(dirname $0) ; CWD=$(pwd) PKGNAM=elfutils VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} # Automatically determine the architecture we're building on: if [ -z "$ARCH" ]; then @@ -35,6 +36,14 @@ if [ -z "$ARCH" ]; then esac fi +# If the variable PRINT_PACKAGE_NAME is set, then this script will report what +# the name of the created package would be, and then exit. This information +# could be useful to other scripts. +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PKGNAM-$VERSION-$ARCH-$BUILD.txz" + exit 0 +fi + NUMJOBS=${NUMJOBS:-" -j7 "} if [ "$ARCH" = "i586" ]; then @@ -51,7 +60,6 @@ else LIBDIRSUFFIX="" fi -CWD=$(pwd) TMP=${TMP:-/tmp} PKG=$TMP/package-$PKGNAM @@ -63,9 +71,6 @@ rm -rf $PKGNAM-$VERSION tar xvf $CWD/$PKGNAM-$VERSION.tar.?z* || exit 1 cd $PKGNAM-$VERSION -zcat $CWD/elfutils-0.163-unstrip-shf_info_link.patch | patch -p1 --verbose || exit 1 -zcat $CWD/elfutils-portability-0.163.patch | patch -p1 --verbose || exit 1 - chown -R root:root . find . \ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ @@ -82,7 +87,7 @@ CFLAGS="$SLKCFLAGS" \ --mandir=/usr/man \ --infodir=/usr/info \ --program-prefix=eu- \ - --build=$ARCH-slackware-linux + --build=$ARCH-slackware-linux || exit 1 # Build: make $NUMJOBS || make || exit 1 @@ -90,6 +95,16 @@ make $NUMJOBS || make || exit 1 # Install: make install DESTDIR=$PKG || exit 1 +# Move the shared library to $PKG/lib${LIBDIRSUFFIX}: +mkdir -p $PKG/lib${LIBDIRSUFFIX} +( cd $PKG/usr/lib${LIBDIRSUFFIX} + for file in lib*-*.so ; do + mv $file ../../lib${LIBDIRSUFFIX} + ln -sf ../../lib${LIBDIRSUFFIX}/$file . + done + cp -a lib*.so.? ../../lib${LIBDIRSUFFIX} +) + # Strip binaries: ( cd $PKG find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null |