* harbour/harbour-ce-spec
* harbour/harbour-w32-spec
* harbour/harbour.spec
* harbour/make_rpmce.sh
* harbour/make_rpmw32.sh
* harbour/make_rpm.sh
* removed --with zlib switch - now zlib will be created in all builds
* added hbzlib library
* added hbmzip library - MiniZIP wrapper to manage ZIP files
* harbour/contrib/Makefile
* added hbmzip library to default builds
* harbour/include/hbzlib.h
! changed \ in include path
! added relative paths for LCC and XCC
* harbour/bin/hb-func.sh
* updated for hbzlib library in core code and hbmzip in contrib
* harbour/utils/hbdot/Makefile
* harbour/utils/hbrun/Makefile
* added hbzlib library to linked library list
* harbour/include/hbzlib.h
* harbour/bin/hb-func.sh
* harbour/make_gcc.mak
* harbour/config/darwin/gcc.cf
* harbour/config/hpux/gcc.cf
* harbour/config/linux/gcc.cf
* harbour/config/sunos/gcc.cf
* harbour/config/bsd/gcc.cf
* harbour/utils/hbdot/Makefile
* harbour/utils/hbrun/Makefile
+ added support for compilation with HB_EXT_ZLIB macro
It forces using external (OS) ZLIB library instead of hbzlib.
Still some other make files should be updated to respect it.
126 lines
3.1 KiB
Bash
Executable File
126 lines
3.1 KiB
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# $Id$
|
|
#
|
|
|
|
# ---------------------------------------------------------------
|
|
# Copyright 2007 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
|
|
# simple script to build Harbour-WinCE cross build RPMs
|
|
#
|
|
# See doc/license.txt for licensing terms.
|
|
# ---------------------------------------------------------------
|
|
|
|
######################################################################
|
|
# Conditional build:
|
|
# --with mysql - build mysql lib
|
|
# --with pgsql - build pgsql lib
|
|
# --with gd - build gd lib
|
|
# --with allegro - build GTALLEG - Allegro based GT driver
|
|
# --with ads - build ADS RDD
|
|
# --without odbc - do not build odbc lib
|
|
# --without nf - do not build nanforum lib
|
|
######################################################################
|
|
|
|
test_reqrpm()
|
|
{
|
|
rpm -q --whatprovides "$1" &> /dev/null
|
|
}
|
|
|
|
get_rpmmacro()
|
|
{
|
|
local R X Y
|
|
|
|
R=`rpm --showrc|sed -e "/^-14:.${1}[^a-z0-9A-Z_]/ !d" -e "s/^-14: ${1}.//"`
|
|
X=`echo "${R}"|sed -e "s/.*\(%{\([^}]*\)}\).*/\2/"`
|
|
while [ "${X}" != "${R}" ]
|
|
do
|
|
Y=`get_rpmmacro "$X"`
|
|
if [ -n "${Y}" ]
|
|
then
|
|
R=`echo "${R}"|sed -e "s!%{${X}}!${Y}!g"`
|
|
X=`echo "${R}"|sed -e "s/.*\(%{\([^}]*\)}\).*/\2/"`
|
|
else
|
|
X="${R}"
|
|
fi
|
|
done
|
|
echo -n "${R}"
|
|
}
|
|
|
|
cd `dirname $0`
|
|
. bin/hb-func.sh
|
|
hb_ver=`get_hbver`
|
|
|
|
NEED_RPM="make gcc binutils bash cegcc-mingw32ce"
|
|
|
|
FORCE=""
|
|
|
|
LAST=""
|
|
while [ $# -gt 0 ]
|
|
do
|
|
if [ "$1" = "--force" ]
|
|
then
|
|
FORCE="yes"
|
|
else
|
|
INST_PARAM="${INST_PARAM} $1"
|
|
fi
|
|
LAST="$1"
|
|
shift
|
|
done
|
|
|
|
if [ -f /usr/local/ads/acesdk/ace.h ] || \
|
|
[ -f ${HOME}/ads/acesdk/ace.h ]
|
|
then
|
|
INST_PARAM="${INST_PARAM} --with ads"
|
|
fi
|
|
|
|
TOINST_LST=""
|
|
for i in ${NEED_RPM}
|
|
do
|
|
test_reqrpm "$i" || TOINST_LST="${TOINST_LST} $i"
|
|
done
|
|
|
|
if [ -z "${TOINST_LST}" ] || [ "${FORCE}" = "yes" ]
|
|
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
|
|
if [ `id -u` != 0 ] && [ ! -f ${HOME}/.rpmmacros ]
|
|
then
|
|
RPMDIR="${HOME}/RPM"
|
|
mkdir -p ${RPMDIR}/SOURCES ${RPMDIR}/RPMS ${RPMDIR}/SRPMS \
|
|
${RPMDIR}/BUILD ${RPMDIR}/SPECS
|
|
echo "%_topdir ${RPMDIR}" > ${HOME}/.rpmmacros
|
|
else
|
|
RPMDIR=`get_rpmmacro "_topdir"`
|
|
fi
|
|
mv ${hb_filename} ${RPMDIR}/SOURCES/
|
|
sed -e "s/^%define version .*$/%define version ${hb_ver}/g" \
|
|
harbour-ce-spec > ${RPMDIR}/SPECS/harbour-ce.spec
|
|
if which rpmbuild &>/dev/null
|
|
then
|
|
RPMBLD="rpmbuild"
|
|
else
|
|
RPMBLD="rpm"
|
|
fi
|
|
cd ${RPMDIR}/SPECS
|
|
${RPMBLD} -ba harbour-ce.spec ${INST_PARAM}
|
|
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 RPM files:"
|
|
echo "${TOINST_LST}"
|
|
exit 1
|
|
fi
|