From: helge Date: Sun, 29 Aug 2004 19:43:36 +0000 (+0000) Subject: added FHS install hack X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7f8b255ea0038570bd4c81050ad2e2225754820c;p=sope added FHS install hack git-svn-id: http://svn.opengroupware.org/SOPE/trunk@81 e4a50df8-12e2-0310-a44c-efbce7f8a7e3 --- diff --git a/sope-core/EOControl/ChangeLog b/sope-core/EOControl/ChangeLog index 2193f9fa..e911485f 100644 --- a/sope-core/EOControl/ChangeLog +++ b/sope-core/EOControl/ChangeLog @@ -1,3 +1,10 @@ +2004-08-29 Helge Hess + + * 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) + (v4.3.48) + 2004-08-29 Marcus Mueller * EOControl.xcode: various fixes for project settings diff --git a/sope-core/EOControl/GNUmakefile b/sope-core/EOControl/GNUmakefile index 0fd72a3f..b4d9c099 100644 --- a/sope-core/EOControl/GNUmakefile +++ b/sope-core/EOControl/GNUmakefile @@ -1,4 +1,4 @@ -# $Id$ +# $Id: GNUmakefile 4 2004-08-20 17:04:31Z helge $ include ../common.make @@ -60,3 +60,4 @@ libEOControl_OBJC_FILES = \ -include GNUmakefile.preamble include $(GNUSTEP_MAKEFILES)/library.make -include GNUmakefile.postamble +-include fhs.make diff --git a/sope-core/EOControl/GNUmakefile.preamble b/sope-core/EOControl/GNUmakefile.preamble index b9697167..54a39901 100644 --- a/sope-core/EOControl/GNUmakefile.preamble +++ b/sope-core/EOControl/GNUmakefile.preamble @@ -1,9 +1,11 @@ -# $Id$ +# $Id: GNUmakefile.preamble 4 2004-08-20 17:04:31Z helge $ libEOControl_INCLUDE_DIRS += -I.. ADDITIONAL_CPPFLAGS += -Wall +ADDITIONAL_LIB_DIRS += -L/usr/local/lib -L/usr/lib + # libFoundation, gstep-base ifeq ($(FOUNDATION_LIB),fd) diff --git a/sope-core/EOControl/Version b/sope-core/EOControl/Version index f060cc71..4c2aac96 100644 --- a/sope-core/EOControl/Version +++ b/sope-core/EOControl/Version @@ -1,3 +1,3 @@ -# $Id$ +# $Id: Version 4 2004-08-20 17:04:31Z helge $ -SUBMINOR_VERSION:=47 +SUBMINOR_VERSION:=48 diff --git a/sope-core/EOControl/fhs.make b/sope-core/EOControl/fhs.make new file mode 100644 index 00000000..a9b01e40 --- /dev/null +++ b/sope-core/EOControl/fhs.make @@ -0,0 +1,30 @@ +# 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/ + +fhs-header-dirs :: + $(MKDIRS) $(FHS_INCLUDE_DIR)$(libEOControl_HEADER_FILES_INSTALL_DIR) + +move-headers-to-fhs :: fhs-header-dirs + @echo "moving headers to $(FHS_INCLUDE_DIR) .." + mv $(GNUSTEP_HEADERS)$(libEOControl_HEADER_FILES_INSTALL_DIR)/*.h \ + $(FHS_INCLUDE_DIR)$(libEOControl_HEADER_FILES_INSTALL_DIR)/ + +NONFHS_LIBDIR="$(GNUSTEP_LIBRARIES)/$(GNUSTEP_TARGET_LDIR)/" +NONFHS_LIBNAME="$(LIBRARY_NAME)$(LIBRARY_NAME_SUFFIX)$(SHARED_LIBEXT)" + +move-libs-to-fhs :: + @echo "moving libs to $(FHS_LIB_DIR) .." + mv $(NONFHS_LIBDIR)/$(NONFHS_LIBNAME)* $(FHS_LIB_DIR)/ + +move-to-fhs :: move-headers-to-fhs move-libs-to-fhs + +after-install :: move-to-fhs + +endif diff --git a/sope-core/NGExtensions/ChangeLog b/sope-core/NGExtensions/ChangeLog index 13f496fb..58b25049 100644 --- a/sope-core/NGExtensions/ChangeLog +++ b/sope-core/NGExtensions/ChangeLog @@ -1,3 +1,14 @@ +2004-08-29 Helge Hess + + * v4.3.109 + + * NGBundleManager.m: look for bundles in GNUSTEP_PATHPREFIX_LIST and + GNUSTEP_PATHLIST + + * 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-29 Marcus Mueller * NGExtensions.xcode: various fixes for project settings diff --git a/sope-core/NGExtensions/GNUmakefile b/sope-core/NGExtensions/GNUmakefile index beb6bb54..b2075d9c 100644 --- a/sope-core/NGExtensions/GNUmakefile +++ b/sope-core/NGExtensions/GNUmakefile @@ -1,7 +1,7 @@ # # GNUmakefile # -# $Id$ +# $Id: GNUmakefile 4 2004-08-20 17:04:31Z helge $ include ../common.make @@ -129,6 +129,4 @@ ADDITIONAL_INCLUDE_DIRS += \ -include GNUmakefile.preamble include $(GNUSTEP_MAKEFILES)/library.make -include GNUmakefile.postamble - -autodoc : - autodoc $(AUTODOC_FLAGS) -dest ../Documentation/NGExtensions/ -proj . +-include fhs.make diff --git a/sope-core/NGExtensions/NGBundleManager.m b/sope-core/NGExtensions/NGBundleManager.m index 7abeb2f2..c2ab346f 100644 --- a/sope-core/NGExtensions/NGBundleManager.m +++ b/sope-core/NGExtensions/NGBundleManager.m @@ -18,7 +18,7 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -// $Id$ +// $Id: NGBundleManager.m 4 2004-08-20 17:04:31Z helge $ #include "NGBundleManager.h" #include "common.h" @@ -307,9 +307,9 @@ static BOOL debugOn = NO; paths = [[pi environment] objectForKey:@"NGBundlePath"]; if (paths) { #if defined(__MINGW32__) - paths = [paths componentsSeparatedByString:@";"]; + paths = [paths componentsSeparatedByString:@";"]; #else - paths = [paths componentsSeparatedByString:@":"]; + paths = [paths componentsSeparatedByString:@":"]; #endif } if (paths) [self->bundleSearchPaths addObjectsFromArray:paths]; @@ -321,25 +321,24 @@ static BOOL debugOn = NO; // TODO: whats that supposed to do? // TODO: replace with proper path locator function! NSDictionary *env; - NSString *p; - + NSString *p; + unsigned i, count; + id tmp; + env = [[NSProcessInfo processInfo] environment]; - p = [[[env objectForKey:@"GNUSTEP_USER_ROOT"] - stringByAppendingPathComponent:@"Library"] - stringByAppendingPathComponent:@"Bundles"]; - if (p) [self->bundleSearchPaths addObject:p]; - p = [[[env objectForKey:@"GNUSTEP_LOCAL_ROOT"] - stringByAppendingPathComponent:@"Library"] - stringByAppendingPathComponent:@"Bundles"]; - if (p) [self->bundleSearchPaths addObject:p]; - p = [[[env objectForKey:@"GNUSTEP_NETWORK_ROOT"] - stringByAppendingPathComponent:@"Library"] - stringByAppendingPathComponent:@"Bundles"]; - if (p) [self->bundleSearchPaths addObject:p]; - p = [[[env objectForKey:@"GNUSTEP_SYSTEM_ROOT"] - stringByAppendingPathComponent:@"Library"] - stringByAppendingPathComponent:@"Bundles"]; - if (p) [self->bundleSearchPaths addObject:p]; + + if ((tmp = [env objectForKey:@"GNUSTEP_PATHPREFIX_LIST"]) == nil) + tmp = [env objectForKey:@"GNUSTEP_PATHLIST"]; + tmp = [tmp componentsSeparatedByString:@":"]; + + for (i = 0; i < count; i++) { + p = [tmp objectAtIndex:i]; + p = [p stringByAppendingPathComponent:@"Library"]; + p = [p stringByAppendingPathComponent:@"Bundles"]; + if ([self->bundleSearchPaths containsObject:p]) continue; + + [self->bundleSearchPaths addObject:p]; + } #endif } diff --git a/sope-core/NGExtensions/Version b/sope-core/NGExtensions/Version index 78cd4928..0ce3d16d 100644 --- a/sope-core/NGExtensions/Version +++ b/sope-core/NGExtensions/Version @@ -1,5 +1,5 @@ # $Id$ -SUBMINOR_VERSION:=108 +SUBMINOR_VERSION:=109 # v4.2.72 requires libEOControl v4.2.39 diff --git a/sope-core/NGExtensions/fhs.make b/sope-core/NGExtensions/fhs.make new file mode 100644 index 00000000..e9d3ea5e --- /dev/null +++ b/sope-core/NGExtensions/fhs.make @@ -0,0 +1,30 @@ +# 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/ + +fhs-header-dirs :: + $(MKDIRS) $(FHS_INCLUDE_DIR)$(libNGExtensions_HEADER_FILES_INSTALL_DIR) + +move-headers-to-fhs :: fhs-header-dirs + @echo "moving headers to $(FHS_INCLUDE_DIR) .." + mv $(GNUSTEP_HEADERS)$(libNGExtensions_HEADER_FILES_INSTALL_DIR)/*.h \ + $(FHS_INCLUDE_DIR)$(libNGExtensions_HEADER_FILES_INSTALL_DIR)/ + +NONFHS_LIBDIR="$(GNUSTEP_LIBRARIES)/$(GNUSTEP_TARGET_LDIR)/" +NONFHS_LIBNAME="$(LIBRARY_NAME)$(LIBRARY_NAME_SUFFIX)$(SHARED_LIBEXT)" + +move-libs-to-fhs :: + @echo "moving libs to $(FHS_LIB_DIR) .." + mv $(NONFHS_LIBDIR)/$(NONFHS_LIBNAME)* $(FHS_LIB_DIR)/ + +move-to-fhs :: move-headers-to-fhs move-libs-to-fhs + +after-install :: move-to-fhs + +endif diff --git a/sope-core/NGStreams/ChangeLog b/sope-core/NGStreams/ChangeLog index 612ac1e0..967e4f3b 100644 --- a/sope-core/NGStreams/ChangeLog +++ b/sope-core/NGStreams/ChangeLog @@ -1,3 +1,10 @@ +2004-08-29 Helge Hess + + * 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) + (v4.3.44) + 2004-08-29 Marcus Mueller * NGStreams.xcode: various fixes for project settings diff --git a/sope-core/NGStreams/GNUmakefile b/sope-core/NGStreams/GNUmakefile index 372fba42..44526454 100644 --- a/sope-core/NGStreams/GNUmakefile +++ b/sope-core/NGStreams/GNUmakefile @@ -1,7 +1,7 @@ # # GNUmakefile # -# $Id$ +# $Id: GNUmakefile 4 2004-08-20 17:04:31Z helge $ include ../common.make include ./Version @@ -94,3 +94,4 @@ libNGStreams_OBJC_FILES = \ -include GNUmakefile.preamble include $(GNUSTEP_MAKEFILES)/library.make -include GNUmakefile.postamble +-include fhs.make diff --git a/sope-core/NGStreams/Version b/sope-core/NGStreams/Version index a75e77c7..492dc7cb 100644 --- a/sope-core/NGStreams/Version +++ b/sope-core/NGStreams/Version @@ -1,3 +1,3 @@ # $Id: Version 4 2004-08-20 17:04:31Z helge $ -SUBMINOR_VERSION:=43 +SUBMINOR_VERSION:=44 diff --git a/sope-core/NGStreams/fhs.make b/sope-core/NGStreams/fhs.make new file mode 100644 index 00000000..1b5e8e02 --- /dev/null +++ b/sope-core/NGStreams/fhs.make @@ -0,0 +1,30 @@ +# 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/ + +fhs-header-dirs :: + $(MKDIRS) $(FHS_INCLUDE_DIR)$(libNGStreams_HEADER_FILES_INSTALL_DIR) + +move-headers-to-fhs :: fhs-header-dirs + @echo "moving headers to $(FHS_INCLUDE_DIR) .." + mv $(GNUSTEP_HEADERS)$(libNGStreams_HEADER_FILES_INSTALL_DIR)/*.h \ + $(FHS_INCLUDE_DIR)$(libNGStreams_HEADER_FILES_INSTALL_DIR)/ + +NONFHS_LIBDIR="$(GNUSTEP_LIBRARIES)/$(GNUSTEP_TARGET_LDIR)/" +NONFHS_LIBNAME="$(LIBRARY_NAME)$(LIBRARY_NAME_SUFFIX)$(SHARED_LIBEXT)" + +move-libs-to-fhs :: + @echo "moving libs to $(FHS_LIB_DIR) .." + mv $(NONFHS_LIBDIR)/$(NONFHS_LIBNAME)* $(FHS_LIB_DIR)/ + +move-to-fhs :: move-headers-to-fhs move-libs-to-fhs + +after-install :: move-to-fhs + +endif diff --git a/sope-core/samples/ChangeLog b/sope-core/samples/ChangeLog index 64c5448c..d15a54cd 100644 --- a/sope-core/samples/ChangeLog +++ b/sope-core/samples/ChangeLog @@ -1,3 +1,11 @@ +2004-08-29 Helge Hess + + * moved test_qpdecode to NGMime/samples + + * added hack to install the tools in FHS locations - the executables + will be installed in FHS_INSTALL_ROOT if specified (eg make + FHS_INSTALL_ROOT=/usr/local) + 2004-08-20 Helge Hess * moved samples to sope-mime, sope-ldap, sope-ical diff --git a/sope-core/samples/GNUmakefile b/sope-core/samples/GNUmakefile index 5c93b9c7..03bab9a2 100644 --- a/sope-core/samples/GNUmakefile +++ b/sope-core/samples/GNUmakefile @@ -1,4 +1,4 @@ -# $Id$ +# $Id: GNUmakefile 9 2004-08-20 18:40:42Z helge $ include $(GNUSTEP_MAKEFILES)/common.make @@ -7,7 +7,6 @@ TOOL_NAME = \ fmdls \ testdirenum \ bmlookup \ - test_qpdecode \ eoqual \ testsock \ httpu_notify \ @@ -23,7 +22,6 @@ subclassing_OBJC_FILES = subclassing.m fmdls_OBJC_FILES = fmdls.m bmlookup_OBJC_FILES = bmlookup.m testdirenum_OBJC_FILES = testdirenum.m -test_qpdecode_OBJC_FILES = test_qpdecode.m eoqual_OBJC_FILES = eoqual.m EOQualTool.m testsock_OBJC_FILES = testsock.m parserule_OBJC_FILES = parserule.m @@ -33,3 +31,4 @@ testurl_OBJC_FILES = testurl.m -include GNUmakefile.preamble include $(GNUSTEP_MAKEFILES)/tool.make -include GNUmakefile.postamble +-include fhs.make diff --git a/sope-core/samples/GNUmakefile.preamble b/sope-core/samples/GNUmakefile.preamble index 49f4ae07..78d0a98a 100644 --- a/sope-core/samples/GNUmakefile.preamble +++ b/sope-core/samples/GNUmakefile.preamble @@ -1,4 +1,4 @@ -# $Id$ +# $Id: GNUmakefile.preamble 9 2004-08-20 18:40:42Z helge $ ADDITIONAL_INCLUDE_DIRS += \ -I.. \ @@ -9,6 +9,7 @@ ADDITIONAL_LIB_DIRS += \ -L../EOControl/$(GNUSTEP_OBJ_DIR) \ -L../NGExtensions/$(GNUSTEP_OBJ_DIR) \ -L../NGStreams/$(GNUSTEP_OBJ_DIR) \ + -L/usr/local/lib -L/usr/lib ADDITIONAL_TOOL_LIBS += \ -lNGStreams -lNGExtensions -lEOControl \ diff --git a/sope-core/samples/fhs.make b/sope-core/samples/fhs.make new file mode 100644 index 00000000..27c85d13 --- /dev/null +++ b/sope-core/samples/fhs.make @@ -0,0 +1,26 @@ +# 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/ + +fhs-bin-dirs :: + $(MKDIRS) $(FHS_BIN_DIR) + +NONFHS_BINDIR="$(GNUSTEP_TOOLS)/$(GNUSTEP_TARGET_LDIR)" + +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-tools-to-fhs + +after-install :: move-to-fhs + +endif diff --git a/sope-core/samples/test_qpdecode.m b/sope-core/samples/test_qpdecode.m deleted file mode 100644 index 3c8a431e..00000000 --- a/sope-core/samples/test_qpdecode.m +++ /dev/null @@ -1,87 +0,0 @@ -/* - Copyright (C) 2000-2003 SKYRIX Software AG - - This file is part of OGo - - OGo is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by the - Free Software Foundation; either version 2, or (at your option) any - later version. - - OGo is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public - License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with OGo; see the file COPYING. If not, write to the - Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. -*/ -// $Id$ - -/* - check whether the quoted printable MIME decoding works ... -*/ - -#include "common.h" - -static void test(void) { - static unsigned char *fields[] = { - "attachment; filename=\"Mappe langerp=?iso-8859-15?q?=FC=E4=F6=20Name=F6=F6=F6=201234456=2Exls?=\"", - "Umlaute: =?iso-8859-15?q?=FC=E4=F6?=", - "keine Umlaute: =?iso-8859-15?q?keine Umlaute?=", - "=?iso-8859-15?q?keine Umlaute?=", - "=?iso-8859-15?q?=FC=E4=F6?=", - "", - "hello world !", - "??doit??", - NULL - }; - unsigned char *field; - int i; - - for (i = 0; (field = fields[i]); i++) { - NSData *fieldData; - id result; - - NSLog(@"decoding field: '%s'", field); - fieldData = [NSData dataWithBytes:field length:strlen(field)]; - NSLog(@" length: %i", [fieldData length]); - - result = [fieldData decodeQuotedPrintableValueOfMIMEHeaderField: - @"content-disposition"]; - - if (result == nil) { - NSLog(@" got no result for field data %@ !!!", fieldData); - } - else if ([result isKindOfClass:[NSData class]]) { - NSLog(@" got a data, length %i: %@", [result length], result); - } - else if ([result isKindOfClass:[NSString class]]) { - NSLog(@" got a string, length %i: '%@'", [result length], result); - } - else { - NSLog(@" got an unexpected object, class %@: %@", - NSStringFromClass([result class]), result); - } - } -} - -int main(int argc, char **argv, char **env) { - NSAutoreleasePool *pool; - - pool = [NSAutoreleasePool new]; - -#if LIB_FOUNDATION_LIBRARY - [NSProcessInfo initializeWithArguments:argv count:argc environment:env]; -#endif - - test(); - - [pool release]; - exit(0); - /* static linking */ - [NGExtensions class]; - return 0; -}