diff options
author | Vincent Batts <vbatts@hashbangbash.com> | 2010-07-02 23:25:37 -0500 |
---|---|---|
committer | Erik Hanson <erik@slackbuilds.org> | 2010-07-02 23:25:37 -0500 |
commit | 85fb475c0e31722cd7e11732bf39ea90218b8416 (patch) | |
tree | 9c1f444798ceff9373aeecb0e37f9d45db3ed0b9 /business/skrooge/skrooge.SlackBuild | |
parent | 1b16da553e1538f75f4b7abcc89433ee3e9430d5 (diff) |
business/skrooge: Added (KDE4 Finance Application)
Signed-off-by: Erik Hanson <erik@slackbuilds.org>
Diffstat (limited to 'business/skrooge/skrooge.SlackBuild')
-rw-r--r-- | business/skrooge/skrooge.SlackBuild | 109 |
1 files changed, 109 insertions, 0 deletions
diff --git a/business/skrooge/skrooge.SlackBuild b/business/skrooge/skrooge.SlackBuild new file mode 100644 index 000000000000..4e2c3896b0d7 --- /dev/null +++ b/business/skrooge/skrooge.SlackBuild @@ -0,0 +1,109 @@ +#!/bin/sh + +# Copyright 2009 Vincent Batts, http://hashbangbash.com/ +# 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. + +PRGNAM=skrooge +VERSION=${VERSION:-0.7.1} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) export ARCH=i486 ;; + arm*) export ARCH=arm ;; + *) export ARCH=$( uname -m ) ;; + esac +fi + + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i486" ]; then + export SLKCFLAGS="-O2 -march=i486 -mtune=i686" + export LIBDIRSUFFIX="" +elif [ "$ARCH" = "s390" ]; then + export SLKCFLAGS="-O2" + export LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + export SLKCFLAGS="-O2 -fPIC" + export LIBDIRSUFFIX="64" +elif [ "$ARCH" = "arm" ]; then + export SLKCFLAGS="-O2 -march=armv4 -mtune=xscale" + export LIBDIRSUFFIX="" +elif [ "$ARCH" = "armel" ]; then + export SLKCFLAGS="-O2 -march=armv4t" + export LIBDIRSUFFIX="" +fi + +# Additional cmake flags that are spanned across the KDE modules +export KDE_OPT_ARGS=" -DSITE=\"slackbuilds.org\" " + +# Avoid a version number in .la files: +if [ -d /usr/lib${LIBDIRSUFFIX}/qt ]; then + QTDIR=/usr/lib${LIBDIRSUFFIX}/qt +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG/usr $OUTPUT +cd $TMP +tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2 +cd $PRGNAM-$VERSION + +chown -R root:root . +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 {} \; + +mkdir -p build +cd build + cmake \ + $KDE_OPT_ARGS \ + -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DMAN_INSTALL_DIR=/usr/man \ + -DSYSCONF_INSTALL_DIR=/etc/kde \ + -DLIB_SUFFIX=${LIBDIRSUFFIX} \ + .. + make + make install DESTDIR=$PKG +cd - + +find $PKG | xargs 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 +cp -a COPYING* $PKG/usr/doc/$PRGNAM-$VERSION + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} |