#!/bin/bash # Slackware build script for rss2email # Original author: Alexander Verbovetsky, Moscow, Russia # Now maintained by B. Watson . # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. # 20241008 bkw: # - take over maintenance. # - relicense as WTFPL. # - simplify script a bit (no change to package). # - tweak README and slack-desc. cd $(dirname $0) ; CWD=$(pwd) PRGNAM=rss2email VERSION=${VERSION:-3.14} BUILD=${BUILD:-1} 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} # 20241008 bkw: no need for SLKCFLAGS or LIBDIRSUFFIX. 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 {} + python3 setup.py install --root=$PKG mkdir -p $PKG/usr/man/man1 gzip -c9 r2e.1 > $PKG/usr/man/man1/r2e.1.gz install -m 0644 -T -D completion/r2e.zsh $PKG/usr/share/zsh/site-functions/_r2e mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a AUTHORS CHANGELOG HACKING.md README.rst $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