mirror of
https://github.com/Ponce/slackbuilds
synced 2024-12-02 13:04:42 +01:00
cd4cc5437a
Signed-off-by: B. Watson <urchlay@slackware.uk> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
65 lines
1.5 KiB
Bash
65 lines
1.5 KiB
Bash
#!/bin/bash
|
|
|
|
# Slackware build script for fortune_firefly
|
|
|
|
# Written by B. Watson (urchlay@slackware.uk)
|
|
|
|
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
|
|
|
|
# TODO: this build needs to be renamed to fortune-firefly (I used a _
|
|
# ages ago and have since changed my mind).
|
|
|
|
# 20230828 bkw: updated to my own compilation of firefly quotes,
|
|
# v20230828bkw, which has ~50% more content.
|
|
|
|
# 20180209 bkw: homepage went away again, use someone's github mirror
|
|
# of the now-vanished fedora repo.
|
|
|
|
# 20140825 bkw:
|
|
# - update for 2.1.2, which fixes some typos
|
|
# - hosting the source myself now
|
|
# - homepage went away, so use fedora's cgit for homepage
|
|
|
|
cd $(dirname $0) ; CWD=$(pwd)
|
|
|
|
PRGNAM=fortune_firefly
|
|
SRCNAM=fortune-firefly-bkw
|
|
VERSION=${VERSION:-20230828bkw}
|
|
SRCVER=${VERSION/bkw/}
|
|
SRCVER="$( echo $VERSION | sed 's,bkw$,,' )"
|
|
ARCH=noarch
|
|
BUILD=${BUILD:-1}
|
|
TAG=${TAG:-_SBo}
|
|
PKGTYPE=${PKGTYPE:-tgz}
|
|
|
|
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}
|
|
|
|
set -e
|
|
|
|
rm -rf $PKG
|
|
mkdir -p $TMP $PKG/install $OUTPUT
|
|
cd $TMP
|
|
rm -rf $SRCNAM-$SRCVER
|
|
tar xvf $CWD/$SRCNAM-$SRCVER.tar.xz
|
|
cd $SRCNAM-$SRCVER
|
|
chmod 644 *
|
|
chown root:root *
|
|
|
|
DOCDIR=/usr/doc/$PRGNAM-$VERSION
|
|
PKGDOC=$PKG/$DOCDIR
|
|
|
|
make install DESTDIR=$PKG DOCDIR=$DOCDIR
|
|
|
|
cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild
|
|
|
|
cat $CWD/slack-desc > $PKG/install/slack-desc
|
|
|
|
cd $PKG
|
|
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
|