summaryrefslogtreecommitdiffstats
path: root/office/text2pdf
diff options
context:
space:
mode:
Diffstat (limited to 'office/text2pdf')
-rw-r--r--office/text2pdf/README11
-rw-r--r--office/text2pdf/text2pdf.SlackBuild18
2 files changed, 20 insertions, 9 deletions
diff --git a/office/text2pdf/README b/office/text2pdf/README
index d7fd3e114d..3b653b1bba 100644
--- a/office/text2pdf/README
+++ b/office/text2pdf/README
@@ -1,7 +1,8 @@
text2pdf (Converts text files to PDF)
-text2pdf makes a 7-bit clean PDF file (version 1.1) from any input file. It
-reads from standard input or a named file, and writes the PDF file to
-standard output. You can specify the font, number of lines and columns,
-paper size and various other options from the command line. By default, long
-lines will be wrapped, and a formfeed character (^L) will cause a page break.
+text2pdf makes a 7-bit clean PDF file (version 1.1) from any input
+file. It reads from standard input or a named file, and writes the PDF
+file to standard output. You can specify the font, number of lines
+and columns, paper size and various other options from the command
+line. By default, long lines will be wrapped, and a formfeed character
+(^L) will cause a page break.
diff --git a/office/text2pdf/text2pdf.SlackBuild b/office/text2pdf/text2pdf.SlackBuild
index 57c054a566..986a34a902 100644
--- a/office/text2pdf/text2pdf.SlackBuild
+++ b/office/text2pdf/text2pdf.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for text2pdf
@@ -22,20 +22,30 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=text2pdf
VERSION=${VERSION:-1.1}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+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}
@@ -74,4 +84,4 @@ 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:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE