diff options
Diffstat (limited to 'libraries/libbsd/libbsd.SlackBuild')
-rw-r--r-- | libraries/libbsd/libbsd.SlackBuild | 40 |
1 files changed, 29 insertions, 11 deletions
diff --git a/libraries/libbsd/libbsd.SlackBuild b/libraries/libbsd/libbsd.SlackBuild index 97e6f58a7f..bcd909ea1f 100644 --- a/libraries/libbsd/libbsd.SlackBuild +++ b/libraries/libbsd/libbsd.SlackBuild @@ -1,6 +1,9 @@ -#!/bin/sh +#!/bin/bash -# Copyright (c) 2010-2019 LEVAI Daniel +# Slackware build script for libbsd + +# Copyright 2020-2023 Matteo Bernardini <ponce@slackbuilds.org>, Pisa, Italy +# Copyright (c) 2010-2020 LEVAI Daniel # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -25,12 +28,13 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# Build script for libbsd +cd $(dirname $0) ; CWD=$(pwd) PRGNAM=libbsd -VERSION=${VERSION:-0.9.1} +VERSION=${VERSION:-0.11.7} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -40,7 +44,14 @@ if [ -z "$ARCH" ]; then esac fi -CWD=$(pwd) +# 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 "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} @@ -69,11 +80,15 @@ tar xvf $CWD/$PRGNAM-$VERSION.tar.xz cd $PRGNAM-$VERSION chown -R root:root . find -L . \ - \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \ - -exec chmod 755 {} \; -o \ - \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ - -exec chmod 644 {} \; + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; +# Debian/upstream patches +for i in $CWD/patches/* ; do patch -p1 < $i ; done + +autoreconf -vif CFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr \ @@ -82,9 +97,12 @@ CFLAGS="$SLKCFLAGS" \ --disable-static \ --build=$ARCH-slackware-linux -make install DESTDIR=$PKG +make install-strip DESTDIR=$PKG + +rm -rf $PKG/usr/lib${LIBDIRSUFFIX}/*.la find $PKG/usr/man -type f -exec gzip -9 {} \; +for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/ cp -a ChangeLog README TODO $PKG/usr/doc/$PRGNAM-$VERSION/ @@ -95,4 +113,4 @@ mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE |