diff options
Diffstat (limited to 'audio/minimodem/minimodem.SlackBuild')
-rw-r--r-- | audio/minimodem/minimodem.SlackBuild | 74 |
1 files changed, 47 insertions, 27 deletions
diff --git a/audio/minimodem/minimodem.SlackBuild b/audio/minimodem/minimodem.SlackBuild index 423e670eba..d78b36deda 100644 --- a/audio/minimodem/minimodem.SlackBuild +++ b/audio/minimodem/minimodem.SlackBuild @@ -2,7 +2,8 @@ # SlackBuild script for minimodem -# Copyright 2014 Benjamin Trigona-Harany <slackbuilds@jaxartes.net> +# Copyright 2014 Benjamin Trigona-Harany <email removed> +# Copyright 2024 B. Watson <urchlay@slackware.uk> # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -24,11 +25,20 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# Modified and now maintained by B. Watson. + +# 20240404 bkw: +# - take over maintenance. +# - update for v0.24+20210717_bb2f34c. +# - don't install ChangeLog, it's empty. +# - fix minor man page formatting issue. +# - add optional sndio dependency. + cd $(dirname $0) ; CWD=$(pwd) PRGNAM=minimodem -VERSION=${VERSION:-0.24} -BUILD=${BUILD:-2} +VERSION=${VERSION:-0.24+20210717_bb2f34c} +BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -40,9 +50,6 @@ if [ -z "$ARCH" ]; then esac fi -# 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 @@ -54,55 +61,68 @@ OUTPUT=${OUTPUT:-/tmp} if [ "$ARCH" = "i586" ]; then SLKCFLAGS="-O2 -march=i586 -mtune=i686" - LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" - LIBDIRSUFFIX="" elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" - LIBDIRSUFFIX="64" else SLKCFLAGS="-O2" - LIBDIRSUFFIX="" fi set -e +SRCVER="$( echo $VERSION | cut -d+ -f1 )" +PATCHVER="$( echo $VERSION | cut -d+ -f2 )" + rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -rm -rf $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-$VERSION.tar.gz -cd $PRGNAM-$VERSION +rm -rf $PRGNAM-$SRCVER +tar xvf $CWD/$PRGNAM-$SRCVER.tar.gz +cd $PRGNAM-$SRCVER 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 {} \; +find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} + -o \ + \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} + + +# 20240404 bkw: allow building with sndio. it compiles, but hasn't +# been run-tested by the SlackBuild maintainer. configure script +# doesn't autodetect; --without-sndio really is required if sndio +# isn't installed. +if pkg-config --exists sndio && [ "${SNDIO:-yes}" = "yes" ]; then + WITH="with" +else + WITH="without" +fi + +# 20240403 bkw: use upstream's latest git (which is ~3 years old now). +# This patch came from 'git diff 0.24', but I had to manually edit the +# diff to remove the patches for files named debian/*. +zcat $CWD/$PATCHVER.diff | patch -p1 + +# 20240404 bkw: I AM THE GREAT CORNHOLIO! I need .TP for my man page! +sed -i.bak '/limit max-conf/s,^,.TP\n,' src/$PRGNAM.1.in + +autoreconf -if CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr \ --mandir=/usr/man \ + --$WITH-sndio \ --with-pulseaudio=yes 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*/* +# 20240403 bkw: ChangeLog is a 0-byte placeholder. mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a AUTHORS ChangeLog COPYING README THANKS $PKG/usr/doc/$PRGNAM-$VERSION +cp -a AUTHORS COPYING README THANKS $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install -cat $CWD/slack-desc > $PKG/install/slack-desc +sed "s,@WITH@,$WITH," $CWD/slack-desc > $PKG/install/slack-desc cd $PKG /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE |