summaryrefslogtreecommitdiff
path: root/graphics/lgeo/lgeo.SlackBuild
blob: 0121966981c6954a3b7223a4ac9efe6d0e0dbb02 (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
#!/bin/sh

# Slackware build script for lgeo
# datafiles needed by l3p / POV-Ray

# Written by Niels Horn - niels.horn@gmail.com
# revision date 2009/12/27

PRGNAM=lgeo
VERSION=${VERSION:-20081215}
ARCH=noarch
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}

CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}

set -e

rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM
unzip $CWD/$PRGNAM.zip
cd $PRGNAM
chown -R root:root .
find . -type d -exec chmod 0755 {} \;
find . -type f -exec chmod 0644 {} \;

# Copy the 'read-only' data to the package
mkdir -p $PKG/usr/share/LDRAW/$PRGNAM
cp -a \
  *.lst lg ar \
  $PKG/usr/share/LDRAW/$PRGNAM

# Copy documentation
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/
cp -a \
  *.txt *.pdf \
  $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

cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}