diff options
author | B. Watson <yalhcru@gmail.com> | 2017-08-13 16:26:01 -0400 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2017-08-19 07:10:58 +0700 |
commit | a1e910d6e0d20b0ee76726a64c514cf8aeee9f2b (patch) | |
tree | 42a3b5cd9d58ce40b688b0cc885d26a883cd9a0b /audio/listener/listener.SlackBuild | |
parent | 2895c88381129918e9a1c1814c7cb041f8bdbe57 (diff) | |
download | slackbuilds-a1e910d6e0d20b0ee76726a64c514cf8aeee9f2b.tar.gz |
audio/listener: Updated for version 2.2, new maintainer.
Signed-off-by: B. Watson <yalhcru@gmail.com>
Diffstat (limited to 'audio/listener/listener.SlackBuild')
-rw-r--r-- | audio/listener/listener.SlackBuild | 68 |
1 files changed, 36 insertions, 32 deletions
diff --git a/audio/listener/listener.SlackBuild b/audio/listener/listener.SlackBuild index 63d6176c28..622464b13f 100644 --- a/audio/listener/listener.SlackBuild +++ b/audio/listener/listener.SlackBuild @@ -15,8 +15,15 @@ # Updated to version 2.0.1 09/10/2011 # +# 20170813 bkw: +# - take over maintenance. If you want to buy me a beer too, I won't stop you! +# - update for v2.2 (which has been out for 4+ years now) +# - include filter plugins in package +# - add man page +# - script cleanups + PRGNAM=listener -VERSION=${VERSION:-2.0.1} +VERSION=${VERSION:-2.2} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -56,40 +63,37 @@ rm -rf $PRGNAM-$VERSION tar -xvf $CWD/$PRGNAM-$VERSION.tgz 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 {} \; - -find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ - | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true - -# make the destination directories for the Makefile, otherwise it keels over. -mkdir -p $PKG/{usr/bin,etc} - -# fix Makefile so install path to /usr/bin, not /bin -sed -i 's@(INSTALL_PREFIX)/bin@(INSTALL_PREFIX)/usr/bin@g' Makefile - -# fix listener.h hardcoded config file path -sed -i 's@/usr/local/etc/listener.conf@/etc/listener.conf@' listener.h - -# fix the documentation reference to the config file too -sed -i 's@/usr/local/etc/listener.conf@/etc/listener.conf@' manual.html - -CFLAGS="$SLKCFLAGS" \ -make install INSTALL_PREFIX=$PKG - -find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ - | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true +find . -type f -exec chmod 644 {} + +find . -type d -exec chmod 755 {} + + +# fix hardcoded config file path +sed -i 's,/usr/local/etc,/etc,g' $PRGNAM.h manual.html + +# search for filter plugins here: +FILTERDIR=/usr/lib$LIBDIRSUFFIX/$PRGNAM +sed -i "s|-ldl|-Wl,-rpath,$FILTERDIR &|" Makefile + +# build the main program +CFLAGS="$SLKCFLAGS" make + +# build (some of) the example filters +mkdir -p $PKG/$FILTERDIR +for i in deglitch highpass lowpass unspike; do + cd filter_lib_examples/$i + sed -i "s,^CFLAGS=,&$SLKCFLAGS ," Makefile + CFLAGS="$SLKCFLAGS" make + install -s *.so.* $PKG/$FILTERDIR + cd - +done + +# easier to install manually than coerce 'make install' to play nice. +mkdir -p $PKG/usr/bin $PKG/etc +install -s -m0755 $PRGNAM set$PRGNAM $PKG/usr/bin +cat $PRGNAM.conf > $PKG/etc/$PRGNAM.conf.new mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -( cp -a license.txt manual.html $PKG/usr/doc/$PRGNAM-$VERSION ) +cp -a license.txt manual.html $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild -find $PKG/usr/doc/$PRGNAM-$VERSION -type f -exec chmod 644 {} \; - -# Don't clobber existing .conf files in /etc -mv $PKG/etc/listener.conf $PKG/etc/listener.conf.new mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc |