#!/bin/sh # http://www.gnome.org # http://www.slacky.it # Requirements: NAME=pygobject VERSION=2.14.1 ARCH=${ARCH:-i486} BUILD=${BUILD:-1sl} SOURCE=ftp://ftp.gnome.org/pub/gnome/sources/pygobject/2.14/$NAME-$VERSION.tar.bz2 CWD=`pwd` TMP=${TMP:-/tmp/tgz} PKG=$TMP/package-$NAME rm -rf $PKG mkdir -p $PKG if [ ! -e $NAME-$VERSION.tar.bz2 ]; then wget -c $SOURCE fi if [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mtune=i686" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2" fi cd $TMP rm -rf $NAME-$VERSION # unpack the sources and fix their permissions tar -xvf $CWD/$NAME-$VERSION.tar.bz2 || exit 1 cd $NAME-$VERSION chown -R root:root . chmod -R u+w,go+r-w,a-s . echo "" echo "Starting compilation :)" # run configure script CFLAGS="$SLKCFLAGS" CXXFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr \ --sysconfdir=/etc \ --localstatedir=/var \ --disable-static \ --build=$ARCH-slackware-linux || exit 1 make || exit 1 # redirect installation of the package make install-strip DESTDIR=$PKG || exit 1 # copy the docs mkdir -p $PKG/usr/doc/$NAME-$VERSION cp -a ChangeLog PKG-INFO INSTALL AUTHORS COPYING NEWS README \ $PKG/usr/doc/$NAME-$VERSION # copy the slack-desc 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 # build the package cd $PKG requiredbuilder -y -v -s $CWD $PKG makepkg -l y -c n $CWD/$NAME-$VERSION-$ARCH-$BUILD.tgz # clean up the extra stuff if [ "$1" = "--cleanup" ]; then rm -rf $TMP fi