Files
harbour-core/harbour/make_deb.sh
Przemyslaw Czerpak f900de7f0a 2008-05-28 21:53 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/contrib/Makefile
    * respect HB_WITHOUT_ODBC and HB_WITHOUT_ADS envvars

  * harbour/debian/control
  * harbour/make_deb.sh
    * removed libncurses5-dev, libslang2-dev, libgpmg1-dev, libx11-dev and
      unixodbc-dev from dependences list.
    + added support for HB_COMMERCE=yes envvar
    + added automatic detection for curses, slang, gpm, x11 and odbc
      devel packages
    + added test for ACESDK detection - it tests if ach.h file exists
      in default user or system wide installation

    The above modifications are not tested and I would like to ask
    Debian/Ubuntu users to make necessary tests.
2008-05-28 19:53:26 +00:00

100 lines
2.1 KiB
Bash
Executable File

#!/bin/sh
#
# $Id$
#
# ---------------------------------------------------------------
# Copyright 2003 Przemyslaw Czerpak <druzus@polbox.com>
# simple script to build DEBs from Harbour sources
#
# See doc/license.txt for licensing terms.
# ---------------------------------------------------------------
test_reqpkg()
{
dpkg -s "$1" &> /dev/null
}
TOINST_LST=""
for i in gcc binutils bash debhelper
do
test_reqpkg "$i" || TOINST_LST="${TOINST_LST} $i"
done
if [ "$HB_COMMERCE" = yes ]
then
export HB_GPM_MOUSE=no
export HB_WITHOUT_GTSLN=yes
else
if [ -z "$HB_GPM_MOUSE" ] && test_reqpkg libgpmg1-dev
then
export HB_GPM_MOUSE=yes
fi
if [ -z "$HB_WITHOUT_GTSLN" ] && test_reqpkg libslang2-dev
then
export HB_WITHOUT_GTSLN=yes
fi
fi
if [ -z "$HB_WITHOUT_GTCRS" ] && ! test_reqpkg libncurses5-dev
then
export HB_WITHOUT_GTCRS=yes
fi
if [ -z "$HB_WITHOUT_X11" ] && ! test_reqpkg libx11-dev
then
export HB_WITHOUT_X11=yes
fi
if [ -z "$HB_WITHOUT_ODBC" ] && ! test_reqpkg unixodbc-dev
then
export HB_WITHOUT_ODBC=yes
fi
if [ -z "$HB_WITHOUT_ADS" ] && \
! /usr/local/ads/acesdk/ace.h && \
! $(HOME)/ads/acesdk/ace.h
then
export HB_WITHOUT_ADS=yes
fi
if test_reqpkg libpq-dev
then
export HB_CONTRIBLIBS="${HB_CONTRIBLIBS} hbpgsql"
fi
if test_reqpkg libmysqlclient15-dev
then
export HB_CONTRIBLIBS="${HB_CONTRIBLIBS} hbmysql"
fi
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 Harbour compiler"
echo "you have to install the folowing packages:"
echo ""
echo "${TOINST_LST}"
echo ""
echo "you can do that executing:"
echo "sudo apt-get install ${TOINST_LST}"
exit 1
fi