diff options
Diffstat (limited to 'office/python-gcalcli/python-gcalcli.SlackBuild')
-rw-r--r-- | office/python-gcalcli/python-gcalcli.SlackBuild | 36 |
1 files changed, 25 insertions, 11 deletions
diff --git a/office/python-gcalcli/python-gcalcli.SlackBuild b/office/python-gcalcli/python-gcalcli.SlackBuild index f3a6720d9d..0c9419be27 100644 --- a/office/python-gcalcli/python-gcalcli.SlackBuild +++ b/office/python-gcalcli/python-gcalcli.SlackBuild @@ -1,7 +1,7 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for python-gcalcli -# Copyright 2014 David Woodfall <dave@dawoodfall.net> +# Copyright 2014 David Woodfall <dave@slackbuilds.org> # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -21,11 +21,15 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -SRCNAM=gcalcli -PRGNAM=python-$SRCNAM -VERSION=${VERSION:-git20140429} +cd $(dirname $0) ; CWD=$(pwd) + +PRGNAM=python-gcalcli +VERSION=${VERSION:-4.3.0} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} + +SRCNAM=gcalcli if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -35,7 +39,14 @@ if [ -z "$ARCH" ]; then esac fi -CWD=$(pwd) +# If the variable PRINT_PACKAGE_NAME is set, then this script will report what +# the name of the created package would be, and then exit. This information +# could be useful to other scripts. +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} @@ -60,7 +71,7 @@ rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $SRCNAM-$VERSION -tar xvf $CWD/$SRCNAM-$VERSION.tar.xz +tar xvf $CWD/$SRCNAM-$VERSION.tar.?z cd $SRCNAM-$VERSION chown -R root:root . find -L . \ @@ -69,14 +80,17 @@ find -L . \ \( -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 +python3 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 +mv $PKG/usr/share/man $PKG/usr +gzip -9 $PKG/usr/man/man1/gcalcli.1 +rm -rf $PKG/usr/share + mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a \ - ChangeLog README.md docs \ +cp -a ChangeLog LICENSE docs/README.md \ $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild @@ -84,4 +98,4 @@ mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE |