diff options
Diffstat (limited to 'libraries/liblangtag/liblangtag.SlackBuild')
-rw-r--r-- | libraries/liblangtag/liblangtag.SlackBuild | 41 |
1 files changed, 32 insertions, 9 deletions
diff --git a/libraries/liblangtag/liblangtag.SlackBuild b/libraries/liblangtag/liblangtag.SlackBuild index 203a213c34..aebe04d1bb 100644 --- a/libraries/liblangtag/liblangtag.SlackBuild +++ b/libraries/liblangtag/liblangtag.SlackBuild @@ -1,8 +1,10 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for liblangtag -# Copyright 2015, 2017 Hunter Sezen California, USA +# Copyright 2015, 2017, 2020 Hunter Sezen California, USA +# All rights reserved. +# Copyright 2023 Christoph Willing Brisbane, Australia # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -22,10 +24,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=liblangtag -VERSION=${VERSION:-0.6.2} +VERSION=${VERSION:-0.6.4} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -35,7 +40,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} @@ -54,7 +66,7 @@ else LIBDIRSUFFIX="" fi -set -e +set -eu rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT @@ -62,6 +74,10 @@ cd $TMP rm -rf $PRGNAM-$VERSION tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2 cd $PRGNAM-$VERSION + +sed -i -e '/#define __LANGTAG_H__/a#include <stdlib.h>' liblangtag/langtag.h +sed -i -e '/#define __LT_TAG_H__/a#include <stdlib.h>' liblangtag/lt-tag.h + chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ @@ -69,6 +85,11 @@ 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 {} \; +# Don't create the __pycache__ directory. +export PYTHONDONTWRITEBYTECODE=1 + +autoreconf -fi + CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ @@ -81,15 +102,17 @@ CXXFLAGS="$SLKCFLAGS" \ 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 -print0 | xargs -0 file | grep -e "executable" -e "shared object" | + grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a AUTHORS COPYING ChangeLog INSTALL NEWS README $PKG/usr/doc/$PRGNAM-$VERSION +cp -a AUTHORS COPYING NEWS README $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 |