From 267fe29cd96c7ed4c45ee587754c031eebab8877 Mon Sep 17 00:00:00 2001 From: Matteo Bernardini Date: Tue, 25 Sep 2012 16:19:07 +0200 Subject: network/kfilebox: Updated for version 0.49. Added a proper icon, forced CFLAGS, cutted away improper stripping Signed-off-by: Matteo Bernardini --- network/kfilebox/kfilebox.SlackBuild | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) (limited to 'network/kfilebox/kfilebox.SlackBuild') 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 -- cgit v1.2.3