summaryrefslogtreecommitdiff
path: root/system/gpsman/gpsman.SlackBuild
blob: 20f12fba7d28c98b540e04b5144ed5cee3aa11fe (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
57
58
59
60
61
62
63
64
65
66
#!/bin/sh

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

set -e

PRGNAM=gpsman
VERSION=6.3.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.tgz
cd $PRGNAM-$VERSION
chown -R root:root .
find . -type f -exec chmod 0644 {} \;
find . -type d -exec chmod 0755 {} \;

mkdir -p $PKG/usr/bin
mkdir -p $PKG/usr/lib/$PRGNAM
mkdir -p $PKG/usr/man/man1
mkdir -p $PKG/usr/share/$PRGNAM

sed -e "s/set SRCDIR gmsrc/set SRCDIR \/usr\/lib\/gpsman/" ./gpsman.tcl > $PKG/usr/lib/$PRGNAM/gpsman.tcl

chmod 0755 $PKG/usr/lib/$PRGNAM/gpsman.tcl
chmod 0755 ./util/*.tcl

cp -a ./util/*.tcl $PKG/usr/lib/$PRGNAM
cp -a ./gmsrc/*.tcl $PKG/usr/lib/$PRGNAM
cp -a ./gmsrc/gmicons $PKG/usr/share/$PRGNAM
cp -a ./man/man1/* $PKG/usr/man/man1

( cd $PKG/usr/man
  find . -type f -exec gzip -9 {} \;
  for i in $(find . -type l) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
)

ln -s /usr/share/$PRGNAM/gmicons $PKG/usr/lib/$PRGNAM/gmicons
ln -s /usr/lib/$PRGNAM/gpsman.tcl $PKG/usr/bin/gpsman
ln -s /usr/lib/$PRGNAM/dos2gpsman.tcl $PKG/usr/bin/dos2gpsman
ln -s /usr/lib/$PRGNAM/exerciser.tcl $PKG/usr/bin/exerciser
ln -s /usr/lib/$PRGNAM/gf2gmn.tcl $PKG/usr/bin/gf2gmn
ln -s /usr/lib/$PRGNAM/mb2gmn.tcl $PKG/usr/bin/mb2gmn
ln -s /usr/lib/$PRGNAM/mou2gmn.tcl $PKG/usr/bin/mou2gmn
ln -s /usr/lib/$PRGNAM/shape2quadr.tcl $PKG/usr/bin/shape2quadr
ln -s /usr/lib/$PRGNAM/wpsinfull.tcl $PKG/usr/bin/wpsinfull

mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a LICENSE manual/* $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.tgz