diff options
Diffstat (limited to 'misc/recode/recode.SlackBuild')
-rw-r--r-- | misc/recode/recode.SlackBuild | 61 |
1 files changed, 41 insertions, 20 deletions
diff --git a/misc/recode/recode.SlackBuild b/misc/recode/recode.SlackBuild index 6b10f1bfca..983cc10c81 100644 --- a/misc/recode/recode.SlackBuild +++ b/misc/recode/recode.SlackBuild @@ -1,7 +1,8 @@ -#!/bin/sh +#!/bin/bash # Copyright (c) 2007 Niki Kovacs <contact@kikinovak.net> # Copyright 2014 Ryan P.C. McQuen, WA, <ryanpcmcquen@member.fsf.org> +# Copyright 2023 Jeremy Hansen <jebrhansen+SBo@gmail.com> # # Slackware build script for recode @@ -30,12 +31,20 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# 20220412 bkw: Modified by SlackBuilds.org, BUILD=4: +# - use correct github URL. +# - strip binary and library. +# - remove useless ABOUT-NLS from doc dir. + +cd $(dirname $0) ; CWD=$(pwd) + PRGNAM=recode -SRCNAM=Recode -VERSION=${VERSION:-3.7_beta2} -SRCVER=$(echo $VERSION | tr _ -) -BUILD=${BUILD:-2} +VERSION=${VERSION:-3.7.13} +GNULIBVER=${GNULIBVER:-2752f1cb315fc461e3df263ab5bb03a354cf4308} +BOOTSTRAPVER=${BOOTSTRAPVER:-037f83765b6e8f90dfabdfac4889be22a5a3f4a4} +BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -45,7 +54,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} @@ -69,34 +85,39 @@ set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -rm -rf $SRCNAM-$SRCVER -tar xvf $CWD/$SRCNAM-$SRCVER.tar.gz || tar xvf $CWD/v$SRCVER.tar.gz -cd $SRCNAM-$SRCVER +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION +# Extract git submodule archives to correct location +tar xvf $CWD/gnulib-$GNULIBVER.tar.gz --strip-components=1 -C gnulib/ +tar xvf $CWD/bootstrap-$BOOTSTRAPVER.tar.gz --strip-components=1 -C gl-mod/bootstrap/ 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 {} \; - -# allow recode to be built on a gcc that is not ancient -ryan -sed -i "s/bool ignore : 2;/bool ignore : 1;/g" ./src/recodext.h + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \+ -# libdir and target are critical for x86_64 +./bootstrap --skip-po CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr \ - --enable-static=no \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ --infodir=/usr/info \ --mandir=/usr/man \ - --libdir=/usr/lib${LIBDIRSUFFIX} \ + --enable-static=no \ --build=$ARCH-slackware-linux \ --host=$ARCH-slackware-linux \ --target=$ARCH-slackware-linux make -make install DESTDIR=$PKG +make install-strip DESTDIR=$PKG + +rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la + +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 @@ -105,7 +126,7 @@ rm -f $PKG/usr/info/dir gzip -9 $PKG/usr/info/*.info* mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a ABOUT-NLS AUTHORS COPYING* NEWS README THANKS TODO \ +cp -a AUTHORS COPYING* NEWS README THANKS TODO \ $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild @@ -113,4 +134,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 |