#!/bin/bash # Slackware build script for docx2txt # Originally written by Phillip Warner . # Modified and now maintained by B. Watson . # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. # 20240812 bkw: BUILD=2 # - take over maintenance. # - remove a couple useless files from doc dir. # This software hasn't been maintained upstream in 10 years, but it # seems to still be useful. cd $(dirname $0) ; CWD=$(pwd) PRGNAM=docx2txt VERSION=${VERSION:-1.4} ARCH=noarch BUILD=${BUILD:-2} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} 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.tgz cd $PRGNAM-$VERSION chown -R root:root . PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION mkdir -p $PKG/install $PKGDOC install -D -m 0755 docx2txt.pl $PKG/usr/bin/docx2txt install -D -m 0644 docx2txt.config $PKG/etc/docx2txt.config.new install -D -m 0644 $CWD/docx2txt.1.gz $PKG/usr/man/man1/docx2txt.1.gz install -m 0644 AUTHORS COPYING ChangeLog README ToDo $PKGDOC cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild 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