diff options
Diffstat (limited to 'network/kea/kea.SlackBuild')
-rw-r--r-- | network/kea/kea.SlackBuild | 36 |
1 files changed, 25 insertions, 11 deletions
diff --git a/network/kea/kea.SlackBuild b/network/kea/kea.SlackBuild index 3d70891b8e..d9de37586f 100644 --- a/network/kea/kea.SlackBuild +++ b/network/kea/kea.SlackBuild @@ -1,8 +1,8 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for kea -# Copyright 2016-2017 Thibaut Notteboom, Paris, FRANCE +# Copyright 2016-2023 Thibaut Notteboom, Paris, FRANCE # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -22,10 +22,13 @@ # 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) + PRGNAM=kea -VERSION=${VERSION:-1.2.0} -BUILD=${BUILD:-2} +VERSION=${VERSION:-2.5.3} +BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -35,7 +38,11 @@ if [ -z "$ARCH" ]; then esac fi -CWD=$(pwd) +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} @@ -49,6 +56,9 @@ elif [ "$ARCH" = "i686" ]; then elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" LIBDIRSUFFIX="64" +elif [ "$ARCH" = "aarch64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" else SLKCFLAGS="-O2" LIBDIRSUFFIX="" @@ -72,7 +82,6 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -CPPFLAGS="-std=gnu++11" \ CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ @@ -90,15 +99,20 @@ CXXFLAGS="$SLKCFLAGS" \ --disable-static \ --build=$ARCH-slackware-linux -make +make -j7 make install DESTDIR=$PKG -mv $PKG/etc/kea/kea.conf $PKG/etc/kea/kea.conf.new -mv $PKG/etc/kea/keactrl.conf $PKG/etc/kea/keactrl.conf.new - mkdir -p $PKG/etc/rc.d cat $CWD/rc.kea > $PKG/etc/rc.d/rc.kea.new +mkdir -p $PKG/etc/kea + +# Change configuration files to .new +find $PKG/etc/kea/ -name *.conf | while read cfg ; do mv $cfg $cfg.new ; done + +rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la +rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/kea/hooks/*.la + find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true @@ -112,4 +126,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh 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 |