blob: d3df35a1408e7b00f138ddf04df5bdcfd49dd7b7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
#!/bin/bash
# Slackware build script for cryptokwot
# Written by B. Watson (yalhcru@gmail.com)
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=cryptokwot
VERSION=${VERSION:-0.0.3}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
ARCH=noarch
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
fi
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
set -e
# No "source" directory needed. The executable spits out its own man page,
# .desktop file, and icon, so give it a short name:
P=$PKG/usr/games/$PRGNAM
rm -rf $PKG
mkdir -p \
$PKG/usr/{games,man/man6,share/{icons/hicolor/64x64/apps,applications}} \
$OUTPUT
install -oroot -groot -m0755 $CWD/$PRGNAM $P
$P --man | gzip -9c > $PKG/usr/man/man6/$PRGNAM.6.gz
$P --icon | convert gif:- png32:$PKG/usr/share/icons/hicolor/64x64/apps/$PRGNAM.png
$P --desktop > $PKG/usr/share/applications/$PRGNAM.desktop
PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
mkdir -p $PKGDOC
cat $CWD/README > $PKGDOC/README
cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
|