summaryrefslogtreecommitdiff
path: root/system/ttf-sil-gentium/ttf-sil-gentium.SlackBuild
blob: 914eb5f5b39379b01281b4a350219f9dc828617c (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 ttf-sil-gentium
# Written by Kyle Guinn

# Modified by the SlackBuilds.org project

set -e

PRGNAM=ttf-sil-gentium
VERSION=1.02
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
cd $TMP 
rm -rf $PRGNAM-$VERSION

# First, if the source was pulled with wget, then it might not get named
# correctly - let's fix that
if [ -e "$CWD/render_download.php?site_id=nrsi&format=file&media_id=Gentium_102_L_tar&filename=%2Fttf-sil-gentium_1.0.2.tar.gz" ]; then
  mv "$CWD/render_download.php?site_id=nrsi&format=file&media_id=Gentium_102_L_tar&filename=%2Fttf-sil-gentium_1.0.2.tar.gz" \
    "$CWD/-ttf-sil-gentium_1.0.2.tar.gz"
fi

# Watch out for the name of this tarball - the leading '-' might cause problems
# To remove it, try `rm /path/to/-ttf-sil-gentium_1.0.2.tar.gz`
# or rm -- -ttf-sil-gentium_1.0.2.tar.gz
tar -xzvf $CWD/\-ttf-sil-gentium_1.0.2.tar.gz || exit 1
cd $PRGNAM-$VERSION || exit 1

chown -R root:root .
chmod -R u+w,go+r-w,a-s .

mkdir -p $PKG/usr/share/fonts
cp -a *.ttf $PKG/usr/share/fonts

mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a FONTLOG GENTIUM-FAQ OFL* README $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 -p -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz