summaryrefslogtreecommitdiff
path: root/system/artwiz-aleczapka/artwiz-aleczapka.SlackBuild
blob: dbd350ce047083f175526796878e1fb63cae2808 (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
56
#!/bin/sh

# Slackware build script for artwiz-aleczapka
# Written by Kyle Guinn <elyk03@gmail.com>

set -e

# To make a package for fonts other than English, run the script as, for
# example, "FONTLANG=de ./artwiz-aleczapka.SlackBuild".  You will need to
# download the correct tarball and place it in this directory.  See the
# SourceForge download page for the available tarballs.
FONTLANG=${FONTLANG:-en}

PRGNAM=artwiz-aleczapka-$FONTLANG
VERSION=1.3
ARCH=noarch
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}

rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
chmod -R u+w,go+r-w,a-s .

# The English package contains a cursor font.  To avoid clobbering the
# existing one (from the x/font-cursor-misc package), rename it.
# TODO:  Figure out and document how to set the default cursor font.
if [ -e cursor.pcf ]; then
  mv cursor.pcf artwiz-cursor.pcf
fi

gzip -9 *.pcf
mkdir -p $PKG/usr/share/fonts/misc
cp -a *.pcf.gz $PKG/usr/share/fonts/misc

mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a AUTHORS COPYING ChangeLog NEWS README* \
  $PKG/usr/doc/$PRGNAM-$VERSION || true
cat $CWD/artwiz-aleczapka.SlackBuild > \
  $PKG/usr/doc/$PRGNAM-$VERSION/artwiz-aleczapka.SlackBuild

mkdir -p $PKG/install
# Fix the package name in the slack-desc file
sed s/FONTLANG/$FONTLANG/g $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.tgz