summaryrefslogtreecommitdiff
path: root/system/info2man/info2man.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'system/info2man/info2man.SlackBuild')
-rw-r--r--system/info2man/info2man.SlackBuild63
1 files changed, 63 insertions, 0 deletions
diff --git a/system/info2man/info2man.SlackBuild b/system/info2man/info2man.SlackBuild
new file mode 100644
index 0000000000..1f714d7c7b
--- /dev/null
+++ b/system/info2man/info2man.SlackBuild
@@ -0,0 +1,63 @@
+#!/bin/sh
+
+# Slackware build script for info2man
+
+# Written by B. Watson (yalhcru@gmail.com)
+
+# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+
+# The version number below is the modification time of the newest file
+# in the source tarball.
+
+PRGNAM=info2man
+VERSION=${VERSION:-20040717}
+ARCH=noarch
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+set -e
+
+PERLMODDIR=/usr/share/info2pod
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+mkdir -p $PRGNAM-$VERSION
+cd $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM.tar.gz
+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 {} \;
+
+# make the script use its own private perl module dir, so we don't
+# pollute /usr/lib/perl5.
+sed -i -e '2iuse lib "'$PERLMODDIR'";' info2pod
+
+# this uses an ancient Perl 4 module called flush.pl. The damn thing is less
+# than 1KB in size, so I included it in the SlackBuild tarball. It came from
+# here: http://www.opensource.apple.com/source/perl/perl-21/perl/lib/flush.pl
+
+mkdir -p $PKG/usr/bin $PKG/$PERLMODDIR
+install -m0755 -oroot -groot $PRGNAM $PKG/usr/bin
+install -m0755 -oroot -groot info2pod $PKG/usr/bin
+install -m0644 -oroot -groot $CWD/flush.pl $PKG/$PERLMODDIR
+cp -r cs $PKG/$PERLMODDIR/cs
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/README > $PKG/usr/doc/$PRGNAM-$VERSION/README
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$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.tgz