summaryrefslogtreecommitdiff
path: root/network/kfilebox/kfilebox.SlackBuild
diff options
context:
space:
mode:
authorMatteo Bernardini <ponce@slackbuilds.org>2012-09-25 16:19:07 +0200
committerRobby Workman <rworkman@slackbuilds.org>2012-09-26 00:00:45 -0500
commit267fe29cd96c7ed4c45ee587754c031eebab8877 (patch)
treeb7d3d4408f392e5826664010cb793e7983177bef /network/kfilebox/kfilebox.SlackBuild
parentd5ad0f5d0615b98b5865896be4e8c2adabe926a6 (diff)
downloadslackbuilds-267fe29cd96c7ed4c45ee587754c031eebab8877.tar.gz
network/kfilebox: Updated for version 0.49.
Added a proper icon, forced CFLAGS, cutted away improper stripping Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Diffstat (limited to 'network/kfilebox/kfilebox.SlackBuild')
-rw-r--r--network/kfilebox/kfilebox.SlackBuild29
1 files changed, 22 insertions, 7 deletions
diff --git a/network/kfilebox/kfilebox.SlackBuild b/network/kfilebox/kfilebox.SlackBuild
index 6cd5fffc4d..8263c9c379 100644
--- a/network/kfilebox/kfilebox.SlackBuild
+++ b/network/kfilebox/kfilebox.SlackBuild
@@ -24,7 +24,7 @@
# SUCH DAMAGE.
PRGNAM=kfilebox
-VERSION=${VERSION:-0.4.7}
+VERSION=${VERSION:-0.4.9}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -41,14 +41,24 @@ 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"
+else
+ SLKCFLAGS="-O2"
+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
+rm -rf ${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 \) \
@@ -57,17 +67,22 @@ find . \
-exec chmod 644 {} \;
qmake
+sed -i "s|-O2|${SLKCFLAGS}|" Makefile
+sed -i "s|-strip\ .*||" Makefile
+
make
make install INSTALL_ROOT=$PKG
-# Weird. As a normal user, this is installed, but not as root
-mkdir -p PKG/usr/bin
-install -m 0755 bin/$PRGNAM $PKG/usr/bin
+# Install a proper icon
+install -m 0644 -D $CWD/$PRGNAM.png $PKG/usr/share/pixmaps/$PRGNAM.png
+sed -i "s|/$PRGNAM/|/pixmaps/|" $PKG/usr/share/*/$PRGNAM.desktop
+rm -fr $PKG/usr/share/$PRGNAM
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 README $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install