diff options
Diffstat (limited to 'academic/flashqard/flashqard.SlackBuild')
-rw-r--r-- | academic/flashqard/flashqard.SlackBuild | 37 |
1 files changed, 24 insertions, 13 deletions
diff --git a/academic/flashqard/flashqard.SlackBuild b/academic/flashqard/flashqard.SlackBuild index 7e57e1c7990ba..f749eb317b7aa 100644 --- a/academic/flashqard/flashqard.SlackBuild +++ b/academic/flashqard/flashqard.SlackBuild @@ -18,8 +18,8 @@ fi CWD=$(pwd) TMP=${TMP:-/tmp/SBo} -OUTPUT=${OUTPUT:-/tmp} PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} if [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mtune=i686" @@ -40,29 +40,40 @@ set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -rm -rf $TMP/$PRGNAM-$VERSION +rm -rf $PRGNAM-$VERSION tar xvf $CWD/$PRGNAM-$VERSION.tar.gz cd $PRGNAM-$VERSION chown -R root:root . find -L . \ - \( -perm 777 -o -perm 775 -o -perm 750 -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 {} \; + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + +# Patch for missing includes with qt-4.8.7 +patch -p1 < $CWD/flashqard-0.15.0_qt-4.8.7.patch -mkdir build +mkdir -p build cd build - cmake -DCMAKE_INSTALL_PREFIX=/usr .. - make VERBOSE=1 - make install VERBOSE=1 DESTDIR=$PKG + cmake \ + -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DLIB_SUFFIX=${LIBDIRSUFFIX} \ + -DMAN_INSTALL_DIR=/usr/man \ + -DCMAKE_BUILD_TYPE=Release .. + make + make install DESTDIR=$PKG cd .. -find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ +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 -cp -a COPYING ChangeLog README AUTHORS INSTALL $PKG/usr/doc/$PRGNAM-$VERSION -cat $CWD/flashqard.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/flashqard.SlackBuild +cp -a \ + COPYING ChangeLog README AUTHORS INSTALL \ + $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 |