diff options
Diffstat (limited to 'libraries/zziplib/zziplib.SlackBuild')
-rw-r--r-- | libraries/zziplib/zziplib.SlackBuild | 92 |
1 files changed, 56 insertions, 36 deletions
diff --git a/libraries/zziplib/zziplib.SlackBuild b/libraries/zziplib/zziplib.SlackBuild index 44761f2555..7a0860641b 100644 --- a/libraries/zziplib/zziplib.SlackBuild +++ b/libraries/zziplib/zziplib.SlackBuild @@ -1,8 +1,8 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for zziplib -# Copyright 2012-2018 Larry Hajali <larryhaja[at]gmail[dot]com> +# Copyright 2012-2020 Larry Hajali <email removed> # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -22,10 +22,27 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# 20240314 bkw: update for v0.13.74. +# 20230604 bkw: +# - new maintainer. +# - update for v0.13.72. +# - switch to cmake. +# - make slack-desc more concise. + +# Note: 0.13.71 had the file "usr/lib64/pkgconfig/zzip-zlib-config.pc", +# and 0.13.72 doesn't have it. Dependees are alephone and milkytracker [*]. +# These build correctly without this .pc file. If anyone has issues +# with new builds because of this, please contact me. +# [*] desmume had zziplib listed in REQUIRES, but it doesn't actually +# use it (maybe it did at one time?). + +cd $(dirname $0) ; CWD=$(pwd) + PRGNAM=zziplib -VERSION=${VERSION:-0.13.69} +VERSION=${VERSION:-0.13.74} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -35,7 +52,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,40 +84,39 @@ rm -rf $PRGNAM-$VERSION 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 \ - \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ - -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; - -CFLAGS="$SLKCFLAGS" \ -./configure \ - --prefix=/usr \ - --libdir=/usr/lib${LIBDIRSUFFIX} \ - --mandir=/usr/man \ - --enable-static=no \ - --enable-sdl \ - --without-debug \ - --disable-dependency-tracking \ - --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 ! -perm 644 -exec chmod 0644 '{}' \; -find $PKG/usr/man -type f -exec gzip -9 {} \; - -mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a \ - ChangeLog COPYING* README TODO \ - $PKG/usr/doc/$PRGNAM-$VERSION -cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild +find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} + -o \ + \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} + + +# 20230604 bkw: switch to cmake, because upstream is phasing out +# autotools builds. the next zziplib release probably won't support +# autotools at all. + +# -DZZIPTEST=OFF prevents cmake from doing network access, and makes +# no difference in the package. + +mkdir -p build +cd build + cmake \ + -DZZIPTEST=OFF \ + -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DLIB_SUFFIX=${LIBDIRSUFFIX} \ + -DCMAKE_INSTALL_MANDIR=/usr/man \ + -DCMAKE_BUILD_TYPE=Release .. + make + make install/strip DESTDIR=$PKG +cd .. + +gzip -9 $PKG/usr/man/man*/* + +PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION +mkdir -p $PKGDOC +cp -a ChangeLog COPYING* README* TODO $PKGDOC +cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild 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 |