]> err.no Git - sope/commitdiff
added FHS hack, fixed some minor issues
authorhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Sun, 29 Aug 2004 19:53:50 +0000 (19:53 +0000)
committerhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Sun, 29 Aug 2004 19:53:50 +0000 (19:53 +0000)
git-svn-id: http://svn.opengroupware.org/SOPE/trunk@82 e4a50df8-12e2-0310-a44c-efbce7f8a7e3

sope-mime/ChangeLog [new file with mode: 0644]
sope-mime/GNUmakefile
sope-mime/Version
sope-mime/fhs.make [new file with mode: 0644]
sope-mime/samples/ChangeLog
sope-mime/samples/GNUmakefile
sope-mime/samples/GNUmakefile.preamble
sope-mime/samples/ImapQuotaTool.h
sope-mime/samples/fhs.make [new file with mode: 0644]
sope-mime/samples/imapquota.m
sope-mime/samples/test_qpdecode.m [new file with mode: 0644]

diff --git a/sope-mime/ChangeLog b/sope-mime/ChangeLog
new file mode 100644 (file)
index 0000000..0b361be
--- /dev/null
@@ -0,0 +1,8 @@
+2004-08-29  Helge Hess  <helge.hess@opengroupware.org>
+
+       * 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.175)
+
+       * added ChangeLog for libNGMime
index f578b42966eade298efbc3f193eec27dfacb1ed5..4162252e69a9a0a1c30c02e37bfb1625a1e573de 100644 (file)
@@ -1,4 +1,4 @@
-# $Id$
+# $Id: GNUmakefile 32 2004-08-21 00:50:30Z helge $
 
 include $(GNUSTEP_MAKEFILES)/common.make
 include ./Version
@@ -20,3 +20,4 @@ ADDITIONAL_CPPFLAGS += -DLIBRARY_MAJOR_VERSION=${MAJOR_VERSION} \
 -include GNUmakefile.preamble
 include $(GNUSTEP_MAKEFILES)/library.make
 -include GNUmakefile.postamble
+-include fhs.make
index 6f3c7970af16742b6000bb8f1854ef71d2563a74..769d66b9b2213b719480dfb01dc367d4bf0de485 100644 (file)
@@ -2,6 +2,6 @@
 
 MAJOR_VERSION=4
 MINOR_VERSION=3
-SUBMINOR_VERSION:=174
+SUBMINOR_VERSION:=175
 
 # v4.2.149 requires libNGStreams v4.2.34
diff --git a/sope-mime/fhs.make b/sope-mime/fhs.make
new file mode 100644 (file)
index 0000000..0ec04f3
--- /dev/null
@@ -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)$(libNGMime_HEADER_FILES_INSTALL_DIR)
+
+move-headers-to-fhs :: fhs-header-dirs
+       @echo "moving headers to $(FHS_INCLUDE_DIR) .."
+       mv $(GNUSTEP_HEADERS)$(libNGMime_HEADER_FILES_INSTALL_DIR)/*.h \
+         $(FHS_INCLUDE_DIR)$(libNGMime_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
index e48ddf021efe39b0f12bd75394e9d6bc7954dbe6..e3025527228f7694898809686300418013a49ab2 100644 (file)
@@ -1,3 +1,13 @@
+2004-08-29  Helge Hess  <helge.hess@opengroupware.org>
+
+       * 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)
+       
+       * imapquota.m: fixed a warning
+
+       * fixed makefile for new SOPE 4.3 setup
+
 2004-08-20  Helge Hess  <helge.hess@opengroupware.org>
 
        * moved in NGMime samples from sope-core
index d0af1267259884dfe5186378d4efe3e5722541e6..76d510cd6558a9e39d3ac007fac895a3fb8bd4b1 100644 (file)
@@ -1,63 +1,20 @@
-# $Id$
+# $Id: GNUmakefile 9 2004-08-20 18:40:42Z helge $
 
 include $(GNUSTEP_MAKEFILES)/common.make
 
 TOOL_NAME = \
        mime2xml        \
        imapls          \
-       encoding        \
-       fmdls           \
-       testdirenum     \
-       bmlookup        \
        test_qpdecode   \
-       eoqual          \
-       ldapls          \
-       ldap2dsml       \
-       ldapchkpwd      \
        imapquota       \
-       testsock        \
-       httpu_notify    \
-       ical2           \
-       ical3           \
-       parserule       \
-       testurl         \
-
-ifneq ($(OBJC_RUNTIME_LIB),apple)
-TOOL_NAME += subclassing
-endif
 
 imapquota_OBJC_FILES       = ImapQuotaTool.m ImapTool.m imapquota.m
 imapget_OBJC_FILES       = ImapTool.m imapget.m
 mime2xml_OBJC_FILES      = Mime2XmlTool.m mime2xml.m
 imapls_OBJC_FILES        = ImapTool.m ImapListTool.m imapls.m
-encoding_OBJC_FILES      = EncodingTool.m encoding.m
-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
-ldapls_OBJC_FILES       = ldapls.m
-ldap2dsml_OBJC_FILES    = ldap2dsml.m
-ldapchkpwd_OBJC_FILES   = ldapchkpwd.m
-testsock_OBJC_FILES      = testsock.m
-parserule_OBJC_FILES     = parserule.m
-httpu_notify_OBJC_FILES  = httpu_notify.m
-testurl_OBJC_FILES       = testurl.m
-
-ical2_OBJC_FILES        = ical2.m
-ical3_OBJC_FILES        = ical3.m
-
-#TOOL_NAME = #pwd-check
-#pwd-check_OBJC_FILES = pwd-check.m
-
-ldapls_TOOL_LIBS     += -lNGLdap
-ldap2dsml_TOOL_LIBS  += -lNGLdap
-ldapchkpwd_TOOL_LIBS += -lNGLdap
-
-ical2_TOOL_LIBS += -lNGiCal -lSaxObjC
-ical3_TOOL_LIBS += -lNGiCal -lSaxObjC
 
 -include GNUmakefile.preamble
 include $(GNUSTEP_MAKEFILES)/tool.make
 -include GNUmakefile.postamble
+-include fhs.make
index 7bf8471901695ae9959ab1fe8ae4a9e7e6edcf2a..f7215e852c98e47f9516a6204e468c0596531fba 100644 (file)
@@ -1,4 +1,4 @@
-# $Id$
+# $Id: GNUmakefile.preamble 9 2004-08-20 18:40:42Z helge $
 
 ADDITIONAL_INCLUDE_DIRS += \
        -I..                    \
@@ -13,6 +13,7 @@ ADDITIONAL_LIB_DIRS += \
        -L../NGMime/$(GNUSTEP_OBJ_DIR)       \
        -L../NGLdap/$(GNUSTEP_OBJ_DIR)       \
        -L../NGiCal/$(GNUSTEP_OBJ_DIR)       \
+       -L/usr/local/lib -L/usr/lib
 
 
 ADDITIONAL_TOOL_LIBS += \
index 821eae49e2487a1daaf2fc0217fde5b755516d94..7695c6589903b8dab3fb34bfbbbce7fa7ca5177d 100644 (file)
@@ -1,7 +1,7 @@
 /*
-  Copyright (C) 2000-2003 SKYRIX Software AG
+  Copyright (C) 2000-2004 SKYRIX Software AG
 
-  This file is part of OGo
+  This file is part of OpenGroupware.org.
 
   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
@@ -18,7 +18,6 @@
   Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
   02111-1307, USA.
 */
-// $Id: ImapQuotaTool.h 4 2004-08-20 17:04:31Z helge $
 
 
 #include "ImapTool.h"
diff --git a/sope-mime/samples/fhs.make b/sope-mime/samples/fhs.make
new file mode 100644 (file)
index 0000000..27c85d1
--- /dev/null
@@ -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
index 847bf5a0926d5aadfdd0581fc50c4801def517ea..c9abc64dd004456e932ae5631517ab1b58d48db2 100644 (file)
@@ -1,7 +1,7 @@
 /*
-  Copyright (C) 2000-2003 SKYRIX Software AG
+  Copyright (C) 2000-2004 SKYRIX Software AG
 
-  This file is part of OGo
+  This file is part of OpenGroupware.org.
 
   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, 59 Temple Place - Suite 330, Boston, MA
   02111-1307, USA.
 */
-// $Id: imapquota.m 4 2004-08-20 17:04:31Z helge $
 
 
-#import "ImapQuotaTool.h"
+#include "ImapQuotaTool.h"
 #include "common.h"
 
 int main(int argc, char **argv, char **env) {
   NSAutoreleasePool *pool;
-  ImapTool *tool;
+  ImapQuotaTool *tool;
   int res = 0;
   
   pool = [NSAutoreleasePool new];
diff --git a/sope-mime/samples/test_qpdecode.m b/sope-mime/samples/test_qpdecode.m
new file mode 100644 (file)
index 0000000..3040d2a
--- /dev/null
@@ -0,0 +1,87 @@
+/*
+  Copyright (C) 2000-2004 SKYRIX Software AG
+
+  This file is part of OpenGroupware.org.
+
+  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.
+*/
+
+/*
+  check whether the quoted printable MIME decoding works ...
+*/
+
+#include <NGMail/NGMimeMessageParser.h>
+#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;
+}