#!/bin/sh CWD=`pwd` TMP=/tmp PKG=$TMP/package-gtk+ rm -rf $PKG mkdir -p $PKG/usr VERSION=2.8.20 ARCH=${ARCH:-x86_64} BUILD=4 LIBDIR=lib if [ "$ARCH" = "i386" ]; then SLKCFLAGS="-O2 -march=i386 -mcpu=i686" elif [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mcpu=i686" elif [ "$ARCH" = "s390" ]; then SLKCFLAGS="-O2" elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" LIBDIR=lib64 fi cd $TMP rm -rf gtk+-$VERSION tar xjvf $CWD/gtk+-$VERSION.tar.bz2 cd gtk+-$VERSION # Move /etc/gtk-2.0 to /etc/gtk-2.0-x86_64 for 32-bit compatability zcat $CWD/gtk+2.etc.gtk-2.0-x86_64.diff.gz | patch -p1 --verbose || exit 1 chown -R root.root . find . -perm 664 -exec chmod 644 {} \; CFLAGS="$SLKCFLAGS" \ ./configure --prefix=/usr \ --libdir=/usr/$LIBDIR \ --sysconfdir=/etc \ --with-xinput=yes make -j30 make install DESTDIR=$PKG # I'm spamming your root partition make install mkdir -p $PKG/etc/gtk-2.0-x86_64 cp -a /etc/gtk-2.0-x86_64/* $PKG/etc/gtk-2.0-x86_64 strip $PKG/usr/bin/* ( 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 ) gzip -9 $PKG/usr/man/man?/* mkdir -p $PKG/usr/doc/gtk+-$VERSION cp -a \ AUTHORS COPYING ChangeLog NEWS README TODO \ $PKG/usr/doc/gtk+-$VERSION # I'm almost inclined to think this stuff is obsolete, but I don't know for sure. # I do know that leaving it in doesn't hurt (aside from a few wasted bytes, but # probably less than the comments here waste ;-) mkdir -p $PKG/etc/profile.d cp -a $CWD/profile.d/* $PKG/etc/profile.d chmod 755 $PKG/etc/profile.d/* mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cd $TMP/package-gtk+ mkdir -p $PKG/usr/lib mv $PKG/usr/lib64/pkgconfig $PKG/usr/lib makepkg -l y -c n ../gtk+2-$VERSION-$ARCH-$BUILD.tgz