#!/bin/sh #SOURCE: ftp://ftp.gnome.org/pub/gnome/sources/ghex #MAINTAINER: Sebastian Jauch CWD=`pwd` PKG=/tmp/package-ghex VERSION=2.22.0 ARCH=i486 BUILD=52.1 rm -rf $PKG mkdir -p $PKG cd /tmp rm -rf ghex-$VERSION tar xjvf $CWD/ghex-$VERSION.tar.bz2 cd ghex-$VERSION chown -R root.root . find . -perm 777 -exec chmod 755 {} \; find . -perm 664 -exec chmod 644 {} \; ./configure \ --prefix=/usr \ --sysconfdir=/etc \ --disable-schemas-install \ --with-gconf-source="xml::/etc/gconf/gconf.xml.defaults" \ $ARCH-slackware-linux make make install DESTDIR=$PKG ( 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 ) mkdir -p $PKG/usr/src/ghex-$VERSION cp $CWD/build-ghex.sh $PKG/usr/src/ghex-$VERSION mkdir -p $PKG/usr/doc/ghex-$VERSION/ cp COPYING Changelog AUTHORS INSTALL README \ $PKG/usr/doc/ghex-$VERSION/ mkdir -p $PKG/install # redundant scrollkeeper if [ -d ${PKG}/var/scrollkeeper ]; then rm -r ${PKG}/var/scrollkeeper fi if [ -d ${PKG}/var/lib/scrollkeeper ]; then rm -r ${PKG}/var/lib/scrollkeeper fi cat <<"EOF" > $PKG/install/doinst.sh # Update the scrollkeeper database (Remove stale pieces) if [ -x usr/bin/scrollkeeper-update ]; then usr/bin/scrollkeeper-update > /dev/null 2>&1 fi EOF # Install gconf Schemas export GCONF_CONFIG_SOURCE="xml::$PKG/etc/gconf/gconf.xml.defaults" if [ -d $PKG/etc/gconf/schemas ]; then install -v -d -m755 $PKG/etc/gconf/gconf.xml.defaults SCHEMAS=$PKG/etc/gconf/schemas for schema in $SCHEMAS/*.schemas; do gconftool-2 --makefile-install-rule $schema done # Reset / Verify correct permissions ( cd $PKG/etc/gconf ; find . -type d -exec chmod 755 {} \; ) ( cd $PKG/etc/gconf ; find . -type f -exec chmod 644 {} \; ) fi # # make a slack-desc file # cat <<"EOF" > $PKG/install/slack-desc ghex: ghex ghex: ghex: GHex allows the user to load data from any file, view and edit it in ghex: either hex or ASCII. A must for anyone playing games that use ghex: non-ASCII format for saving. ;^) ghex: ghex: ghex: ghex: ghex: ghex: EOF cd $PKG makepkg -l y -c n ../ghex-$VERSION-$ARCH-$BUILD.tgz cd .. md5sum ghex-$VERSION-$ARCH-$BUILD.tgz > ghex-$VERSION-$ARCH-$BUILD.md5