diff options
author | B. Watson <yalhcru@gmail.com> | 2022-02-11 19:40:34 -0500 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2022-02-13 09:17:44 +0700 |
commit | ae7645384a12d98cf2d0ca2885be7e20b3d8b5ed (patch) | |
tree | 1e887bf63c8a2c46a61dd053c5669abfbe26a659 /system/dynamips | |
parent | 5f4134fbd0b081c43a16142a76a8da761bc42d90 (diff) |
system/dynamips: Fix 15.0 build.
Signed-off-by: B. Watson <yalhcru@gmail.com>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/dynamips')
-rw-r--r-- | system/dynamips/dynamips.SlackBuild | 39 |
1 files changed, 17 insertions, 22 deletions
diff --git a/system/dynamips/dynamips.SlackBuild b/system/dynamips/dynamips.SlackBuild index 96b59d3145f77..6284f4698c692 100644 --- a/system/dynamips/dynamips.SlackBuild +++ b/system/dynamips/dynamips.SlackBuild @@ -34,15 +34,12 @@ PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in - i?86) ARCH=i486 ;; + i?86) ARCH=i586 ;; arm*) ARCH=arm ;; *) ARCH=$( uname -m ) ;; 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 "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" exit 0 @@ -52,8 +49,8 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -if [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" @@ -77,30 +74,28 @@ cd $PRGNAM-$SRCVER-$SUFFIX 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 \ + -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 {} \; - -CFLAGS="$SLKCFLAGS" \ -CXXFLAGS="$SLKCFLAGS" \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \+ sed -i 's/^\(\.PHONY: all dynamips\)/# \1/' Makefile sed -i "s/-L\/usr\/lib\ -L\.\ -ldl/-L\/usr\/lib${LIBDIRSUFFIX} -L. -ldl -lz/" stable/Makefile -if [ $ARCH == "x86_64" ] -then - make dynamips.stable DYNAMIPS_ARCH=amd64 DYNAMIPS_LIB=lib64 +# 20220211 bkw: actually use SLKCFLAGS... and show me the compile commands. +sed -i -e "s,-O3,$SLKCFLAGS," \ + -e 's,@\$(CC),$(CC),g' \ + stable/Makefile + +if [ $ARCH == "x86_64" ]; then + make -j1 dynamips.stable DYNAMIPS_ARCH=amd64 DYNAMIPS_LIB=lib64 else - make dynamips.stable + make -j1 dynamips.stable fi -make install DESTDIR=$PKG/usr - -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 - -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 +make -j1 install DESTDIR=$PKG/usr +strip $PKG/usr/bin/* +gzip -9 $PKG/usr/man/man*/* +rm -rf $PKG/usr/etc # 'make install' creates this, empty, useless. chmod 644 README.community mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION |