blob: 544dc2152153fd536371601bb84b3862b06dab5b (
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
|
#!/bin/sh
set -u
set -e
trap onexit INT
trap onexit TERM
trap onexit EXIT
TMPDIR=
onexit()
{
if [ ! "$TMPDIR" = "" ]; then
rm -rf $TMPDIR
fi
}
PACKAGE_NAME=@PACKAGE_NAME@
VERSION=@VERSION@
BUILD=@BUILD@
SRCDIR=@srcdir@
OS=`uname -s`
CPU=@host_cpu@
PACKAGE_FILE=$PACKAGE_NAME-$OS-$CPU-$VERSION.tar.gz
SERVER=0
if [ $# -gt 0 ]; then
if [ "$1" = "server" ]; then
SERVER=1
fi
fi
umask 022
TMPDIR=`mktemp -d /tmp/$PACKAGE_NAME-build.XXXXXX`
rm -f $PACKAGE_FILE
if [ $SERVER = 1 ]; then
make xserver-install prefix=/opt/TigerVNC DESTDIR=$TMPDIR
else
make install prefix=/opt/TigerVNC DESTDIR=$TMPDIR
fi
pushd $TMPDIR
tar cfz $PACKAGE_FILE opt
popd
cp $TMPDIR/$PACKAGE_FILE .
exit
|