summaryrefslogtreecommitdiff
path: root/system/krusader/krusader.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'system/krusader/krusader.SlackBuild')
-rw-r--r--system/krusader/krusader.SlackBuild67
1 files changed, 39 insertions, 28 deletions
diff --git a/system/krusader/krusader.SlackBuild b/system/krusader/krusader.SlackBuild
index 55f328f9a0..81727a05f4 100644
--- a/system/krusader/krusader.SlackBuild
+++ b/system/krusader/krusader.SlackBuild
@@ -3,6 +3,7 @@
# Slackware build script for krusader
# Copyright 2006,2007,2008,2009,2010 Robby Workman, Northport, Alabama, USA
+# Copyright 2010 Grigorios Bouzakis <grbzks@xsmail.com>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,18 +24,16 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=krusader
-VERSION=2.2.0_beta1
-BUILD=${BUILD:-1}
+VERSION=${VERSION:-2.2.0_beta1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
-SRC_VERSION="$(printf $VERSION | tr _ -)"
+SRCVER="$(printf $VERSION | tr _ -)"
-# 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
@@ -47,10 +46,10 @@ OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
LIBDIRSUFFIX=""
- elif [ "$ARCH" = "i686" ]; then
+elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
- elif [ "$ARCH" = "x86_64" ]; then
+elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
else
@@ -58,37 +57,49 @@ else
LIBDIRSUFFIX=""
fi
+DOCS="AUTHORS COPYING CREDITS ChangeLog FAQ INSTALL README TODO"
+
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $PRGNAM-$SRC_VERSION
-tar xvf $CWD/$PRGNAM-$SRC_VERSION.tar.bz2
-cd $PRGNAM-$SRC_VERSION
+rm -rf $PRGNAM-$SRCVER
+tar xvf $CWD/$PRGNAM-$SRCVER.tar.bz2
+cd $PRGNAM-$SRCVER
chown -R root:root .
-chmod -R a-s,u+w,go+r-w .
-
-cmake \
- -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
- -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
- -DCMAKE_INSTALL_PREFIX=/usr \
- -DMAN_INSTALL_DIR=/usr/man \
- -DSYSCONF_INSTALL_DIR=/etc/kde \
- -DLIB_SUFFIX=${LIBDIRSUFFIX} \
- .
-make
-make install DESTDIR=$PKG
+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 $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a \
- AUTHORS COPYING FAQ README TODO krusader.lsm \
- $PKG/usr/doc/$PRGNAM-$VERSION
-cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+# add xz archive support
+# https://bugs.kde.org/show_bug.cgi?id=254615
+patch -p1 -i $CWD/krusader-xz.patch
+
+mkdir -p build
+cd build
+ cmake \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DLIB_SUFFIX=${LIBDIRSUFFIX} \
+ -DSYSCONF_INSTALL_DIR=/etc/kde \
+ -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 $DOCS $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
cat $CWD/doinst.sh > $PKG/install/doinst.sh