#!/bin/sh # Heavily based on the Slackware 12.2 SlackBuild # Requirements: gc, glibmm, gtkmm, libdsigc++, loudmouth, cairomm # http://www.inkscape.org # Packager Vincenzi Loris - slacky@slacky.it set -e CWD=`pwd` TMP=${TMP:-/tmp/tgz} PKG=$TMP/package/inkscape NAME=inkscape VERSION=0.46 CHOST=i686 ARCH=${ARCH:-i686} BUILD=5sl SOURCE=http://mesh.dl.sourceforge.net/sourceforge/inkscape/$NAME-$VERSION.tar.bz2 if [ ! -e $NAME-$VERSION.tar.bz2 ]; then wget -c $SOURCE fi if [ "$ARCH" = "i386" ]; then SLKCFLAGS="-O2 -march=i386 -mcpu=i686" elif [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mtune=i686" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686" elif [ "$ARCH" = "s390" ]; then SLKCFLAGS="-O2" elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2" fi if [ ! -d $TMP ]; then mkdir -p $TMP fi if [ ! -d $PKG ]; then mkdir -p $PKG fi cd $TMP tar xvjf $CWD/$NAME-$VERSION.tar.bz2 cd $NAME-$VERSION chown -R root:root . # Add a patch from Gentoo so that this version of inkscape # will build on 12.2 # Thanks to Slackbuilds.org patch -p1 < $CWD/inkscape-0.46-poppler-0.8.3.patch CPPFLAGS="-I/usr/include/ImageMagick/" \ CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr \ --disable-static \ --enable-lcms \ --enable-inkboard \ --sysconfdir=/etc \ --localstatedir=/var \ --mandir=/usr/man \ --docdir=/usr/doc/$NAME-$VERSION \ --enable-static=no \ --build=$ARCH-slackware-linux make -j2 make install DESTDIR=$PKG mkdir -p $PKG/usr/doc/$NAME-$VERSION cp -a AUTHORS COPYING* HACKING* INSTALL NEWS README TRANSLATORS doc/* $PKG/usr/doc/$NAME-$VERSION find $PKG/usr/doc -name "Makefile*" -exec rm {} \; find $PKG/usr/doc -type f -exec chmod 644 {} \; find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null ( cd $PKG/usr/man || exit 1 find . -type f -exec gzip -9 {} \; for i in $(find . -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done ) mkdir -p $PKG/install cat $CWD/inkscape.desktop > $PKG/usr/share/applications/inkscape.desktop 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 cat $CWD/doinst.sh > $PKG/install/doinst.sh requiredbuilder -v -y -s $CWD $PKG cd $PKG /sbin/makepkg -l y -c n $CWD/$NAME-$VERSION-$ARCH-$BUILD.tgz if [ "$1" = "--cleanup" ]; then rm -rf $TMP fi