summaryrefslogtreecommitdiff
path: root/office/zim/zim.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'office/zim/zim.SlackBuild')
-rw-r--r--office/zim/zim.SlackBuild27
1 files changed, 22 insertions, 5 deletions
diff --git a/office/zim/zim.SlackBuild b/office/zim/zim.SlackBuild
index 6641de2991..cd50dbbb98 100644
--- a/office/zim/zim.SlackBuild
+++ b/office/zim/zim.SlackBuild
@@ -2,10 +2,8 @@
# Slackware build script for zim
-# Copyright 2015 Brenton Earl <brent@exitstatusone.com>
-# All rights reserved.
-#
# Copyright 2013 Michael Ren <micron33@gmail.com>
+# Copyright 2015-2016 Brenton Earl <brent@exitstatusone.com>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -32,7 +30,7 @@ TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
@@ -45,7 +43,21 @@ OUTPUT=${OUTPUT:-/tmp}
DOCS="CHANGELOG.txt LICENSE.txt PKG-INFO README.txt"
-set -e
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -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
@@ -65,11 +77,16 @@ find -L . \
# ("automation"), hence --skip-xdg-cmd
python setup.py install --root=$PKG --skip-xdg-cmd
+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
+
mv $PKG/usr/share/man $PKG/usr
find $PKG/usr/man -type f -exec gzip -9 {} \;
+for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/README.Plugins > $PKG/usr/doc/$PRGNAM-$VERSION/README.Plugins
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install