tdf#115569 don't sign or validate text in tables
[LibreOffice.git] / instsetoo_native / CustomTarget_install.mk
blob016fbbd03abdc023ae3ef188e3e26753680c1491
1 # -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
3 # This file is part of the LibreOffice project.
5 # This Source Code Form is subject to the terms of the Mozilla Public
6 # License, v. 2.0. If a copy of the MPL was not distributed with this
7 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 instsetoo_ULFLIST := ActionTe \
11 Control \
12 CustomAc \
13 Error \
14 LaunchCo \
15 Property \
16 RadioBut \
17 UIText
19 $(eval $(call gb_CustomTarget_CustomTarget,instsetoo_native/install))
21 $(eval $(call gb_CustomTarget_register_targets,instsetoo_native/install,\
22 install.phony \
23 $(if $(filter-out WNT,$(OS)),\
24 bin/find-requires-gnome.sh \
25 bin/find-requires-x11.sh) \
26 $(foreach ulf,$(instsetoo_ULFLIST),win_ulffiles/$(ulf).ulf) \
29 $(call gb_CustomTarget_get_workdir,instsetoo_native/install)/install.phony: \
30 $(SRCDIR)/solenv/bin/make_installer.pl \
31 $(foreach ulf,$(instsetoo_ULFLIST),$(call gb_CustomTarget_get_workdir,instsetoo_native/install)/win_ulffiles/$(ulf).ulf) \
32 $(if $(filter-out WNT,$(OS)),\
33 $(addprefix $(call gb_CustomTarget_get_workdir,instsetoo_native/install)/,\
34 bin/find-requires-gnome.sh \
35 bin/find-requires-x11.sh) \
36 ) \
37 $(call gb_Postprocess_get_target,AllModulesButInstsetNative)
39 $(call gb_CustomTarget_get_workdir,instsetoo_native/install)/bin/find-requires-%.sh: $(SRCDIR)/instsetoo_native/inc_openoffice/unix/find-requires-%.sh
40 cat $< | tr -d "\015" > $@
41 chmod a+x $@
43 $(call gb_CustomTarget_get_workdir,instsetoo_native/install)/win_ulffiles/%.ulf: \
44 | $(call gb_Postprocess_get_target,AllModulesButInstsetNative)
46 $(eval $(call gb_CustomTarget_ulfex_rule,\
47 $(call gb_CustomTarget_get_workdir,instsetoo_native/install)/win_ulffiles/%.ulf,\
48 $(SRCDIR)/instsetoo_native/inc_openoffice/windows/msi_languages/%.ulf,\
49 $(foreach lang,$(gb_TRANS_LANGS),\
50 $(gb_POLOCATION)/$(lang)/instsetoo_native/inc_openoffice/windows/msi_languages.po)))
52 export ENABLE_DOWNLOADSETS ?= TRUE
53 ifeq ($(OS),LINUX)
54 export DONT_REMOVE_PACKAGE := TRUE
55 endif
56 export instsetoo_OUT := $(WORKDIR)/installation
57 export LOCAL_OUT := $(instsetoo_OUT)
58 export LOCAL_COMMON_OUT := $(instsetoo_OUT)
60 instsetoo_native_WITH_LANG := en-US $(filter-out en-US,$(gb_WITH_LANG))
62 PRODUCTNAME_no_spaces := $(subst $(WHITESPACE),,$(PRODUCTNAME))
64 ifeq (WNT,$(OS))
65 define instsetoo_native_msitemplates
67 TEMPLATE_DIR=$(dir $@)msi_templates \
68 && rm -rf $${TEMPLATE_DIR} \
69 && mkdir -p $${TEMPLATE_DIR}/Binary \
70 && for I in $(SRCDIR)/instsetoo_native/inc_$(1)/windows/msi_templates/*.* ; do $(GREP) -v '^#' "$$I" > $${TEMPLATE_DIR}/`basename $$I` || true ; done \
71 && $(GNUCOPY) $(SRCDIR)/instsetoo_native/inc_common/windows/msi_templates/Binary/*.* $${TEMPLATE_DIR}/Binary
72 endef
73 else
74 instsetoo_native_msitemplates :=
75 endif
77 define instsetoo_native_install_command
78 $(call instsetoo_native_msitemplates,$(1))
79 $(call gb_Helper_print_on_error, \
80 cd $(dir $@) \
81 $(foreach pkgformat,$(5),\
82 && $(if $(filter-out archive,$(pkgformat)),ENABLE_STRIP=1) $(PERL) -w $< \
83 -f $(BUILDDIR)/instsetoo_native/util/openoffice.lst \
84 -l $(subst $(WHITESPACE),$(COMMA),$(strip $(2))) \
85 -p $(PRODUCTNAME_no_spaces)$(3) \
86 -u $(instsetoo_OUT) \
87 -buildid $(if $(filter deb0 rpm0,$(pkgformat)$(LIBO_VERSION_PATCH)),1,$(LIBO_VERSION_PATCH)) \
88 $(if $(filter WNT,$(OS)), \
89 -msitemplate $(dir $@)msi_templates \
90 -msilanguage $(dir $@)win_ulffiles \
91 ) \
92 $(4) \
93 -format $(pkgformat) \
94 $(if $(verbose),-verbose,-quiet) \
95 ),$@.log)
96 endef
98 $(call gb_CustomTarget_get_workdir,instsetoo_native/install)/install.phony:
99 $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),PRL,2)
100 rm -rf $(instsetoo_OUT)
101 ifeq (TRUE,$(LIBO_TEST_INSTALL))
102 $(call instsetoo_native_install_command,openoffice,en-US,,,archive)
103 unzip -q -d $(TESTINSTALLDIR) $(instsetoo_OUT)/$(PRODUCTNAME_no_spaces)/archive/install/en-US/LibreOffice*_archive.zip
104 mv $(TESTINSTALLDIR)/LibreOffice*_archive/LibreOffice*/* $(TESTINSTALLDIR)/
105 rmdir $(TESTINSTALLDIR)/LibreOffice*_archive/LibreOffice*
106 rmdir $(TESTINSTALLDIR)/LibreOffice*_archive
107 ifeq (ODK,$(filter ODK,$(BUILD_TYPE)))
108 $(call instsetoo_native_install_command,sdkoo,en-US,_SDK,,archive)
109 unzip -q -d $(TESTINSTALLDIR) $(instsetoo_OUT)/$(PRODUCTNAME_no_spaces)_SDK/archive/install/en-US/LibreOffice*_archive_sdk.zip
110 mv $(TESTINSTALLDIR)/LibreOffice*_archive_sdk/LibreOffice*_SDK/sdk \
111 $(TESTINSTALLDIR)/
112 rmdir $(TESTINSTALLDIR)/LibreOffice*_archive_sdk/LibreOffice*_SDK
113 rmdir $(TESTINSTALLDIR)/LibreOffice*_archive_sdk
114 endif
115 else # LIBO_TEST_INSTALL
116 $(call instsetoo_native_install_command,openoffice,$(if $(filter WNT,$(OS)),$(instsetoo_native_WITH_LANG),en-US),,,$(PKGFORMAT))
117 ifeq (ODK,$(filter ODK,$(BUILD_TYPE)))
118 $(call instsetoo_native_install_command,sdkoo,en-US,_SDK,,$(PKGFORMAT))
119 endif
120 ifeq (HELP,$(filter HELP,$(BUILD_TYPE))$(filter MACOSX,$(OS)))
121 $(foreach lang,$(gb_HELP_LANGS),\
122 $(call instsetoo_native_install_command,ooohelppack,$(lang),,-helppack,$(PKGFORMAT)))
123 endif
124 ifneq (WNT,$(OS))
125 $(foreach lang,$(instsetoo_native_WITH_LANG),\
126 $(call instsetoo_native_install_command,ooolangpack,$(lang),,-languagepack,$(PKGFORMAT)))
127 endif
128 endif # LIBO_TEST_INSTALL
130 # vim: set noet sw=4 ts=4: