diff options
author | ariarat <ariarat@gmail.com> | 2010-06-16 03:56:12 -0500 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2010-06-16 03:56:12 -0500 |
commit | 1fe9c3c5654f4c4014842110339360446b7293e0 (patch) | |
tree | 4eaaf608033e3c919d6d68377aadf8fcbb373ffe /academic/flashqard/flashqard.SlackBuild | |
parent | 20d8d74773fe578e25bc5d7e25ae1a30fee5211c (diff) |
academic/flashqard: Added (FlashQard educational software)
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'academic/flashqard/flashqard.SlackBuild')
-rw-r--r-- | academic/flashqard/flashqard.SlackBuild | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/academic/flashqard/flashqard.SlackBuild b/academic/flashqard/flashqard.SlackBuild new file mode 100644 index 0000000000000..228be4139409c --- /dev/null +++ b/academic/flashqard/flashqard.SlackBuild @@ -0,0 +1,72 @@ +#!/bin/sh + +# Slackware build script for flashqard +# written by Mehdi Esmaeelpour ariarat@gmail.com www.slack-world.com + +PRGNAM=flashqard +VERSION=${VERSION:-0.15.0} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i486 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +OUTPUT=${OUTPUT:-/tmp} +PKG=$TMP/package-$PRGNAM + +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" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $TMP/$PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +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 build +cd build + cmake -DCMAKE_INSTALL_PREFIX=/usr .. + make VERBOSE=1 + make install VERBOSE=1 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 ChangeLog README AUTHORS INSTALL $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/flashqard.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/flashqard.SlackBuild + +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} |