aboutsummaryrefslogtreecommitdiff
path: root/misc/doclifter/doclifter.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'misc/doclifter/doclifter.SlackBuild')
-rw-r--r--misc/doclifter/doclifter.SlackBuild65
1 files changed, 26 insertions, 39 deletions
diff --git a/misc/doclifter/doclifter.SlackBuild b/misc/doclifter/doclifter.SlackBuild
index 2c4e54079bd3..470780d28eac 100644
--- a/misc/doclifter/doclifter.SlackBuild
+++ b/misc/doclifter/doclifter.SlackBuild
@@ -2,40 +2,30 @@
# Slackware build script for doclifter
-# Copyright 2015 Didier Spaier Paris, France
-# All rights reserved.
-#
-# Redistribution and use of this script, with or without modification, is
-# permitted provided that the following conditions are met:
-#
-# 1. Redistributions of this script must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
-# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
-# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
-# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# Originally written 2015 Didier Spaier Paris, France
+# Now maintained by B. Watson (yalhcru@gmail.com)
+
+# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+
+# 20220110 bkw:
+# - take over maintenance.
+# - relicense as WTFPL with permission from Didier.
+# - update for v2.20.
+# - tweak README and slack-desc.
+# - simplify build.
+# - document plotutils optional dep (search for pic2plot in the man page).
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=doclifter
-VERSION=${VERSION:-2.15}
+VERSION=${VERSION:-2.20}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
-# We package Python scripts, so:
+# We're packaging only Python scripts, so:
ARCH=noarch
-# 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
@@ -54,24 +44,21 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-find -L . \
- \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
- -o -perm 511 \) -exec chmod 755 {} \; -o \
- \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/html $PKG/usr/man/man1 $PKG/usr/bin
+find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
-cp doclifter manlifter $PKG/usr/bin
-gzip <doclifter.1 >$PKG/usr/man/man1/doclifter.1.gz
-gzip <manlifter.1 >$PKG/usr/man/man1/manlifter.1.gz
+PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
+mkdir -p $PKGDOC/html $PKG/usr/man/man1 $PKG/usr/bin
-xmlto xhtml-nochunks doclifter.xml
-xmlto xhtml-nochunks manlifter.xml
-cp -a doclifter.html manlifter.html $PKG/usr/doc/$PRGNAM-$VERSION/html
+for i in {doc,man}lifter; do
+ install -m0755 $i $PKG/usr/bin
+ gzip -9c < $i.1 > $PKG/usr/man/man1/$i.1.gz
+ xmlto xhtml-nochunks $i.xml
+ cp -a $i.html $PKGDOC/html
+done
-cp -a COPYING README TODO $PKG/usr/doc/$PRGNAM-$VERSION
-cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+cp -a COPYING README TODO PATCHES $PKGDOC
+cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc