From: helge Date: Sun, 29 Aug 2004 22:04:24 +0000 (+0000) Subject: added FHS hack to GDL X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fa438d176e1b973da347626587cfb15e3d2eb605;p=sope added FHS hack to GDL git-svn-id: http://svn.opengroupware.org/SOPE/trunk@88 e4a50df8-12e2-0310-a44c-efbce7f8a7e3 --- diff --git a/sope-gdl1/GDLAccess/ChangeLog b/sope-gdl1/GDLAccess/ChangeLog index c160125d..b2c58b97 100644 --- a/sope-gdl1/GDLAccess/ChangeLog +++ b/sope-gdl1/GDLAccess/ChangeLog @@ -1,3 +1,14 @@ +2004-08-30 Helge Hess + + * v1.1.36 + + * EOAdaptor.m: also look for adaptors in /usr/lib/sope-4.3/dbadaptors + and /usr/local/lib/sope-4.3/dbadaptors + + * added hack to install the project in FHS locations - the library, + its headers, the tools and the resources will be installed in + FHS_INSTALL_ROOT if specified (eg make FHS_INSTALL_ROOT=/usr/local) + 2004-08-27 Helge Hess * EOAdaptor.m: look for adaptor bundles in Library/GDLAdaptors-1.1/ diff --git a/sope-gdl1/GDLAccess/EOAdaptor.m b/sope-gdl1/GDLAccess/EOAdaptor.m index c63c5920..3138c1df 100644 --- a/sope-gdl1/GDLAccess/EOAdaptor.m +++ b/sope-gdl1/GDLAccess/EOAdaptor.m @@ -24,17 +24,14 @@ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -// $Id: EOAdaptor.m 1 2004-08-20 10:38:46Z znek $ - -#import "common.h" -#import "EOAdaptor.h" -#import "EOAdaptorChannel.h" -#import "EOAdaptorContext.h" -#import "EOAttribute.h" -#import "EOFExceptions.h" -#import "EOModel.h" -#import "EOSQLExpression.h" - +#include "EOAdaptor.h" +#include "EOAdaptorChannel.h" +#include "EOAdaptorContext.h" +#include "EOAttribute.h" +#include "EOFExceptions.h" +#include "EOModel.h" +#include "EOSQLExpression.h" +#include "common.h" @implementation EOAdaptor @@ -74,14 +71,16 @@ e = [tmp objectEnumerator]; while ((tmp = [e nextObject])) { tmp = [tmp stringByAppendingPathComponent:@"Library/GDLAdaptors-1.1"]; - if (![ma containsObject:tmp]) - [ma addObject:tmp]; + if ([ma containsObject:tmp]) continue; + [ma addObject:tmp]; } } - else { - NSLog(@"%s: empty library search path !", __PRETTY_FUNCTION__); - } + [ma addObject:@"/usr/local/lib/sope-4.3/dbadaptors"]; + [ma addObject:@"/usr/lib/sope-4.3/dbadaptors"]; + searchPathes = [ma copy]; + if ([searchPathes count] == 0) + NSLog(@"%s: empty library search path !", __PRETTY_FUNCTION__); return searchPathes; } diff --git a/sope-gdl1/GDLAccess/GNUmakefile b/sope-gdl1/GDLAccess/GNUmakefile index de79fb20..129c9198 100644 --- a/sope-gdl1/GDLAccess/GNUmakefile +++ b/sope-gdl1/GDLAccess/GNUmakefile @@ -123,3 +123,4 @@ include $(GNUSTEP_MAKEFILES)/library.make include $(GNUSTEP_MAKEFILES)/aggregate.make include $(GNUSTEP_MAKEFILES)/tool.make -include GNUmakefile.postamble +-include fhs.make diff --git a/sope-gdl1/GDLAccess/Version b/sope-gdl1/GDLAccess/Version index e9a7f011..90614ef6 100644 --- a/sope-gdl1/GDLAccess/Version +++ b/sope-gdl1/GDLAccess/Version @@ -1,3 +1,3 @@ # $Id: Version 1 2004-08-20 10:38:46Z znek $ -SUBMINOR_VERSION:=35 +SUBMINOR_VERSION:=36 diff --git a/sope-gdl1/GDLAccess/fhs.make b/sope-gdl1/GDLAccess/fhs.make new file mode 100644 index 00000000..9b14b4c1 --- /dev/null +++ b/sope-gdl1/GDLAccess/fhs.make @@ -0,0 +1,42 @@ +# postprocessing + +# FHS support (this is a hack and is going to be done by gstep-make!) + +ifneq ($(FHS_INSTALL_ROOT),) + +FHS_INCLUDE_DIR=$(FHS_INSTALL_ROOT)/include/ +FHS_LIB_DIR=$(FHS_INSTALL_ROOT)/lib/ +FHS_BIN_DIR=$(FHS_INSTALL_ROOT)/bin/ + +NONFHS_LIBDIR="$(GNUSTEP_LIBRARIES)/$(GNUSTEP_TARGET_LDIR)/" +NONFHS_LIBNAME="$(LIBRARY_NAME)$(LIBRARY_NAME_SUFFIX)$(SHARED_LIBEXT)" +NONFHS_BINDIR="$(GNUSTEP_TOOLS)/$(GNUSTEP_TARGET_LDIR)" + + +fhs-header-dirs :: + $(MKDIRS) $(FHS_INCLUDE_DIR)$(libGDLAccess_HEADER_FILES_INSTALL_DIR) + +fhs-bin-dirs :: + $(MKDIRS) $(FHS_BIN_DIR) + + +move-headers-to-fhs :: fhs-header-dirs + @echo "moving headers to $(FHS_INCLUDE_DIR) .." + mv $(GNUSTEP_HEADERS)$(libGDLAccess_HEADER_FILES_INSTALL_DIR)/*.h \ + $(FHS_INCLUDE_DIR)$(libGDLAccess_HEADER_FILES_INSTALL_DIR)/ + +move-libs-to-fhs :: + @echo "moving libs to $(FHS_LIB_DIR) .." + mv $(NONFHS_LIBDIR)/$(NONFHS_LIBNAME)* $(FHS_LIB_DIR)/ + +move-tools-to-fhs :: fhs-bin-dirs + @echo "moving tools from $(NONFHS_BINDIR) to $(FHS_BIN_DIR) .." + for i in $(TOOL_NAME); do \ + mv "$(NONFHS_BINDIR)/$${i}" $(FHS_BIN_DIR); \ + done + +move-to-fhs :: move-headers-to-fhs move-libs-to-fhs move-tools-to-fhs + +after-install :: move-to-fhs + +endif diff --git a/sope-gdl1/PostgreSQL/ChangeLog b/sope-gdl1/PostgreSQL/ChangeLog index 72a36a6e..38c1ef1b 100644 --- a/sope-gdl1/PostgreSQL/ChangeLog +++ b/sope-gdl1/PostgreSQL/ChangeLog @@ -1,3 +1,9 @@ +2004-08-29 Helge Hess + + * added hack to install the project in FHS locations - the DB adaptor + will be installed in FHS_INSTALL_ROOT if specified (eg make + FHS_INSTALL_ROOT=/usr/local) (v1.1.36) + 2004-08-27 Helge Hess * GNUmakefile*: renamed bundle to PostgreSQL, now installs in diff --git a/sope-gdl1/PostgreSQL/GNUmakefile b/sope-gdl1/PostgreSQL/GNUmakefile index b70c0eb1..ccc83eef 100644 --- a/sope-gdl1/PostgreSQL/GNUmakefile +++ b/sope-gdl1/PostgreSQL/GNUmakefile @@ -64,3 +64,4 @@ gdltest_OBJC_FILES = gdltest.m include $(GNUSTEP_MAKEFILES)/bundle.make #include $(GNUSTEP_MAKEFILES)/tool.make -include GNUmakefile.postamble +-include fhs.make diff --git a/sope-gdl1/PostgreSQL/Version b/sope-gdl1/PostgreSQL/Version index e9a7f011..90614ef6 100644 --- a/sope-gdl1/PostgreSQL/Version +++ b/sope-gdl1/PostgreSQL/Version @@ -1,3 +1,3 @@ # $Id: Version 1 2004-08-20 10:38:46Z znek $ -SUBMINOR_VERSION:=35 +SUBMINOR_VERSION:=36 diff --git a/sope-gdl1/PostgreSQL/fhs.make b/sope-gdl1/PostgreSQL/fhs.make new file mode 100644 index 00000000..1321dd98 --- /dev/null +++ b/sope-gdl1/PostgreSQL/fhs.make @@ -0,0 +1,25 @@ +# postprocessing + +# FHS support (this is a hack and is going to be done by gstep-make!) + +ifneq ($(FHS_INSTALL_ROOT),) + +FHS_LIB_DIR=$(FHS_INSTALL_ROOT)/lib/ +FHS_DB_DIR=$(FHS_LIB_DIR)sope-4.3/dbadaptors/ + +fhs-db-dirs :: + $(MKDIRS) $(FHS_DB_DIR) + +move-bundles-to-fhs :: fhs-db-dirs + @echo "moving bundles $(BUNDLE_INSTALL_DIR) to $(FHS_DB_DIR) .." + for i in $(BUNDLE_NAME); do \ + j="$(FHS_DB_DIR)/$${i}$(BUNDLE_EXTENSION)"; \ + if test -d $$j; then rm -r $$j; fi; \ + mv "$(BUNDLE_INSTALL_DIR)/$${i}$(BUNDLE_EXTENSION)" $$j; \ + done + +move-to-fhs :: move-bundles-to-fhs + +after-install :: move-to-fhs + +endif