]> err.no Git - sope/commitdiff
added FHS hack to GDL
authorhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Sun, 29 Aug 2004 22:04:24 +0000 (22:04 +0000)
committerhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Sun, 29 Aug 2004 22:04:24 +0000 (22:04 +0000)
git-svn-id: http://svn.opengroupware.org/SOPE/trunk@88 e4a50df8-12e2-0310-a44c-efbce7f8a7e3

sope-gdl1/GDLAccess/ChangeLog
sope-gdl1/GDLAccess/EOAdaptor.m
sope-gdl1/GDLAccess/GNUmakefile
sope-gdl1/GDLAccess/Version
sope-gdl1/GDLAccess/fhs.make [new file with mode: 0644]
sope-gdl1/PostgreSQL/ChangeLog
sope-gdl1/PostgreSQL/GNUmakefile
sope-gdl1/PostgreSQL/Version
sope-gdl1/PostgreSQL/fhs.make [new file with mode: 0644]

index c160125d15ebe7f83d7505c9edcdbecd1d48a5a0..b2c58b97e28330e4a219af684f0ba2177f546317 100644 (file)
@@ -1,3 +1,14 @@
+2004-08-30  Helge Hess  <helge.hess@opengroupware.org>
+
+       * 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  <helge.hess@skyrix.com>
 
        * EOAdaptor.m: look for adaptor bundles in Library/GDLAdaptors-1.1/
index c63c592062c318a1466f6e2a9e2f66b8f4ed3fec..3138c1df86ef80f6c71d9eb9e353829fa92771d6 100644 (file)
    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
 
     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;
 }
 
index de79fb20cbd6833fea175d2e4119b7fc493160e6..129c9198df676f99212f906b04df30c7a976c82f 100644 (file)
@@ -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
index e9a7f011a37cb78af751b49f280f90e0bbebd8e7..90614ef6c54d1c76ba894e58a0c106ba5df8ee04 100644 (file)
@@ -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 (file)
index 0000000..9b14b4c
--- /dev/null
@@ -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
index 72a36a6e24c0db9b5c0098c6f7ce87c08fe84987..38c1ef1bb005dfa60209cf7c07f75c74dcdb36eb 100644 (file)
@@ -1,3 +1,9 @@
+2004-08-29  Helge Hess  <helge.hess@opengroupware.org>
+       
+       * 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  <helge@dogbert.in.skyrix.com>
 
        * GNUmakefile*: renamed bundle to PostgreSQL, now installs in
index b70c0eb1bb13cf97a3efdfd9c752d7aa14212ab1..ccc83eeff86bdadbd0cf375f660366271eb0a552 100644 (file)
@@ -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
index e9a7f011a37cb78af751b49f280f90e0bbebd8e7..90614ef6c54d1c76ba894e58a0c106ba5df8ee04 100644 (file)
@@ -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 (file)
index 0000000..1321dd9
--- /dev/null
@@ -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