#!/bin/bash # # http://nicotine.thegraveyard.org/ # http://thegraveyard.org/daelstorm/nicotine-patch.php # # SlackBuild by gall0ws ~at~ tiscali ~dot~ it # NAME=nicotine+ VERSION=1.2.5.1 ARCH=x86 test -z "$TMP" && TMP=/tmp BUILD=1gal PKG=$TMP/package-$NAME CWD=`pwd` TARBALL=$NAME-$VERSION.tar.bz2 PACK=$NAME-$VERSION-$ARCH-$BUILD.tgz function get_src() { wget http://osdn.dl.sourceforge.net/sourceforge/nicotine-plus/$TARBALL || exit 1 } test -e $PKG && rm -rf $PKG test -e $TMP/$NAME-$VERSION && rm -rf $TMP/$NAME-$VERSION test ! -e $TARBALL && get_src mkdir -p $PKG/usr/share/gnome/apps/Internet mkdir -p $PKG/usr/share/pixmaps tar xvjf $CWD/$TARBALL -C $TMP cd $TMP/$NAME-$VERSION chown -R root.root . mkdir -p $PKG/usr/lib/python2.4/site-packages/pynicotine ## trayicon -- needs to be compiled ############################ cd trayicon ./autogen.py make || exit 1 cp trayicon.so $PKG/usr/lib/python2.4/site-packages/pynicotine cd .. ################################################################ python setup.py build || exit 1 cp -r build/lib/pynicotine $PKG/usr/lib/python2.4/site-packages/ mkdir -p $PKG/usr/bin/ cp build/scripts-2.4/nicotine $PKG/usr/bin/ cp build/scripts-2.4/nicotine-import-winconfig $PKG/usr/bin/ cp -a \ img/*.png \ $PKG/usr/share/pixmaps cp -a \ files/nicotine.desktop \ $PKG/usr/share/gnome/apps/Internet cp -a \ files/*.png \ $PKG/usr/share/pixmaps/ mkdir -p $PKG/usr/doc/$NAME-$VERSION cp -a \ COPYING MANIFEST PKG-INFO doc/* \ $PKG/usr/doc/$NAME-$VERSION mkdir -p $PKG/usr/share/nicotine/ cp -r sounds $PKG/usr/share/nicotine/ for i in de dk es fr it nl pl sv do mkdir -p $PKG/usr/share/locale/$i/LC_MESSAGES/ cp languages/$i/*.mo $PKG/usr/share/locale/$i/LC_MESSAGES/ done cp -a $CWD/slack-desc $CWD/$NAME.SlackBuild $PKG/usr/doc/$NAME-$VERSION mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG chown -R root.root . chown -R root.bin usr/bin/ echo -ne "\nmaking $NAME package.. " makepkg -l y -c n $CWD/$NAME-$VERSION-$ARCH-$BUILD.tgz &> /dev/null echo "done" test "$1" = "--cleanup" && { echo -ne "cleaning up.. " rm -rf $TMP/$NAME-$VERSION rm -rf $PKG echo "done" }