ragel: Update the build script format

This commit is contained in:
Eugen Wissner 2022-05-24 16:37:57 +02:00
parent 086a00c59b
commit 3be0aedffd
Signed by: belka
GPG Key ID: A27FDC1E8EE902C0
2 changed files with 25 additions and 16 deletions

View File

@ -105,8 +105,6 @@ mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
rm -f $PKG/usr/lib*/*.?a
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# Slackware build script for ragel
@ -22,10 +22,18 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# 20220308 bkw: Modified by SlackBuilds.org:
# This build always fails if ragel is already installed. Add a check
# to make it fail quickly, with a useful error message (instead of a
# confusing link error, after compiling for several minutes).
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=ragel
VERSION=${VERSION:-7.0.4}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@ -35,7 +43,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}
@ -63,16 +75,18 @@ mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.?z*
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$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 \
-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 {} \+
patch --verbose -p1 -i $CWD/lib64.patch
if [ "$LIBDIRSUFFIX" = "64" ]; then
patch --verbose -p1 -i $CWD/lib64.patch
fi
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
@ -89,20 +103,17 @@ CXXFLAGS="$SLKCFLAGS" \
--build=$ARCH-slackware-linux
make
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
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 install-strip DESTDIR=$PKG
gzip -9 $PKG/usr/man/man*/*
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
rm -f $PKG/usr/lib*/*.la
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