-
Notifications
You must be signed in to change notification settings - Fork 18
/
make_deb5.sh
executable file
·53 lines (49 loc) · 1.33 KB
/
make_deb5.sh
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
#
# $Id$
#
# ---------------------------------------------------------------
# Copyright 2003 Przemyslaw Czerpak <[email protected]>
#
# simple script to build xHarbour .DEB package for Debian 5.0 (Lenny),
# Ubuntu 9.10 (Karmic Koala) and distros debian based.
#
# note: the folowing packages must be installed before run this script:
# bison, libgpmg1-dev, libncurses5-dev and libslang2-dev.
#
# See doc/license.txt for licensing terms.
# ---------------------------------------------------------------
test_pkg()
{
dpkg -s "$1" &> /dev/null
}
TOINST_LST=""
for i in gcc binutils bash bison libncurses5 libncurses5-dev make libgpmg1-dev libslang2-dev libc6-dev
do
test_pkg "$i" || TOINST_LST="${TOINST_LST} $i"
done
if [ -z "${TOINST_LST}" ] || [ "$1" = "--force" ]
then
. ./bin/pack_src.sh
stat="$?"
if [ -z "${hb_filename}" ]
then
echo "The script ./bin/pack_src.sh doesn't set archive name to \${hb_filename}"
exit 1
elif [ "${stat}" != 0 ]
then
echo "Error during packing the sources in ./bin/pack_src.sh"
exit 1
elif [ -f ${hb_filename} ]
then
dpkg-buildpackage -b
else
echo "Cannot find archive file: ${hb_filename}"
exit 1
fi
else
echo "If you want to build xHarbour compiler"
echo "you have to install the folowing packages:"
echo "${TOINST_LST}"
exit 1
fi