summaryrefslogtreecommitdiff
path: root/desktop/liberation-fonts-ttf/liberation-fonts-ttf.SlackBuild
blob: 6390ada9aeddb8e1f5a4a7d42c61f3c1af720a03 (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
#!/bin/sh

# Slackware build script for liberation-fonts-ttf

# Written by core (eroc@linuxmail.org)
# I took some ideas from alienBOB's slackbuild:
# http://www.slackware.com/~alien/slackbuilds/liberation-fonts/build/liberation-fonts.SlackBuild

set -e

PRGNAM=liberation-fonts-ttf
PRGNAMALT=liberation-fonts
VERSION=3
VERSIONALT=0.2
ARCH=noarch
BUILD=${BUILD:-1}
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 -xzvf $CWD/$PRGNAM-$VERSION.tar.gz
mv $PRGNAMALT-$VERSIONALT $PRGNAM-$VERSION
cd $PRGNAM-$VERSION
chown -R root:root .
chmod -R u+w,go+r-w,a-s .

# To determinate Xorg's location
XPREF=$(pkg-config --variable=prefix x11) || true
if [ "$XPREF" == "/usr" ]; then
    FONTDIR="$PKG/usr/share/fonts/TTF"
else
    FONTDIR="$PKG/usr/X11R6/lib/X11/fonts/TTF"
fi

mkdir -p $FONTDIR/
cp -a *.ttf $FONTDIR/

mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a COPYING License.txt $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$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.tgz