nss: upgrade to release 3.73
[LibreOffice.git] / instsetoo_native / CustomTarget_install.mk
blobb9991d208dd4504e1592519c5d8004dc21be08ca
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 TRUE,$(WINDOWS_BUILD_SIGNING)),msi_signing.done) \
24 $(if $(filter-out WNT,$(OS)),\
25 bin/find-requires-gnome.sh \
26 bin/find-requires-x11.sh) \
27 $(foreach ulf,$(instsetoo_ULFLIST),win_ulffiles/$(ulf).ulf) \
30 .PHONY: $(call gb_CustomTarget_get_workdir,instsetoo_native/install)/install.phony
32 $(call gb_CustomTarget_get_workdir,instsetoo_native/install)/install.phony: \
33 $(SRCDIR)/solenv/bin/make_installer.pl \
34 $(foreach ulf,$(instsetoo_ULFLIST),$(call gb_CustomTarget_get_workdir,instsetoo_native/install)/win_ulffiles/$(ulf).ulf) \
35 $(if $(filter-out WNT,$(OS)),\
36 $(addprefix $(call gb_CustomTarget_get_workdir,instsetoo_native/install)/,\
37 bin/find-requires-gnome.sh \
38 bin/find-requires-x11.sh) \
39 ) \
40 $(call gb_Postprocess_get_target,AllModulesButInstsetNative)
42 $(call gb_CustomTarget_get_workdir,instsetoo_native/install)/bin/find-requires-%.sh: $(SRCDIR)/instsetoo_native/inc_openoffice/unix/find-requires-%.sh
43 cat $< | tr -d "\015" > $@
44 chmod a+x $@
46 $(call gb_CustomTarget_get_workdir,instsetoo_native/install)/win_ulffiles/%.ulf: \
47 | $(call gb_Postprocess_get_target,AllModulesButInstsetNative)
49 $(eval $(call gb_CustomTarget_ulfex_rule,\
50 $(call gb_CustomTarget_get_workdir,instsetoo_native/install)/win_ulffiles/%.ulf,\
51 $(SRCDIR)/instsetoo_native/inc_openoffice/windows/msi_languages/%.ulf,\
52 $(foreach lang,$(gb_TRANS_LANGS),\
53 $(gb_POLOCATION)/$(lang)/instsetoo_native/inc_openoffice/windows/msi_languages.po)))
55 export ENABLE_DOWNLOADSETS ?= TRUE
56 ifeq ($(OS),LINUX)
57 export DONT_REMOVE_PACKAGE := TRUE
58 endif
59 export instsetoo_OUT := $(WORKDIR)/installation
60 export LOCAL_OUT := $(instsetoo_OUT)
61 export LOCAL_COMMON_OUT := $(instsetoo_OUT)
63 instsetoo_native_WITH_LANG := en-US $(filter-out en-US,$(gb_WITH_LANG))
65 PRODUCTNAME_no_spaces := $(subst $(WHITESPACE),,$(PRODUCTNAME))
67 ifeq (WNT,$(OS))
68 define instsetoo_native_msitemplates
70 TEMPLATE_DIR=$(dir $@)msi_templates \
71 && rm -rf $${TEMPLATE_DIR} \
72 && mkdir -p $${TEMPLATE_DIR}/Binary \
73 && for I in $(SRCDIR)/instsetoo_native/inc_$(1)/windows/msi_templates/*.* ; do $(GREP) -v '^#' "$$I" > $${TEMPLATE_DIR}/`basename $$I` || true ; done \
74 && $(GNUCOPY) $(SRCDIR)/instsetoo_native/inc_common/windows/msi_templates/Binary/*.* $${TEMPLATE_DIR}/Binary
75 endef
76 else
77 instsetoo_native_msitemplates :=
78 endif
80 define instsetoo_native_install_command
81 $(call instsetoo_native_msitemplates,$(1))
82 $(call gb_Helper_print_on_error, \
83 cd $(dir $@) \
84 $(foreach pkgformat,$(5),\
85 && $(if $(filter-out archive,$(pkgformat)),ENABLE_STRIP=1) $(PERL) -w $< \
86 -f $(BUILDDIR)/instsetoo_native/util/openoffice.lst \
87 -l $(subst $(WHITESPACE),$(COMMA),$(strip $(2))) \
88 -p $(PRODUCTNAME_no_spaces)$(3) \
89 -u $(instsetoo_OUT) \
90 -buildid $(if $(filter deb0 rpm0,$(pkgformat)$(LIBO_VERSION_PATCH)),1,$(LIBO_VERSION_PATCH)) \
91 $(if $(filter WNT,$(OS)), \
92 -msitemplate $(dir $@)msi_templates \
93 -msilanguage $(dir $@)win_ulffiles \
94 ) \
95 $(4) \
96 -format $(pkgformat) \
97 $(if $(verbose),-verbose,-quiet) \
98 ),$@.log)
99 endef
101 $(call gb_CustomTarget_get_workdir,instsetoo_native/install)/install.phony:
102 $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),PRL,2)
103 $(call gb_Trace_StartRange,$(subst $(WORKDIR)/,,$@),PRL)
104 rm -rf $(instsetoo_OUT)
105 ifeq (TRUE,$(LIBO_TEST_INSTALL))
106 $(call instsetoo_native_install_command,openoffice,en-US,,,archive)
107 unzip -q -d $(TESTINSTALLDIR) $(instsetoo_OUT)/$(PRODUCTNAME_no_spaces)/archive/install/en-US/LibreOffice*_archive.zip
108 mv $(TESTINSTALLDIR)/LibreOffice*_archive/LibreOffice*/* $(TESTINSTALLDIR)/
109 rmdir $(TESTINSTALLDIR)/LibreOffice*_archive/LibreOffice*
110 rmdir $(TESTINSTALLDIR)/LibreOffice*_archive
111 ifeq (ODK,$(filter ODK,$(BUILD_TYPE)))
112 $(call instsetoo_native_install_command,sdkoo,en-US,_SDK,,archive)
113 unzip -q -d $(TESTINSTALLDIR) $(instsetoo_OUT)/$(PRODUCTNAME_no_spaces)_SDK/archive/install/en-US/LibreOffice*_archive_sdk.zip
114 mv $(TESTINSTALLDIR)/LibreOffice*_archive_sdk/LibreOffice*_SDK/sdk \
115 $(TESTINSTALLDIR)/
116 rmdir $(TESTINSTALLDIR)/LibreOffice*_archive_sdk/LibreOffice*_SDK
117 rmdir $(TESTINSTALLDIR)/LibreOffice*_archive_sdk
118 endif
119 else # LIBO_TEST_INSTALL
120 $(call instsetoo_native_install_command,openoffice,$(if $(filter WNT,$(OS)),$(instsetoo_native_WITH_LANG),en-US),,,$(PKGFORMAT))
121 ifeq (ODK,$(filter ODK,$(BUILD_TYPE)))
122 $(call instsetoo_native_install_command,sdkoo,en-US,_SDK,,$(PKGFORMAT))
123 endif
124 ifeq (HELP,$(filter HELP,$(BUILD_TYPE))$(filter MACOSX,$(OS)))
125 $(foreach lang,$(gb_HELP_LANGS),\
126 $(call instsetoo_native_install_command,ooohelppack,$(lang),,-helppack,$(PKGFORMAT)))
127 endif
128 ifneq (WNT,$(OS))
129 $(foreach lang,$(instsetoo_native_WITH_LANG),\
130 $(call instsetoo_native_install_command,ooolangpack,$(lang),,-languagepack,$(PKGFORMAT)))
131 endif
132 endif # LIBO_TEST_INSTALL
133 touch $@
134 $(call gb_Trace_EndRange,$(subst $(WORKDIR)/,,$@),PRL)
136 TIMESTAMPURL ?= "http://timestamp.globalsign.com/scripts/timestamp.dll"
137 $(call gb_CustomTarget_get_workdir,instsetoo_native/install)/msi_signing.done: \
138 $(if $(filter HELP,$(BUILD_TYPE)),$(call gb_CustomTarget_get_workdir,instsetoo_native/install)/msi_helppack_signing.done) \
139 $(if $(filter ODK,$(BUILD_TYPE)),$(call gb_CustomTarget_get_workdir,instsetoo_native/install)/msi_sdk_signing.done) \
140 $(call gb_CustomTarget_get_workdir,instsetoo_native/install)/msi_main_signing.done
141 $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),PRL,2)
142 $(call gb_Trace_StartRange,$(subst $(WORKDIR)/,,$@),PRL)
143 touch $@
144 $(call gb_Trace_EndRange,$(subst $(WORKDIR)/,,$@),PRL)
146 $(call gb_CustomTarget_get_workdir,instsetoo_native/install)/msi_helppack_signing.done \
147 $(call gb_CustomTarget_get_workdir,instsetoo_native/install)/msi_sdk_signing.done \
148 $(call gb_CustomTarget_get_workdir,instsetoo_native/install)/msi_main_signing.done \
149 : $(SRCDIR)/postprocess/signing/signing.pl $(call gb_CustomTarget_get_workdir,instsetoo_native/install)/install.phony
151 $(call gb_CustomTarget_get_workdir,instsetoo_native/install)/msi_main_signing.done:
152 $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),PRL,2)
153 $(call gb_Trace_StartRange,$(subst $(WORKDIR)/,,$@),PRL)
154 $(PERL) $(SRCDIR)/postprocess/signing/signing.pl \
155 -l $(subst .done,_log.txt,$@) \
156 $(if $(verbose),-v) \
157 $(if $(PFXFILE),-f $(PFXFILE)) \
158 $(if $(PFXPASSWORD),-p $(PFXPASSWORD)) \
159 $(if $(TIMESTAMPURL),-t $(TIMESTAMPURL)) \
160 -d $(PRODUCTNAME)\ $(LIBO_VERSION_MAJOR).$(LIBO_VERSION_MINOR).$(LIBO_VERSION_MICRO).$(LIBO_VERSION_PATCH) \
161 $(WORKDIR)/installation/$(PRODUCTNAME)/msi/install/*/*.msi \
162 && touch $@
163 $(call gb_Trace_EndRange,$(subst $(WORKDIR)/,,$@),PRL)
165 $(call gb_CustomTarget_get_workdir,instsetoo_native/install)/msi_helppack_signing.done:
166 $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),PRL,2)
167 $(call gb_Trace_StartRange,$(subst $(WORKDIR)/,,$@),PRL)
168 $(PERL) $(SRCDIR)/postprocess/signing/signing.pl \
169 -l $(subst .done,_log.txt,$@) \
170 $(if $(verbose),-v) \
171 $(if $(PFXFILE),-f $(PFXFILE)) \
172 $(if $(PFXPASSWORD),-p $(PFXPASSWORD)) \
173 $(if $(TIMESTAMPURL),-t $(TIMESTAMPURL)) \
174 -d $(PRODUCTNAME)\ $(LIBO_VERSION_MAJOR).$(LIBO_VERSION_MINOR).$(LIBO_VERSION_MICRO).$(LIBO_VERSION_PATCH)\ Helppack \
175 $(WORKDIR)/installation/$(PRODUCTNAME)_helppack/msi/install/*/*.msi \
176 && touch $@
177 $(call gb_Trace_EndRange,$(subst $(WORKDIR)/,,$@),PRL)
179 $(call gb_CustomTarget_get_workdir,instsetoo_native/install)/msi_sdk_signing.done:
180 $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),PRL,2)
181 $(call gb_Trace_StartRange,$(subst $(WORKDIR)/,,$@),PRL)
182 $(PERL) $(SRCDIR)/postprocess/signing/signing.pl \
183 -l $(subst .done,_log.txt,$@) \
184 $(if $(verbose),-v) \
185 $(if $(PFXFILE),-f $(PFXFILE)) \
186 $(if $(PFXPASSWORD),-p $(PFXPASSWORD)) \
187 $(if $(TIMESTAMPURL),-t $(TIMESTAMPURL)) \
188 -d $(PRODUCTNAME)\ $(LIBO_VERSION_MAJOR).$(LIBO_VERSION_MINOR).$(LIBO_VERSION_MICRO).$(LIBO_VERSION_PATCH)\ SDK \
189 $(WORKDIR)/installation/$(PRODUCTNAME)_SDK/msi/install/*/*.msi \
190 && touch $@
191 $(call gb_Trace_EndRange,$(subst $(WORKDIR)/,,$@),PRL)
193 # vim: set noet sw=4 ts=4: