slackbuilds_ponce/office/docx2txt/docx2txt.SlackBuild
Phillip Warner ab09016092 office/docx2txt: Added (docx to text converter).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
2014-03-24 13:02:14 +07:00

44 lines
1 KiB
Bash

#!/bin/sh
# Slackware build script for docx2txt
# Written by Phillip Warner <pc_warner@yahoo.com>
PRGNAM=docx2txt
VERSION=${VERSION:-1.2}
ARCH=noarch
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
CWD=$(pwd)
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 .
mkdir -p $PKG/usr/bin \
$PKG/etc \
$PKG/usr/man/man1 \
$PKG/usr/doc/$PRGNAM-$VERSION \
$PKG/install
install -m 0755 docx2txt.pl $PKG/usr/bin/docx2txt
install -m 0644 docx2txt.config $PKG/etc/docx2txt.config.new
install -m 0644 $CWD/docx2txt.1.gz $PKG/usr/man/man1/docx2txt.1.gz
install -m 0644 AUTHORS COPYING ChangeLog README ToDo $PKG/usr/doc/$PRGNAM-$VERSION/
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$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:-tgz}