diff options
Diffstat (limited to 'academic/magic/magic.SlackBuild')
-rw-r--r-- | academic/magic/magic.SlackBuild | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/academic/magic/magic.SlackBuild b/academic/magic/magic.SlackBuild index 73f7640cfc974..241f4f9e2e427 100644 --- a/academic/magic/magic.SlackBuild +++ b/academic/magic/magic.SlackBuild @@ -2,6 +2,8 @@ # Slackware build script for magic # Written by Mauricio Martinez <eigenfilter {at} gmail [dot] com> +# +# Updated 05/01/2024 by Alfredo Tomasini <alto . tom @ gmail . com > # THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF @@ -17,7 +19,7 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=magic -VERSION=${VERSION:-8.0.211} +VERSION=${VERSION:-8.3.474} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -30,9 +32,6 @@ 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 "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" exit 0 @@ -71,6 +70,18 @@ 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 {} \; +# change the final installation from /usr/lib to usr/lib64 +if [[ "$VERSION" =~ "8.3" ]] && [ "$ARCH" = "x86_64" ] +then +sed -i ' +/^ *INSTALL_LIBDIR *= /{ +s#.*## +i\ +INSTALL_LIBDIR = @DIST_DIR@/lib64 +} ' scripts/defs.mak.in +fi +# exit + CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ @@ -88,8 +99,11 @@ make install DESTDIR=$PKG 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 +mv $PKG/usr/share/man $PKG/usr/ 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 +chmod -R 0644 $PKG/usr/man/*/*.gz +rm -rf $PKG/usr/share mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a doc/* $PKG/usr/doc/$PRGNAM-$VERSION |