diff options
Diffstat (limited to 'academic/magic/magic.SlackBuild')
-rw-r--r-- | academic/magic/magic.SlackBuild | 32 |
1 files changed, 28 insertions, 4 deletions
diff --git a/academic/magic/magic.SlackBuild b/academic/magic/magic.SlackBuild index 31127e136a..241f4f9e2e 100644 --- a/academic/magic/magic.SlackBuild +++ b/academic/magic/magic.SlackBuild @@ -1,7 +1,9 @@ -#!/bin/sh +#!/bin/bash # 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 @@ -14,10 +16,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=magic -VERSION=${VERSION:-8.0.211} +VERSION=${VERSION:-8.3.474} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -27,7 +32,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} @@ -61,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 \ @@ -78,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 @@ -89,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 |