diff options
Diffstat (limited to 'audio/vocoder/vocoder.SlackBuild')
-rw-r--r-- | audio/vocoder/vocoder.SlackBuild | 34 |
1 files changed, 23 insertions, 11 deletions
diff --git a/audio/vocoder/vocoder.SlackBuild b/audio/vocoder/vocoder.SlackBuild index be9c003c93..ed48fe6883 100644 --- a/audio/vocoder/vocoder.SlackBuild +++ b/audio/vocoder/vocoder.SlackBuild @@ -1,21 +1,25 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for vocoder -# Written by B. Watson (yalhcru@gmail.com) +# Written by B. Watson (urchlay@slackware.uk) # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. +# 20211130 bkw: BUILD=3, new-style icons. # 20170312 bkw: # - actually use SLKCFLAGS # - stop fluid from writing to /root/.fltk/ # - use "-include unistd.h" compiler opt instead of a patch # - BUILD=2 +cd $(dirname $0) ; CWD=$(pwd) + PRGNAM=vocoder VERSION=${VERSION:-0.29} -BUILD=${BUILD:-2} +BUILD=${BUILD:-3} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -25,7 +29,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} @@ -53,11 +61,8 @@ rm -rf $PRGNAM tar xvf $CWD/$PRGNAM-jack-$VERSION.tar.gz cd $PRGNAM 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 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 {} \+ sed -i "s,-O2,$SLKCFLAGS -include unistd.h," src/Makefile sed -i "/^CFLAGS/s,\$, $SLKCFLAGS -include unistd.h," util/Makefile @@ -75,8 +80,15 @@ install -s -m0755 src/$PRGNAM $PKG/usr/bin/$PRGNAM # icon made for this slackbuild, by crudely stitching together a generic Tux # plus http://openclipart.org/detail/24414/old-style-microphone-by-boobaloo +for px in 16 32 48 64 128; do + size=${px}x${px} + dir=$PKG/usr/share/icons/hicolor/$size/apps + mkdir -p $dir + convert -resize $size $CWD/$PRGNAM.png $dir/$PRGNAM.png +done + mkdir -p $PKG/usr/share/pixmaps -cat $CWD/$PRGNAM.png > $PKG/usr/share/pixmaps/$PRGNAM.png +ln -s ../icons/hicolor/48x48/apps/$PRGNAM.png $PKG/usr/share/pixmaps/$PRGNAM.png # .desktop written for this slackbuild. mkdir -p $PKG/usr/share/applications @@ -99,4 +111,4 @@ if [ "${SETCAP:-yes}" = "yes" ]; then fi 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 |