summaryrefslogtreecommitdiffstats
path: root/development/pasdoc/pasdoc.SlackBuild
blob: c869e693ba5354a9986d929131aebe52bf828b7c (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
#!/bin/sh

# Slackware build script for pasdoc

# Written by Yann Mérignac yann.merignac@laposte.net
# This submission is considered to be in the public domain

PRGNAM=pasdoc
VERSION=0.12.1
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}

if [ -z "$ARCH" ]; then
  case "$( uname -m )" in
    i?86) ARCH=i486 ;;
    arm*) ARCH=arm ;;
       *) ARCH=$( uname -m ) ;;
  esac
fi

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

rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP || exit 1
rm -rf $PRGNAM
tar -xzvf $CWD/$PRGNAM-$VERSION-src.tar.gz || exit 1
cd $PRGNAM || exit 1
chown -R root:root .
chmod -R u+w,go+r-w,a-s .

# NO configure file for pasdoc

mkdir -p $PKG/usr/bin || exit 1

make build-fpc-default || exit 1
strip --strip-unneeded bin/pasdoc

install -m 0755 bin/pasdoc $PKG/usr/bin

mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a ChangeLog LICENSE docs/pasdoc.css docs/pasdoc.html docs/pasdoc.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}