forked from xHarbour-org/xharbour
-
Notifications
You must be signed in to change notification settings - Fork 0
/
make_deb.sh
executable file
·48 lines (44 loc) · 1.13 KB
/
make_deb.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
#!/bin/sh
#
# $Id$
#
# ---------------------------------------------------------------
# Copyright 2003 Przemyslaw Czerpak <[email protected]>
# simple script to build RPMs from xHarbour sources
#
# See doc/license.txt for licensing terms.
# ---------------------------------------------------------------
test_reqrpm()
{
dpkg -s "$1" &> /dev/null
}
TOINST_LST=""
for i in gcc binutils bash bison libncurses5 libncurses5-dev debmake libgpmg1-dev libslang1-dev libc6-dev
do
test_reqrpm "$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 RPM files:"
echo "${TOINST_LST}"
exit 1
fi