From 762f9455f22682da25079edc3cb1f576207afcec Mon Sep 17 00:00:00 2001 From: helge Date: Sat, 12 Feb 2005 16:07:23 +0000 Subject: [PATCH] added FHS install support to bundles git-svn-id: http://svn.opengroupware.org/SOGo/trunk@546 d1b88da0-ebda-0310-925b-ed51d893ca5b --- SOGo/SoObjects/Appointments/GNUmakefile | 1 + SOGo/SoObjects/Contacts/GNUmakefile | 3 +- SOGo/SoObjects/Mailer/GNUmakefile | 1 + SOGo/SoObjects/SOGo/GNUmakefile | 2 +- SOGo/SoObjects/Sieve/GNUmakefile | 1 + SOGo/UI/Anais/GNUmakefile | 3 +- SOGo/UI/Common/GNUmakefile | 1 + SOGo/UI/Contacts/GNUmakefile | 7 +-- SOGo/UI/Contacts/GNUmakefile.preamble | 3 ++ SOGo/UI/Mailer/GNUmakefile | 1 + SOGo/UI/SOGoUI/GNUmakefile | 2 +- SOGo/UI/Scheduler/GNUmakefile | 7 +-- SOGo/UI/Scheduler/GNUmakefile.preamble | 3 ++ SOGo/fhsbundle.make | 6 +-- SOGo/fhslib.make | 61 +++++++++++++++++++++++++ 15 files changed, 85 insertions(+), 17 deletions(-) create mode 100644 SOGo/fhslib.make diff --git a/SOGo/SoObjects/Appointments/GNUmakefile b/SOGo/SoObjects/Appointments/GNUmakefile index feac2367..5ff6acc3 100644 --- a/SOGo/SoObjects/Appointments/GNUmakefile +++ b/SOGo/SoObjects/Appointments/GNUmakefile @@ -20,3 +20,4 @@ Appointments_RESOURCE_FILES += \ -include GNUmakefile.preamble include $(GNUSTEP_MAKEFILES)/bundle.make -include GNUmakefile.postamble +include ../../fhsbundle.make diff --git a/SOGo/SoObjects/Contacts/GNUmakefile b/SOGo/SoObjects/Contacts/GNUmakefile index e737ed7e..a88e5c37 100644 --- a/SOGo/SoObjects/Contacts/GNUmakefile +++ b/SOGo/SoObjects/Contacts/GNUmakefile @@ -1,4 +1,4 @@ -# $Id$ +# GNUstep makefile include ../common.make @@ -19,3 +19,4 @@ Contacts_RESOURCE_FILES += \ -include GNUmakefile.preamble include $(GNUSTEP_MAKEFILES)/bundle.make -include GNUmakefile.postamble +include ../../fhsbundle.make diff --git a/SOGo/SoObjects/Mailer/GNUmakefile b/SOGo/SoObjects/Mailer/GNUmakefile index 1e6ae666..31da6471 100644 --- a/SOGo/SoObjects/Mailer/GNUmakefile +++ b/SOGo/SoObjects/Mailer/GNUmakefile @@ -32,3 +32,4 @@ Mailer_RESOURCE_FILES += \ -include GNUmakefile.preamble include $(GNUSTEP_MAKEFILES)/bundle.make -include GNUmakefile.postamble +include ../../fhsbundle.make diff --git a/SOGo/SoObjects/SOGo/GNUmakefile b/SOGo/SoObjects/SOGo/GNUmakefile index a1db9856..29a0cb5c 100644 --- a/SOGo/SoObjects/SOGo/GNUmakefile +++ b/SOGo/SoObjects/SOGo/GNUmakefile @@ -1,4 +1,4 @@ -# $Id$ +# GNUstep makefile include $(GNUSTEP_MAKEFILES)/common.make -include ../../Version diff --git a/SOGo/SoObjects/Sieve/GNUmakefile b/SOGo/SoObjects/Sieve/GNUmakefile index 9921fefd..ea2446e4 100644 --- a/SOGo/SoObjects/Sieve/GNUmakefile +++ b/SOGo/SoObjects/Sieve/GNUmakefile @@ -19,3 +19,4 @@ Sieve_RESOURCE_FILES += \ -include GNUmakefile.preamble include $(GNUSTEP_MAKEFILES)/bundle.make -include GNUmakefile.postamble +include ../../fhsbundle.make diff --git a/SOGo/UI/Anais/GNUmakefile b/SOGo/UI/Anais/GNUmakefile index 1fd42372..e507f8ca 100644 --- a/SOGo/UI/Anais/GNUmakefile +++ b/SOGo/UI/Anais/GNUmakefile @@ -1,4 +1,4 @@ -# $Id: GNUmakefile,v 1.2 2003/12/09 17:38:42 helge Exp $ +# GNUstep makefile include ../common.make @@ -29,3 +29,4 @@ AnaisUI_LOCALIZED_RESOURCE_FILES += \ -include GNUmakefile.preamble include $(GNUSTEP_MAKEFILES)/bundle.make -include GNUmakefile.postamble +include ../../fhsbundle.make diff --git a/SOGo/UI/Common/GNUmakefile b/SOGo/UI/Common/GNUmakefile index bee0fdb0..20439a67 100644 --- a/SOGo/UI/Common/GNUmakefile +++ b/SOGo/UI/Common/GNUmakefile @@ -62,3 +62,4 @@ CommonUI_LOCALIZED_RESOURCE_FILES += \ -include GNUmakefile.preamble include $(GNUSTEP_MAKEFILES)/bundle.make -include GNUmakefile.postamble +include ../../fhsbundle.make diff --git a/SOGo/UI/Contacts/GNUmakefile b/SOGo/UI/Contacts/GNUmakefile index 9a2ca9a2..df779a55 100644 --- a/SOGo/UI/Contacts/GNUmakefile +++ b/SOGo/UI/Contacts/GNUmakefile @@ -1,4 +1,4 @@ -# $Id$ +# GNUstep makefile include ../common.make @@ -31,12 +31,9 @@ ContactsUI_RESOURCE_FILES += \ ContactsUI_LOCALIZED_RESOURCE_FILES += \ default.strings \ -ADDITIONAL_INCLUDE_DIRS += \ - -I.. -I../.. -I../../.. - - # make -include GNUmakefile.preamble include $(GNUSTEP_MAKEFILES)/bundle.make -include GNUmakefile.postamble +include ../../fhsbundle.make diff --git a/SOGo/UI/Contacts/GNUmakefile.preamble b/SOGo/UI/Contacts/GNUmakefile.preamble index a8e09ec0..ca886a67 100644 --- a/SOGo/UI/Contacts/GNUmakefile.preamble +++ b/SOGo/UI/Contacts/GNUmakefile.preamble @@ -1 +1,4 @@ # compile flags + +ADDITIONAL_INCLUDE_DIRS += \ + -I.. -I../.. -I../../.. diff --git a/SOGo/UI/Mailer/GNUmakefile b/SOGo/UI/Mailer/GNUmakefile index 243cdd1d..abe80885 100644 --- a/SOGo/UI/Mailer/GNUmakefile +++ b/SOGo/UI/Mailer/GNUmakefile @@ -105,3 +105,4 @@ MailerUI_LOCALIZED_RESOURCE_FILES += \ -include GNUmakefile.preamble include $(GNUSTEP_MAKEFILES)/bundle.make -include GNUmakefile.postamble +include ../../fhsbundle.make diff --git a/SOGo/UI/SOGoUI/GNUmakefile b/SOGo/UI/SOGoUI/GNUmakefile index 0f1a66a7..bf26801f 100644 --- a/SOGo/UI/SOGoUI/GNUmakefile +++ b/SOGo/UI/SOGoUI/GNUmakefile @@ -1,4 +1,4 @@ -# $Id$ +# GNUstep makefile include $(GNUSTEP_MAKEFILES)/common.make diff --git a/SOGo/UI/Scheduler/GNUmakefile b/SOGo/UI/Scheduler/GNUmakefile index f5db8afe..49065c1a 100644 --- a/SOGo/UI/Scheduler/GNUmakefile +++ b/SOGo/UI/Scheduler/GNUmakefile @@ -1,4 +1,4 @@ -# $Id$ +# GNUstep makefile include ../common.make @@ -111,12 +111,9 @@ SchedulerUI_RESOURCE_FILES += \ skycalendar.html \ skycalendar.js \ -ADDITIONAL_INCLUDE_DIRS += \ - -I.. -I../.. -I../../.. - - # make -include GNUmakefile.preamble include $(GNUSTEP_MAKEFILES)/bundle.make -include GNUmakefile.postamble +include ../../fhsbundle.make diff --git a/SOGo/UI/Scheduler/GNUmakefile.preamble b/SOGo/UI/Scheduler/GNUmakefile.preamble index 08b0584f..efc9130d 100644 --- a/SOGo/UI/Scheduler/GNUmakefile.preamble +++ b/SOGo/UI/Scheduler/GNUmakefile.preamble @@ -1 +1,4 @@ # compile settings + +ADDITIONAL_INCLUDE_DIRS += \ + -I.. -I../.. -I../../.. diff --git a/SOGo/fhsbundle.make b/SOGo/fhsbundle.make index 1c4fbdc2..7f3b547e 100644 --- a/SOGo/fhsbundle.make +++ b/SOGo/fhsbundle.make @@ -15,14 +15,14 @@ fhs-sogod-dirs :: $(MKDIRS) $(FHS_SOGOD_DIR) move-bundles-to-fhs :: fhs-sogod-dirs - @echo "moving bundles $(BUNDLE_INSTALL_DIR) to $(FHS_WEBUI_DIR) .." + @echo "moving bundles $(BUNDLE_INSTALL_DIR) to $(FHS_SOGOD_DIR) .." for i in $(BUNDLE_NAME); do \ - j="$(FHS_WEBUI_DIR)/$${i}$(BUNDLE_EXTENSION)"; \ + j="$(FHS_SOGOD_DIR)/$${i}$(BUNDLE_EXTENSION)"; \ if test -d $$j; then rm -r $$j; fi; \ (cd $(BUNDLE_INSTALL_DIR); \ $(TAR) chf - --exclude=CVS --exclude=.svn --to-stdout \ "$${i}$(BUNDLE_EXTENSION)") | \ - (cd $(FHS_WEBUI_DIR); $(TAR) xf -); \ + (cd $(FHS_SOGOD_DIR); $(TAR) xf -); \ rm -rf "$(BUNDLE_INSTALL_DIR)/$${i}$(BUNDLE_EXTENSION)";\ done diff --git a/SOGo/fhslib.make b/SOGo/fhslib.make new file mode 100644 index 00000000..42a60a34 --- /dev/null +++ b/SOGo/fhslib.make @@ -0,0 +1,61 @@ +# 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)" + +# headers + +ifneq ($(FHS_HEADER_DIRS),) + +move-headers-to-fhs :: + @echo "moving headers to $(FHS_INCLUDE_DIR) .." + for i in "$(FHS_HEADER_DIRS)"; do \ + $(MKDIRS) $(FHS_INCLUDE_DIR)/$$i; \ + mv $(GNUSTEP_HEADERS)/$$i/*.h $(FHS_INCLUDE_DIR)/$$i/; \ + done + +else + +move-headers-to-fhs :: + +endif + +move-libs-to-fhs :: + @echo "moving libs to $(FHS_LIB_DIR) .." + mv $(NONFHS_LIBDIR)/$(NONFHS_LIBNAME)* $(FHS_LIB_DIR)/ + +# tools + +ifneq ($(TOOL_NAME),) + +fhs-bin-dirs :: + $(MKDIRS) $(FHS_BIN_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 + +else + +move-tools-to-fhs :: + +endif + +# master + +move-to-fhs :: move-headers-to-fhs move-libs-to-fhs move-tools-to-fhs + +after-install :: move-to-fhs + +endif -- 2.39.5