summaryrefslogtreecommitdiff
path: root/office/python-gcalcli/python-gcalcli.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'office/python-gcalcli/python-gcalcli.SlackBuild')
-rw-r--r--office/python-gcalcli/python-gcalcli.SlackBuild47
1 files changed, 33 insertions, 14 deletions
diff --git a/office/python-gcalcli/python-gcalcli.SlackBuild b/office/python-gcalcli/python-gcalcli.SlackBuild
index 985aed9622..5bac26130f 100644
--- a/office/python-gcalcli/python-gcalcli.SlackBuild
+++ b/office/python-gcalcli/python-gcalcli.SlackBuild
@@ -1,7 +1,7 @@
#!/bin/sh
-# Slackware build script for gcalcli
-# Copyright 2010 David Woodfall <dave@dawoodfall.net>
+# Slackware build script for python-gcalcli
+# Copyright 2014 David Woodfall <dave@dawoodfall.net>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -21,9 +21,9 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-PRGNAM=python-gcalcli
SRCNAM=gcalcli
-VERSION=${VERSION:-1.4}
+PRGNAM=python-$SRCNAM
+VERSION=${VERSION:-git20140429}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -40,24 +40,43 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -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/usr/bin $OUTPUT
-cd $PKG
-tar xvf $CWD/$SRCNAM-$VERSION.tgz
-patch -p1 --verbose < $CWD/feedPrefix-fix.diff
-mv gcalcli usr/bin
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $SRCNAM-$VERSION
+tar xvf $CWD/$SRCNAM-$VERSION.tar.xz
+cd $SRCNAM-$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 {} \;
+
+python setup.py install --root=$PKG
+
+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 \
- $CWD/README $CWD/HOWTO \
+ ChangeLog README.md docs \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild