diff options
author | LukenShiro <lukenshiro@ngi.it> | 2010-05-11 22:53:52 +0200 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2010-05-11 22:53:52 +0200 |
commit | 4a60a8c00a040f50c5b366c29ca1a25a511fc00d (patch) | |
tree | 2840d3918a00398245eba210a4eb4f36e6983f4e /graphics/unpaper/unpaper.SlackBuild | |
parent | 0a5d1c12a9b7d656e92fc26293e39847226b448e (diff) | |
download | slackbuilds-4a60a8c00a040f50c5b366c29ca1a25a511fc00d.tar.gz |
graphics/unpaper: Added to 12.1 repository
Diffstat (limited to 'graphics/unpaper/unpaper.SlackBuild')
-rw-r--r-- | graphics/unpaper/unpaper.SlackBuild | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/graphics/unpaper/unpaper.SlackBuild b/graphics/unpaper/unpaper.SlackBuild new file mode 100644 index 0000000000..d02016d948 --- /dev/null +++ b/graphics/unpaper/unpaper.SlackBuild @@ -0,0 +1,76 @@ +#!/bin/sh + +# Slackware build script for unpaper + +# Copyright 2008 LukenShiro <lukenshiro@ngi.it> +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# Slackware build script for scrot + +PRGNAM=unpaper +VERSION=0.3 +ARCH=${ARCH:-i486} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION +chown -R root:root . +chmod -R u+w,go+r-w,a-s . + +# 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 + +mkdir -p $PKG/usr/bin +install -m 0755 unpaper $PKG/usr/bin/ + +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 +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz |