2009-10-06 18:34 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/harbour.spec
! fixed to build with postinst.prg executed by shared linked hbrun
* harbour/bin/hb-func.sh
* harbour/debian/rules
* harbour/harbour.spec
% use HB_INST_PKGPREF instead of _DEFAULT_*_DIR
Please test DEB building in Debian, Ubuntu or in other DPKG
based distro. It probably has the same problem with postinst.prg
as all other builds.
* harbour/debian/rules
* harbour/harbour.spec
* harbour/mpkg_tgz.sh
* harbour/source/compiler/gencobj.c
* updated harbour.cfg localization in *nix builds
* harbour/utils/hbrun/Makefile
! restored support for default include directory in system wide builds
This commit is contained in:
@@ -17,6 +17,27 @@
|
||||
past entries belonging to author(s): Viktor Szakats.
|
||||
*/
|
||||
|
||||
2009-10-06 18:34 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
|
||||
* harbour/harbour.spec
|
||||
! fixed to build with postinst.prg executed by shared linked hbrun
|
||||
|
||||
* harbour/bin/hb-func.sh
|
||||
* harbour/debian/rules
|
||||
* harbour/harbour.spec
|
||||
% use HB_INST_PKGPREF instead of _DEFAULT_*_DIR
|
||||
Please test DEB building in Debian, Ubuntu or in other DPKG
|
||||
based distro. It probably has the same problem with postinst.prg
|
||||
as all other builds.
|
||||
|
||||
* harbour/debian/rules
|
||||
* harbour/harbour.spec
|
||||
* harbour/mpkg_tgz.sh
|
||||
* harbour/source/compiler/gencobj.c
|
||||
* updated harbour.cfg localization in *nix builds
|
||||
|
||||
* harbour/utils/hbrun/Makefile
|
||||
! restored support for default include directory in system wide builds
|
||||
|
||||
2009-10-06 16:46 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
|
||||
* harbour/config/instsh.mk
|
||||
* harbour/bin/hb-func.sh
|
||||
|
||||
@@ -190,10 +190,6 @@ mk_hbtools()
|
||||
hb_gt_ori=${HB_GT_LIB}
|
||||
[ -z "${HB_GT_LIB}" ] && HB_GT_LIB="gtstd"
|
||||
|
||||
[ -z "${_DEFAULT_BIN_DIR}" ] && _DEFAULT_BIN_DIR="${HB_BIN_INSTALL}"
|
||||
[ -z "${_DEFAULT_INC_DIR}" ] && _DEFAULT_INC_DIR="${HB_INC_INSTALL}"
|
||||
[ -z "${_DEFAULT_LIB_DIR}" ] && _DEFAULT_LIB_DIR="${HB_LIB_INSTALL}"
|
||||
|
||||
if [ "${HB_PLATFORM}" = "beos" ]; then
|
||||
HB_SYS_LIBS="-lroot -lnetwork"
|
||||
else
|
||||
@@ -303,9 +299,9 @@ mk_hbtools()
|
||||
# set environment variables
|
||||
export HB_PLATFORM="${HB_PLATFORM}"
|
||||
export HB_COMPILER="${HB_COMPILER}"
|
||||
[ -z "\${HB_BIN_INSTALL}" ] && export HB_BIN_INSTALL="${_DEFAULT_BIN_DIR}"
|
||||
[ -z "\${HB_INC_INSTALL}" ] && export HB_INC_INSTALL="${_DEFAULT_INC_DIR}"
|
||||
[ -z "\${HB_LIB_INSTALL}" ] && export HB_LIB_INSTALL="${_DEFAULT_LIB_DIR}"
|
||||
[ -z "\${HB_BIN_INSTALL}" ] && export HB_BIN_INSTALL="${HB_BIN_INSTALL}"
|
||||
[ -z "\${HB_INC_INSTALL}" ] && export HB_INC_INSTALL="${HB_INC_INSTALL}"
|
||||
[ -z "\${HB_LIB_INSTALL}" ] && export HB_LIB_INSTALL="${HB_LIB_INSTALL}"
|
||||
|
||||
# be sure that ${name} binaries are in your path
|
||||
export PATH="\${HB_BIN_INSTALL}${hb_path_separator}${hb_ccpath}\${PATH}"
|
||||
|
||||
@@ -6,26 +6,25 @@
|
||||
# Uncomment this to turn on verbose mode.
|
||||
#export DH_VERBOSE := 1
|
||||
|
||||
export _DEFAULT_BIN_DIR := /usr/bin
|
||||
export _DEFAULT_INC_DIR := /usr/include/harbour
|
||||
export _DEFAULT_LIB_DIR := /usr/lib/harbour
|
||||
export _DEFAULT_DOC_DIR := /usr/share/doc/harbour
|
||||
export INSTDIR := $(CURDIR)/debian/harbour
|
||||
export HB_BIN_INSTALL := $(INSTDIR)$(_DEFAULT_BIN_DIR)
|
||||
export HB_LIB_INSTALL := $(INSTDIR)$(_DEFAULT_LIB_DIR)
|
||||
export HB_INC_INSTALL := $(INSTDIR)$(_DEFAULT_INC_DIR)
|
||||
export HB_DOC_INSTALL := $(INSTDIR)$(_DEFAULT_DOC_DIR)
|
||||
export HB_ETC_DIR := $(INSTDIR)/etc
|
||||
export HB_BIN_INSTALL := /usr/bin
|
||||
export HB_LIB_INSTALL := /usr/include/harbour
|
||||
export HB_INC_INSTALL := /usr/lib/harbour
|
||||
export HB_DOC_INSTALL := /usr/share/doc/harbour
|
||||
export HB_ETC_INSTALL := /etc/harbour
|
||||
export HB_INST_PKGPREF := $(CURDIR)/debian/harbour
|
||||
|
||||
CFLAGS := -g
|
||||
# is INSTDIR necessary for dpkg? If not then please remove it.
|
||||
export INSTDIR := $(HB_INST_PKGPREF)
|
||||
|
||||
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
|
||||
CFLAGS += -O0
|
||||
HB_USER_CFLAGS += -O0
|
||||
else
|
||||
CFLAGS += -O3
|
||||
HB_USER_CFLAGS += -O3
|
||||
endif
|
||||
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
|
||||
INSTALL_PROGRAM += -s
|
||||
else
|
||||
HB_USER_CFLAGS := -g
|
||||
endif
|
||||
|
||||
build: build-stamp
|
||||
@@ -53,9 +52,8 @@ install: build
|
||||
dh_installdirs
|
||||
|
||||
make install
|
||||
rm -f $(HB_BIN_INSTALL)/hbverfix
|
||||
install -m644 debian/harbour.cfg $(HB_ETC_DIR)/harbour.cfg
|
||||
install -m644 source/rtl/gtcrs/hb-charmap.def $(HB_ETC_DIR)/harbour
|
||||
install -m644 debian/harbour.cfg $(HB_INST_PKGPREF)$(HB_ETC_INSTALL)/harbour.cfg
|
||||
install -m644 source/rtl/gtcrs/hb-charmap.def $(HB_INST_PKGPREF)$(HB_ETC_INSTALL)/hb-charmap.def
|
||||
|
||||
|
||||
# Build architecture-independent files here.
|
||||
|
||||
@@ -69,6 +69,7 @@
|
||||
%define version 2.0.0
|
||||
%define releasen beta3
|
||||
%define hb_pref hb
|
||||
%define hb_etcdir /etc/%{name}
|
||||
%define hb_plat export HB_PLATFORM=linux
|
||||
%define hb_cc export HB_COMPILER=gcc
|
||||
%define hb_cflag export HB_USER_CFLAGS=
|
||||
@@ -81,9 +82,10 @@
|
||||
%define hb_bdir export HB_BIN_INSTALL=%{_bindir}
|
||||
%define hb_idir export HB_INC_INSTALL=%{_includedir}/%{name}
|
||||
%define hb_ldir export HB_LIB_INSTALL=%{_libdir}/%{name}
|
||||
%define hb_edir export HB_ETC_INSTALL=%{hb_etcdir}
|
||||
%define hb_cmrc export HB_COMMERCE=%{?_without_gpllib:yes}
|
||||
%define hb_ctrb export HB_CONTRIBLIBS="hbbmcdx hbbtree hbclipsm hbct hbgt hbmisc hbmzip hbnetio hbtip hbtpathy hbhpdf hbziparc xhb rddsql %{!?_without_nf:hbnf} %{?_with_odbc:hbodbc} %{?_with_curl:hbcurl} %{?_with_ads:rddads} %{?_with_gd:hbgd} %{?_with_pgsql:hbpgsql} %{?_with_mysql:hbmysql} %{?_with_fbsql:hbfbird} %{?_with_allegro:gtalleg}"
|
||||
%define hb_env %{hb_plat} ; %{hb_cc} ; %{hb_cflag} ; %{hb_lflag} ; %{hb_gpm} ; %{hb_crs} ; %{hb_sln} ; %{hb_x11} ; %{hb_local} ; %{hb_bdir} ; %{hb_idir} ; %{hb_ldir} ; %{hb_ctrb} ; %{hb_cmrc}
|
||||
%define hb_env %{hb_plat} ; %{hb_cc} ; %{hb_cflag} ; %{hb_lflag} ; %{hb_gpm} ; %{hb_crs} ; %{hb_sln} ; %{hb_x11} ; %{hb_local} ; %{hb_bdir} ; %{hb_idir} ; %{hb_ldir} ; %{hb_edir} ; %{hb_ctrb} ; %{hb_cmrc}
|
||||
%define hb_host www.harbour-project.org
|
||||
%define readme README.RPM
|
||||
######################################################################
|
||||
@@ -379,38 +381,36 @@ make %{?_smp_mflags}
|
||||
|
||||
%{hb_env}
|
||||
|
||||
export _DEFAULT_BIN_DIR=$HB_BIN_INSTALL
|
||||
export _DEFAULT_INC_DIR=$HB_INC_INSTALL
|
||||
export _DEFAULT_LIB_DIR=$HB_LIB_INSTALL
|
||||
export HB_BIN_INSTALL=$RPM_BUILD_ROOT/$HB_BIN_INSTALL
|
||||
export HB_INC_INSTALL=$RPM_BUILD_ROOT/$HB_INC_INSTALL
|
||||
export HB_LIB_INSTALL=$RPM_BUILD_ROOT/$HB_LIB_INSTALL
|
||||
export HB_INST_PKGPREF=$RPM_BUILD_ROOT
|
||||
export HB_BUILD_STRIP=all
|
||||
export HB_BUILD_SHARED=%{!?_with_static:yes}
|
||||
|
||||
# necessary for shared linked hbrun used to execute postinst.prg
|
||||
export LD_LIBRARY_PATH=$HB_INST_PKGPREF$HB_LIB_INSTALL
|
||||
|
||||
make install %{?_smp_mflags}
|
||||
|
||||
[ "%{?_with_allegro:1}" ] || rm -f $HB_LIB_INSTALL/libgtalleg.a
|
||||
[ "%{?_without_gtcrs:1}" ] && rm -f $HB_LIB_INSTALL/libgtcrs.a
|
||||
[ "%{?_without_gtsln:1}" ] && rm -f $HB_LIB_INSTALL/libgtsln.a
|
||||
rm -f $HB_LIB_INSTALL/liblibhpdf.a
|
||||
rm -f $HB_LIB_INSTALL/liblibpng.a
|
||||
rm -f $HB_LIB_INSTALL/libsqlite3.a
|
||||
[ "%{?_with_allegro:1}" ] || rm -f $HB_INST_PKGPREF$HB_LIB_INSTALL/libgtalleg.a
|
||||
[ "%{?_without_gtcrs:1}" ] && rm -f $HB_INST_PKGPREF$HB_LIB_INSTALL/libgtcrs.a
|
||||
[ "%{?_without_gtsln:1}" ] && rm -f $HB_INST_PKGPREF$HB_LIB_INSTALL/libgtsln.a
|
||||
rm -f $HB_INST_PKGPREF$HB_LIB_INSTALL/liblibhpdf.a
|
||||
rm -f $HB_INST_PKGPREF$HB_LIB_INSTALL/liblibpng.a
|
||||
rm -f $HB_INST_PKGPREF$HB_LIB_INSTALL/libsqlite3.a
|
||||
|
||||
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
|
||||
install -m644 doc/man/*.1* $RPM_BUILD_ROOT%{_mandir}/man1/
|
||||
mkdir -p $HB_INST_PKGPREF%{_mandir}/man1
|
||||
install -m644 doc/man/*.1* $HB_INST_PKGPREF%{_mandir}/man1/
|
||||
|
||||
mkdir -p $RPM_BUILD_ROOT/etc/harbour
|
||||
install -m644 source/rtl/gtcrs/hb-charmap.def $RPM_BUILD_ROOT/etc/harbour/hb-charmap.def
|
||||
cat > $RPM_BUILD_ROOT/etc/harbour.cfg <<EOF
|
||||
mkdir -p $HB_INST_PKGPREF$HB_ETC_INSTALL
|
||||
install -m644 source/rtl/gtcrs/hb-charmap.def $HB_INST_PKGPREF$HB_ETC_INSTALL/hb-charmap.def
|
||||
cat > $HB_INST_PKGPREF$HB_ETC_INSTALL/harbour.cfg <<EOF
|
||||
CC=gcc
|
||||
CFLAGS=-c -I$_DEFAULT_INC_DIR
|
||||
CFLAGS=-c -I$HB_INC_INSTALL
|
||||
VERBOSE=YES
|
||||
DELTMP=YES
|
||||
EOF
|
||||
|
||||
# remove unused files
|
||||
rm -f ${HB_BIN_INSTALL}/hbtest
|
||||
rm -f $HB_INST_PKGPREF$HB_BIN_INSTALL/hbtest
|
||||
|
||||
# Create a README file for people using this RPM.
|
||||
cat > doc/%{readme} <<EOF
|
||||
@@ -558,9 +558,9 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%doc doc/%{readme}
|
||||
%doc doc/en-EN/
|
||||
|
||||
%dir /etc/harbour
|
||||
%verify(not md5 mtime) %config /etc/harbour.cfg
|
||||
%verify(not md5 mtime) %config /etc/harbour/hb-charmap.def
|
||||
%dir %{hb_etcdir}
|
||||
%verify(not md5 mtime) %config %{hb_etcdir}/harbour.cfg
|
||||
%verify(not md5 mtime) %config %{hb_etcdir}/hb-charmap.def
|
||||
%{_bindir}/harbour
|
||||
%{_bindir}/hbpp
|
||||
%{_bindir}/hb-mkdyn
|
||||
|
||||
@@ -121,7 +121,7 @@ if [ "${hb_sysdir}" = "yes" ]; then
|
||||
cp -f source/rtl/gtcrs/hb-charmap.def $HB_INST_PKGPREF$ETC/harbour/hb-charmap.def
|
||||
chmod 644 $HB_INST_PKGPREF$ETC/harbour/hb-charmap.def
|
||||
|
||||
cat > $HB_INST_PKGPREF$ETC/harbour.cfg <<EOF
|
||||
cat > $HB_INST_PKGPREF$ETC/harbour/harbour.cfg <<EOF
|
||||
CC=${HB_CCPREFIX}gcc
|
||||
CFLAGS=-c -I${HB_INSTALL_PREFIX}/include/harbour
|
||||
VERBOSE=YES
|
||||
|
||||
@@ -135,8 +135,10 @@ void hb_compGenCObj( HB_COMP_DECL, PHB_FNAME pFileName )
|
||||
char szOutPath[ HB_PATH_MAX ] = "\0";
|
||||
char pszTemp[ HB_PATH_MAX ] = "";
|
||||
char buffer[ HB_CFG_LINE_LEN * 2 + 1024 ];
|
||||
#if defined( HB_OS_UNIX )
|
||||
char * pszEnv = hb_strdup( "/etc:/usr/local/etc" );
|
||||
#if defined( HB_OS_BEOS )
|
||||
char * pszEnv = hb_strdup( "/boot/common/etc/harbour" );
|
||||
#elif defined( HB_OS_UNIX )
|
||||
char * pszEnv = hb_strdup( "/etc/harbour:/usr/local/etc/harbour:/opt/harbour/etc" );
|
||||
#else
|
||||
char * pszEnv = hb_getenv( "PATH" );
|
||||
#endif
|
||||
|
||||
@@ -8,6 +8,8 @@ endif
|
||||
|
||||
ROOT := ../../
|
||||
|
||||
include $(TOP)$(ROOT)config/global.mk
|
||||
|
||||
PRG_SOURCES := \
|
||||
hbrun.prg \
|
||||
|
||||
@@ -15,4 +17,15 @@ PRG_MAIN := hbrun.prg
|
||||
|
||||
LIBS = hbcplr hbpp hbcommon $(HB_LIBS_ST_RDD)
|
||||
|
||||
ifeq ($(_DEFAULT_INC_DIR),)
|
||||
ifneq ($(HB_INC_INSTALL),)
|
||||
ifneq ($(HB_INST_PKGPREF),)
|
||||
_DEFAULT_INC_DIR := $(HB_INC_INSTALL)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
ifneq ($(_DEFAULT_INC_DIR),)
|
||||
HB_PRGFLAGS += -D_DEFAULT_INC_DIR=[$(_DEFAULT_INC_DIR)]
|
||||
endif
|
||||
|
||||
include $(TOP)$(ROOT)config/bin.mk
|
||||
|
||||
Reference in New Issue
Block a user