summaryrefslogtreecommitdiff
path: root/audio
diff options
context:
space:
mode:
authorRuan K. F <ruan.klein@gmail.com>2015-01-21 18:12:40 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2015-01-22 06:34:04 +0700
commit5b10a8ba786a26bc0df94eb4374bdab7d46418fb (patch)
tree10d54e613c0ac604996078973b471978db3a957f /audio
parent7792dc57ea8df851090037af7d32ebc99e7974e6 (diff)
downloadslackbuilds-5b10a8ba786a26bc0df94eb4374bdab7d46418fb.tar.gz
audio/discord: Update script.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'audio')
-rw-r--r--audio/discord/discord.SlackBuild19
-rw-r--r--audio/discord/doinst.sh2
2 files changed, 10 insertions, 11 deletions
diff --git a/audio/discord/discord.SlackBuild b/audio/discord/discord.SlackBuild
index efe375a058..d7d8d55f68 100644
--- a/audio/discord/discord.SlackBuild
+++ b/audio/discord/discord.SlackBuild
@@ -24,7 +24,7 @@
PRGNAM=discord
VERSION=${VERSION:-3.2.1}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-3}
TAG=${TAG:-_SBo}
DOCS="AUTHORS ChangeLog COPYING INSTALL NEWS README"
@@ -34,8 +34,8 @@ DOCS="AUTHORS ChangeLog COPYING INSTALL NEWS README"
# 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
+SVN_LINK=svn://svn.code.sf.net/p/$PRGNAM/code/trunk
+PKGSVN=$PRGNAM-svn
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -90,7 +90,7 @@ CXXFLAGS="$SLKCFLAGS" \
--docdir=/usr/doc/$PRGNAM-$VERSION \
--build=$ARCH-slackware-linux
- make || exit 1
+ make
make install DESTDIR=$PKG
if [ "$SVN" = "yes" ]; then
OPT="${SLKCFLAGS} -Wall -W -s "
@@ -99,30 +99,27 @@ if [ "$SVN" = "yes" ]; then
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
+ sed -i 's/^\(\#.*\)$/\#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 \
+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
+
mkdir -p $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
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/audio/discord/doinst.sh b/audio/discord/doinst.sh
new file mode 100644
index 0000000000..94f1e51a29
--- /dev/null
+++ b/audio/discord/doinst.sh
@@ -0,0 +1,2 @@
+( cd usr/share/discord ; chmod 755 convert_sbg_to_discord.py )
+( cd usr/bin ; ln -sf /usr/share/discord/convert_sbg_to_discord.py convert_sbg_to_discord.py )