summaryrefslogtreecommitdiff
path: root/graphics/gtkam/gtkam.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/gtkam/gtkam.SlackBuild')
-rw-r--r--graphics/gtkam/gtkam.SlackBuild74
1 files changed, 34 insertions, 40 deletions
diff --git a/graphics/gtkam/gtkam.SlackBuild b/graphics/gtkam/gtkam.SlackBuild
index 1f00b314a3..b1f7f8b3d0 100644
--- a/graphics/gtkam/gtkam.SlackBuild
+++ b/graphics/gtkam/gtkam.SlackBuild
@@ -1,6 +1,8 @@
#!/bin/sh
+
# Slackware Build Script for gtkam
-# (C) 2007 Michael Wagner <lapinours@web.de>
+
+# (C) 2009 Michael Wagner <slackware.wagnerm@arcor.de>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -20,84 +22,76 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-# Modified by the SlackBuilds Project
-
-set -e
-
PRGNAM=gtkam
-VERSION=0.1.14
+VERSION=0.1.16.1
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-DOCS="ABOUT-NLS AUTHORS COPYING ChangeLog INSTALL NEWS README TODO"
-
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
fi
+set -e
+
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
-cd $TMP || exit 1
+cd $TMP
rm -rf $PRGNAM-$VERSION
-tar -xjvf $CWD/$PRGNAM-$VERSION.tar.bz2 || exit 1
-cd $PRGNAM-$VERSION || exit 1
+tar -xjvf $CWD/$PRGNAM-$VERSION.tar.bz2
+cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
# Add --without-gimp if you don't want to compile the GIMP plugin
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
- --sysconfdir=/etc \
- --localstatedir=/var/lib\
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
--mandir=/usr/man \
--disable-static \
--disable-scrollkeeper \
--without-gnome \
--without-bonobo \
- --program-prefix="" \
- --program-suffix="" \
- || exit 1
-
-make || exit 1
-make install DESTDIR=$PKG || exit 1
-
-( 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
-)
-
-if [ -d $PKG/usr/man ]; then
- ( cd $PKG/usr/man
- find . -name "*.?" -type f 2> /dev/null | xargs gzip -9 2> /dev/null
- for i in $(find . -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done
- )
-fi
+ --build=$ARCH-slackware-linux
+
+sed -i "s,$(egrep ^gtkamdocdir Makefile),gtkamdocdir = /usr/doc/$PRGNAM-$VERSION," Makefile
+
+make
+make install-strip DESTDIR=$PKG
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
chmod 644 $PKG/usr/doc/$PRGNAM-$VERSION/*
# Get rid of unnecessary stuff
-for i in gnome omf doc; do
+for i in gnome omf; do
rm -rf $PKG/usr/share/$i &> /dev/null
done
-# Replace upstreams png icon as it is corrupt
-cat $CWD/gtkam.png > $PKG/usr/share/pixmaps/gtkam.png
+gzip -9 $PKG/usr/man/man?/$PRGNAM.?
mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
-cat $CWD/doinst.sh > $PKG/install/doinst.sh
+for i in slack-desc doinst.sh; do
+ cat $CWD/$i > $PKG/install/$i
+done
cd $PKG
-/sbin/makepkg -p -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz
+/sbin/makepkg -p -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}