diff options
Diffstat (limited to 'development/splint/splint.SlackBuild')
-rw-r--r-- | development/splint/splint.SlackBuild | 42 |
1 files changed, 26 insertions, 16 deletions
diff --git a/development/splint/splint.SlackBuild b/development/splint/splint.SlackBuild index cd1aa833e5..1f0b956521 100644 --- a/development/splint/splint.SlackBuild +++ b/development/splint/splint.SlackBuild @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for splint @@ -10,10 +10,13 @@ # Granted WTFPL, Version 2, as published by Sam Hocevar. See # http://sam.zoy.org/wtfpl/COPYING for more details. +cd $(dirname $0) ; CWD=$(pwd) + PRGNAM=splint -VERSION=${VERSION:-3.1.2} +VERSION=${VERSION:-20170327_3fb908d} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -23,7 +26,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} @@ -47,15 +57,17 @@ fi rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -rm -rf $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-$VERSION.src.tgz -cd $PRGNAM-$VERSION +rm -rf $PRGNAM-patched-$VERSION +tar xvf $CWD/$PRGNAM-patched-$VERSION.tar.xz +cd $PRGNAM-patched-$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 640 -o -perm 600 -o -perm 444 \ - -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + +autoreconf -vif CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ @@ -68,20 +80,18 @@ CXXFLAGS="$SLKCFLAGS" \ --build=$ARCH-slackware-linux # Fix for bison-3 (LDFLAGS doesn't work) -sed -i \ - -e 's/^LIBS = $/LIBS = -lfl/' \ - src/Makefile +#sed -i \ +# -e 's/^LIBS = $/LIBS = -lfl/' \ +# src/Makefile make -j1 make install DESTDIR=$PKG -find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ +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 -( cd $PKG/usr/man - find . -type f -exec gzip -9 {} \; - for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done -) +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/html cp -a README $PKG/usr/doc/$PRGNAM-$VERSION @@ -93,4 +103,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 |