#!/bin/sh # Heavily based on the Slackware 12.2 SlackBuild # http://nicotine.thegraveyard.org/ # http://thegraveyard.org/daelstorm/nicotine-patch.php # SlackBuild by gall0ws ~at~ tiscali ~dot~ it NAME=nicotine+ VERSION=1.2.12 ARCH=i386 test -z "$TMP" && TMP=/tmp/tgz 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 || exit 1 chown -R root:root . mkdir -p $PKG/usr/lib/python2.5/site-packages/pynicotine ## trayicon -- needs to be compiled ############################ cd trayicon ./autogen.py make || exit 1 cp trayicon.so $PKG/usr/lib/python2.5/site-packages/pynicotine cd .. ################################################################ python setup.py build || exit 1 cp -r build/lib/pynicotine $PKG/usr/lib/python2.5/site-packages/ mkdir -p $PKG/usr/bin/ cp build/scripts-2.5/nicotine.py $PKG/usr/bin/ cp build/scripts-2.5/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/documentation/ ln -sf /usr/doc/$NAME-$VERSION/NicotinePlusGuide.html \ $PKG/usr/share/nicotine/documentation/ cp -r sounds $PKG/usr/share/nicotine/ for i in de es fi fr hu it nl pl pt_BR sk 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 . echo -ne "\nmaking $NAME package.. " requiredbuilder -v -y -s $CWD $PKG 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" }