summaryrefslogtreecommitdiff
path: root/network/nicotine+/nicotine+.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'network/nicotine+/nicotine+.SlackBuild')
-rw-r--r--network/nicotine+/nicotine+.SlackBuild77
1 files changed, 77 insertions, 0 deletions
diff --git a/network/nicotine+/nicotine+.SlackBuild b/network/nicotine+/nicotine+.SlackBuild
new file mode 100644
index 0000000000..6908fbe4d6
--- /dev/null
+++ b/network/nicotine+/nicotine+.SlackBuild
@@ -0,0 +1,77 @@
+#!/bin/sh
+# Slackware build script for nicotine+
+# Written by Iskar Enev <iskar.enev[@]gmail.com>
+# Modified by the SlackBuilds.org project
+
+PRGNAM=nicotine+
+VERSION=1.2.14
+ARCH=${ARCH:-i486}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar -xjvf $CWD/$PRGNAM-$VERSION.tar.bz2
+cd $PRGNAM-$VERSION
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -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 {} \;
+
+python setup.py build
+python setup.py install --root $PKG
+
+( cd $PKG
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null || true
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null
+)
+
+mv $PKG/usr/share/man $PKG/usr
+( cd $PKG/usr/man
+ find . -type f -exec gzip -9 {} \;
+ for i in $(find . -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done
+)
+
+( cd $PKG/usr/bin
+ ln -s nicotine.py nicotine
+)
+
+# Contains duplicates from site-package so removing it
+rm -rf $PKG/usr/pynicotine
+
+# Let's use the larger icon to ensure proper scaling
+sed -i 's%Icon=nicotine-plus-32px.png%Icon=nicotine-plus-96px.png%' \
+ $PKG/usr/share/applications/nicotine.desktop
+
+# Let's put these icons and such in a subdirectory of their own instead of
+# spamming /usr/share/pixmaps with all sorts of stuff
+rm $PKG/usr/share/pixmaps/*
+mkdir -p $PKG/usr/share/pixmaps/nicotine
+cp -a files/*.png img/*.png img/*.ico img/*.xcf img/README \
+ $PKG/usr/share/pixmaps/nicotine
+cp -a $PKG/usr/share/pixmaps/nicotine/nicotine-plus-96px.png $PKG/usr/share/pixmaps
+
+mkdir -p $PKG/usr/doc
+cp -a COPYING MANIFEST PKG-INFO $PKG/usr/share/nicotine/documentation
+mv $PKG/usr/share/nicotine/documentation $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/nicotine-plus.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}