#!/bin/bash # Written by Oleg O. Chukaev # Modified and now maintained by B. Watson # Original version of this script had no license. Modified version # licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. # 20240904 bkw: # - new maintainer. # - update for v2.05. # - license as WTFPL. # - ARCH=noarch (pure perl). # - get some useless junk out of the doc dir. # - grammar nitpicks in README and slack-desc. cd $(dirname $0) ; CWD=$(pwd) PRGNAM=convmv VERSION=${VERSION:-2.05} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} ARCH=noarch 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} 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 {} + make install DESTDIR=$PKG PREFIX=/usr MANDIR=/usr/man PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION mkdir -p $PKGDOC cp -a CREDITS Changes GPL2 TODO $PKGDOC cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$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