diff options
Diffstat (limited to 'graphics/unpaper/unpaper.SlackBuild')
-rw-r--r-- | graphics/unpaper/unpaper.SlackBuild | 40 |
1 files changed, 23 insertions, 17 deletions
diff --git a/graphics/unpaper/unpaper.SlackBuild b/graphics/unpaper/unpaper.SlackBuild index cf32fb094e..6877385699 100644 --- a/graphics/unpaper/unpaper.SlackBuild +++ b/graphics/unpaper/unpaper.SlackBuild @@ -2,7 +2,7 @@ # Slackware build script for unpaper -# Copyright 2008-2009 LukenShiro <lukenshiro@ngi.it> +# Copyright 2008-2013 LukenShiro, Italy # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -24,16 +24,14 @@ # Slackware build script for scrot PRGNAM=unpaper -VERSION=0.3 -BUILD=${BUILD:-2} +VERSION=${VERSION:-0.4.2} +BUILD=${BUILD:-1} TAG=${TAG:-_SBo} -# Automatically determine the architecture we're building on: if [ -z "$ARCH" ]; then case "$( uname -m )" in i?86) ARCH=i486 ;; arm*) ARCH=arm ;; - # Unless $ARCH is already set, use uname -m for all other archs: *) ARCH=$( uname -m ) ;; esac fi @@ -57,25 +55,33 @@ rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +tar xvf $CWD/$PRGNAM-$VERSION.tar.?z* 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 {} \; -# There is a building shell script (make.sh), -# but I prefer a direct and minimalistic approach CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ -gcc -lm -o unpaper src/unpaper.c -strip --strip-unneeded unpaper 2>/dev/null || true +./configure \ + --prefix=/usr \ + --mandir=/usr/man \ + --docdir=/usr/doc/$PRGNAM-$VERSION \ + --build=$ARCH-slackware-linux +make +make install DESTDIR=$PKG -mkdir -p $PKG/usr/bin -install -m 0755 unpaper $PKG/usr/bin/ +find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true -mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/img -install -m 0644 doc/*.html $PKG/usr/doc/$PRGNAM-$VERSION/ -install -m 0644 doc/img/* $PKG/usr/doc/$PRGNAM-$VERSION/img/ -cp -a CHANGELOG README LICENSE $PKG/usr/doc/$PRGNAM-$VERSION +find $PKG/usr/man -type f -exec gzip -9 {} \; +for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/ +cp INSTALL $PKG/usr/doc/$PRGNAM-$VERSION/ cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install |