diff options
Diffstat (limited to 'desktop/tty-clock/tty-clock.SlackBuild')
-rw-r--r-- | desktop/tty-clock/tty-clock.SlackBuild | 45 |
1 files changed, 25 insertions, 20 deletions
diff --git a/desktop/tty-clock/tty-clock.SlackBuild b/desktop/tty-clock/tty-clock.SlackBuild index 37644a9e2d..5fccb00f91 100644 --- a/desktop/tty-clock/tty-clock.SlackBuild +++ b/desktop/tty-clock/tty-clock.SlackBuild @@ -1,7 +1,7 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for tty-clock -# Copyright 2013 David Woodfall <dave@dawoodfall.net> +# Copyright 2013 David Woodfall <dave@slackbuilds.org> # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -21,26 +21,36 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +cd $(dirname $0) ; CWD=$(pwd) + PRGNAM=tty-clock -VERSION=${VERSION:-git20130806} +VERSION=${VERSION:-2.3} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in - i?86) ARCH=i486 ;; + i?86) ARCH=i586 ;; arm*) ARCH=arm ;; *) ARCH=$( uname -m ) ;; 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} -if [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" @@ -59,7 +69,7 @@ rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-$VERSION.tar.xz +tar xvf $CWD/$PRGNAM-$VERSION.tar.?z cd $PRGNAM-$VERSION chown -R root:root . find -L . \ @@ -68,24 +78,19 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; -sed -i 's%INSTALLPATH =.*%INSTALLPATH = /usr/bin/%' Makefile - -CFLAGS="$SLKCFLAGS" \ -CXXFLAGS="$SLKCFLAGS" \ -make -make install DESTDIR=$PKG +sed -i 's,share/man,man,g' Makefile -find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ - | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true +make CFLAGS="$SLKCFLAGS" +make install DESTDIR=$PKG PREFIX=/usr +strip --strip-unneeded $PKG/usr/bin/$PRGNAM +gzip -9 $PKG/usr/man/man?/*.? mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a \ - README \ - $PKG/usr/doc/$PRGNAM-$VERSION +cp -a README $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild 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 |