diff options
Diffstat (limited to 'audio/sfc/sfc.SlackBuild')
-rw-r--r-- | audio/sfc/sfc.SlackBuild | 42 |
1 files changed, 29 insertions, 13 deletions
diff --git a/audio/sfc/sfc.SlackBuild b/audio/sfc/sfc.SlackBuild index 29125f5147359..ea2058d3f209f 100644 --- a/audio/sfc/sfc.SlackBuild +++ b/audio/sfc/sfc.SlackBuild @@ -6,11 +6,16 @@ # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. +# 20211204 bkw: BUILD=3. +# - install setgid audio (for access to /dev/snd/seq). +# - add icons and .desktop. +# - fix hardcoded (wrong) version number in binary. + cd $(dirname $0) ; CWD=$(pwd) PRGNAM=sfc VERSION=${VERSION:-0.018} -BUILD=${BUILD:-2} +BUILD=${BUILD:-3} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -22,9 +27,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 @@ -57,11 +59,10 @@ 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 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,v0\.017,v$VERSION,g" src/{SFSUI.cxx,main.C} CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ @@ -77,12 +78,27 @@ CXXFLAGS="$SLKCFLAGS" \ make make install-strip DESTDIR=$PKG -# TODO: icon, .desktop, maybe a man page? +# needs to be setgid audio +chown root:audio $PKG/usr/bin/$PRGNAM +chmod 2750 $PKG/usr/bin/$PRGNAM + +for px in 16 32 48 64; 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/ +ln -s ../icons/hicolor/48x48/apps/$PRGNAM.png $PKG/usr/share/pixmaps/$PRGNAM.png + +mkdir -p $PKG/usr/share/applications +cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop + +# TODO: maybe a man page? mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a \ - AUTHORS COPYING ChangeLog README TODO \ - $PKG/usr/doc/$PRGNAM-$VERSION +cp -a AUTHORS COPYING ChangeLog README TODO $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install |