#!/bin/sh # Heavily based on the Slackware 12.1 SlackBuild # http://crunchyfrog.googlecode.com # Packager Andrea Sciucca ( gohanz at infinito.it) # http://www.slacky.it # # # Required: GSlacky >= 2.24.1, Configobj, Lxml, Kiwi. # # Optional: # psycopg2 (optional, required to connect to PostgreSQL databases) # MySQL-Python (optional, required to connect to MySQL databases) # # sqlite3 bindings (optional, required to connect to SQLite3 databases) The standard Slackware 12.1 Python package missing the sqlite3 bindings # # cx_Oracle (optional, required to connect to Oracle databases) # # pymssql bindings (optional, required to connect to SQL Server) # # Exit on most errors set -e CWD=`pwd` TMP=${TMP:-/tmp/tgz} PKG=$TMP/package/crunchyfrog NAME=crunchyfrog VERSION=0.3.1 CHOST=i486 ARCH=${ARCH:-noarch} BUILD=1as SOURCE=http://crunchyfrog.googlecode.com/files/$NAME-$VERSION.tar.gz if [ ! -e $NAME-$VERSION.tar.gz ]; then wget -c $SOURCE fi if [ ! -d $TMP ]; then mkdir -p $TMP fi if [ ! -d $PKG ]; then mkdir -p $PKG fi cd $TMP tar xvzf $CWD/$NAME-$VERSION.tar.gz echo -e "\E[0;32m+------------------------------------+\E[0;0m" echo -e "\E[0;32m| Start SlackBuild $NAME-$VERSION |\E[0;0m" echo -e "\E[0;32m+------------------------------------+\E[0;0m" cd $NAME-$VERSION find . -perm 666 -exec chmod 644 {} \; find . -perm 664 -exec chmod 644 {} \; find . -perm 600 -exec chmod 644 {} \; find . -perm 444 -exec chmod 644 {} \; find . -perm 400 -exec chmod 644 {} \; find . -perm 440 -exec chmod 644 {} \; find . -perm 777 -exec chmod 755 {} \; find . -perm 775 -exec chmod 755 {} \; find . -perm 511 -exec chmod 755 {} \; find . -perm 711 -exec chmod 755 {} \; find . -perm 555 -exec chmod 755 {} \; chown -R root:root . make make install DESTDIR=$PKG mkdir -p $PKG/usr/share/locale mv $PKG/usr/locale/* $PKG/usr/share/locale rm -r $PKG/usr/locale mkdir -p $PKG/usr/doc/$NAME-$VERSION cp -a \ AUTHORS COPYING INSTALL README TODO \ $PKG/usr/doc/$NAME-$VERSION ( cd $PKG find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null find . | xargs file | grep "current ar archive" | cut -f 1 -d : | xargs strip -g 2> /dev/null ) mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/slack-desc > $PKG/usr/doc/$NAME-$VERSION/slack-desc cat $CWD/$NAME.SlackBuild > $PKG/usr/doc/$NAME-$VERSION/$NAME.SlackBuild gzip -9 $PKG/usr/man/*/* cd $PKG ADD="configobj >= 4.5.3-noarch-1as, gnome-python >= 2.22.3-i686-14gslacky, gnome-python-desktop >= 2.24.0-i686-15gslacky, lxml >= 2.1.3-i486-1ng, pygtk >= 2.13.0-i686-14gslacky, pysqlite >= 2.4.1-i486-1sl, setuptools >= 0.6c8-i486-2bj, sexy-python >= 0.1.9-i686-14gslacky" \ requiredbuilder -v -y -s $CWD $PKG makepkg -l y -c n $CWD/$NAME-$VERSION-$ARCH-$BUILD.tgz if [ "$1" = "--cleanup" ]; then rm -rf $TMP fi