diff options
author | Ruan K. F <ruan.klein@gmail.com> | 2015-01-16 00:49:57 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2015-01-16 00:49:57 +0700 |
commit | ca69548ed349df534f6d8a258699217ff7628f60 (patch) | |
tree | 4965c792aad20986ee110e732e08acf922e62604 /audio | |
parent | a065800ab728fb04b39151cdb11dd8d65122c473 (diff) |
audio/discord: Update script.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'audio')
-rw-r--r-- | audio/discord/README | 3 | ||||
-rw-r--r-- | audio/discord/discord.SlackBuild | 50 | ||||
-rw-r--r-- | audio/discord/discord.info | 4 |
3 files changed, 43 insertions, 14 deletions
diff --git a/audio/discord/README b/audio/discord/README index 791e4b50f648c..05a47c71bf9f3 100644 --- a/audio/discord/README +++ b/audio/discord/README @@ -4,6 +4,9 @@ choice. The default is to play the files via the computer's sound card, but they can be written to an output file instead. Only file formats available in libsndfile can be used as input or output. +The SVN version includes recent features. To use this, pass SVN=yes option +"discord-svn" and "discord" are available on /usr/bin with SVN version. + WARNING: USE AT YOUR OWN RISK! If used consistently (a half hour or more per day) over long periods diff --git a/audio/discord/discord.SlackBuild b/audio/discord/discord.SlackBuild index 51155baa95333..efe375a058097 100644 --- a/audio/discord/discord.SlackBuild +++ b/audio/discord/discord.SlackBuild @@ -2,7 +2,7 @@ # Slackware build script for discord -# Written by p5ych0 r0075 <p5ych0.r0075@gmail.com> +# Written by Ruan K. F <ruan.klein@gmail.com> # # Redistribution and use of this script, with or without modification, is # permitted provided that the following conditions are met: @@ -24,9 +24,19 @@ PRGNAM=discord VERSION=${VERSION:-3.2.1} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} +DOCS="AUTHORS ChangeLog COPYING INSTALL NEWS README" + +# The svn version contains new features like Sin, Square, Triangle, half saw wave and others. +# The Spin voice is other feature for this version. +# New options: +# --auto_volume and --max_volume options to specify volume levels. +SVN=${SVN:-no} +SVN_LINK=svn://svn.code.sf.net/p/discord/code/trunk +PKGSVN=discord-svn + if [ -z "$ARCH" ]; then case "$( uname -m )" in i?86) ARCH=i486 ;; @@ -54,7 +64,7 @@ else LIBDIRSUFFIX="" fi -set -e +set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT @@ -64,10 +74,10 @@ tar -jxvf $CWD/$PRGNAM-$VERSION.tar.bz2 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 {} \; + \( -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" \ CXXFLAGS="$SLKCFLAGS" \ @@ -80,23 +90,39 @@ CXXFLAGS="$SLKCFLAGS" \ --docdir=/usr/doc/$PRGNAM-$VERSION \ --build=$ARCH-slackware-linux -make || exit 1 -make install DESTDIR=$PKG + make || exit 1 + make install DESTDIR=$PKG +if [ "$SVN" = "yes" ]; then + OPT="${SLKCFLAGS} -Wall -W -s " + LIBS=" -lm -lpthread -lasound -lncurses -lsndfile -lm -lsamplerate " + DOCS+=" $PKGSVN/CAUTION $PKGSVN/DISCLAIMER" + svn checkout $SVN_LINK $PKGSVN || exit 1 + cd $PKGSVN + # fix version on discord.c to compile + sed -i '24s/^\(\#.*\)$/\#include\ \"version.h\"\n\1/' discord.c + echo -e "#ifndef VERSION\n\t#define VERSION \"${VERSION}svn\"\n#endif" > version.h + gcc $OPT discord.c $LIBS -o $PKGSVN || exit 1; + install -m0755 -o 0:0 $PKGSVN $PKG/usr/bin + cd .. +fi 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 $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 mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a \ - AUTHORS ChangeLog COPYING INSTALL NEWS README \ - $PKG/usr/doc/$PRGNAM-$VERSION +cp -a $DOCS $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 +# converter of sbagen scripts to discord scripts +mv $PKG/usr/share/$PRGNAM/convert_sbg_to_discord.py $PKG/usr/bin +chmod 755 $PKG/usr/bin/convert_sbg_to_discord.py + cd $PKG /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/audio/discord/discord.info b/audio/discord/discord.info index 0db13934fbc7a..94e52d1b018a9 100644 --- a/audio/discord/discord.info +++ b/audio/discord/discord.info @@ -6,5 +6,5 @@ MD5SUM="7f7341f01032314f618e9ae5bb6137e6" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="" -MAINTAINER="p5ych0 r0075" -EMAIL="p5ych0.r0075@gmail.com" +MAINTAINER="Ruan K. F" +EMAIL="ruan.klein@gmail.com" |