#!/bin/bash # Slackware build script for pushover # Originally written by MLanden. # Modified and now maintained by B. Watson (urchlay@slackware.uk) # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. # 20250916 bkw: BUILD=3: # - new maintainer. # - relicense as WTFPL with permission from MLanden. # - reflow slack-desc. # - add icons and .desktop (and doinst.sh to deal with them). # - remove extraneous luajit.diff. # 20241018 bkw: Modified by SlackBuilds.org, BUILD=2: # - build with lua51. # - get INSTALL out of the doc dir. # - binary in /usr/games. cd $(dirname $0) ; CWD=$(pwd) PRGNAM=pushover VERSION=${VERSION:-0.0.3} BUILD=${BUILD:-3} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in i?86) ARCH=i586 ;; arm*) ARCH=arm ;; *) ARCH=$( uname -m ) ;; esac fi 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" = "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 cd $TMP rm -rf $PRGNAM-$VERSION tar xvf $CWD/$PRGNAM-$VERSION.tar.gz cd $PRGNAM-$VERSION chown -R root:root . find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} + -o \ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} + CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr \ --libdir=/usr/lib${LIBDIRSUFFIX} \ --docdir=/usr/doc/$PRGNAM-$VERSION \ --enable-shared \ --bindir=/usr/games \ --build=$ARCH-slackware-linux make make install-strip DESTDIR=$PKG # 20250916 bkw: icons extracted from pushover.ico in the src, with icotool. HICOLOR=$PKG/usr/share/icons/hicolor for i in $CWD/icons/*.png; do px="$( basename $i | cut -d. -f1 )" size=${px}x${px} dir=$HICOLOR/$size/apps mkdir -p $dir cat $i > $dir/$PRGNAM.png done mkdir -p $PKG/usr/share/pixmaps ln -s ../icons/hicolor/48x48/apps/$PRGNAM.png $PKG/usr/share/pixmaps/$PRGNAM.png # 20250916 bkw: .desktop file written for this build. mkdir -p $PKG/usr/share/applications cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION mkdir -p $PKGDOC cp -a AUTHORS COPYING ChangeLog NEWS README $PKGDOC cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh cd $PKG /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE