slackbuilds/system/Sl/Sl.SlackBuild

53 lines
1.2 KiB
Bash

#!/bin/sh
# Slackware build script for Sl
# Written by B. Watson (yalhcru@gmail.com)
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
# There's already an "sl" on SBo, so this is named Sl. The version number
# comes from the -version option.
PRGNAM=Sl
VERSION=${VERSION:-1.1.3}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
ARCH=noarch
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
SRCNAM="sl"
PKGBIN=$PKG/usr/bin
PKGMAN1=$PKG/usr/man/man1
PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
PKGINST=$PKG/install
set -e
rm -rf $PKG
mkdir -p $OUTPUT $PKGBIN $PKGDOC $PKGMAN1 $PKGINST
# Look, Ma, no source directory!
cat $SRCNAM > $PKGBIN/$PRGNAM
chmod 755 $PKGBIN/$PRGNAM
gzip -9c < $PRGNAM.1 > $PKGMAN1/$PRGNAM.1.gz
# README.upstream is just a text rendition of the homepage, sl.tcl-example
# is linked to by the homepage.
cat README.upstream > $PKGDOC/README.txt
cat sl.tcl.example > $PKGDOC/sl.tcl.example
cat README > $PKGDOC/README_SBo.txt
cat $PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild
cat slack-desc > $PKGINST/slack-desc
cat doinst.sh > $PKGINST/doinst.sh
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}