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 \
19 $(eval
$(call gb_CustomTarget_CustomTarget
,instsetoo_native
/install))
21 $(eval
$(call gb_CustomTarget_register_targets
,instsetoo_native
/install,\
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
) \
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" > $@
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
57 export DONT_REMOVE_PACKAGE
:= TRUE
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
))
66 define instsetoo_native_msitemplates
68 TEMPLATE_DIR
=$(dir $@
)msi_templates \
69 && rm -rf
$${TEMPLATE_DIR} \
70 && mkdir
-p
$${TEMPLATE_DIR}/Binary \
71 && for I in
$(SRCDIR
)/instsetoo_native
/inc_
$(1)/windows
/msi_templates
/*.
* ; do
$(GREP
) -v
'^#' "$$I" > $${TEMPLATE_DIR}/`basename $$I` || true
; done \
72 && $(GNUCOPY
) $(SRCDIR
)/instsetoo_native
/inc_common
/windows
/msi_templates
/Binary
/*.
* $${TEMPLATE_DIR}/Binary
75 instsetoo_native_msitemplates
:=
78 define instsetoo_native_install_command
79 $(call instsetoo_native_msitemplates
,$(1))
80 $(call gb_Helper_print_on_error
, \
82 $(foreach pkgformat
,$(5),\
83 && $(if
$(filter-out archive
,$(pkgformat
)),ENABLE_STRIP
=1) $(PERL
) -w
$< \
84 -f
$(BUILDDIR
)/instsetoo_native
/util
/openoffice.lst \
85 -l
$(subst $(WHITESPACE
),$(COMMA
),$(strip $(2))) \
86 -p
$(PRODUCTNAME_WITHOUT_SPACES
)$(3) \
88 -buildid
$(if
$(filter deb0 rpm0
,$(pkgformat
)$(LIBO_VERSION_PATCH
)),1,$(LIBO_VERSION_PATCH
)) \
89 $(if
$(filter WNT
,$(OS
)), \
90 -msitemplate
$(dir $@
)msi_templates \
91 -msilanguage
$(dir $@
)win_ulffiles \
94 -format
$(pkgformat
) \
95 $(if
$(verbose
),-verbose
,-quiet
) \
99 $(call gb_CustomTarget_get_workdir
,instsetoo_native
/install)/install.phony
:
100 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),$(true
),PRL
,2)
101 $(call gb_Trace_StartRange
,$(subst $(WORKDIR
)/,,$@
),PRL
)
102 rm -rf
$(instsetoo_OUT
)
103 ifeq (TRUE
,$(LIBO_TEST_INSTALL
))
104 $(call instsetoo_native_install_command
,openoffice
,en-US
,,,archive
)
105 unzip
-q
-d
$(TESTINSTALLDIR
) $(instsetoo_OUT
)/$(PRODUCTNAME_WITHOUT_SPACES
)/archive
/install/en-US
/LibreOffice
*_archive.zip
106 mv
$(TESTINSTALLDIR
)/LibreOffice
*_archive
/LibreOffice
*/* $(TESTINSTALLDIR
)/
107 rmdir
$(TESTINSTALLDIR
)/LibreOffice
*_archive
/LibreOffice
*
108 rmdir
$(TESTINSTALLDIR
)/LibreOffice
*_archive
109 ifeq (ODK
,$(filter ODK
,$(BUILD_TYPE
)))
110 $(call instsetoo_native_install_command
,sdkoo
,en-US
,_SDK
,,archive
)
111 unzip
-q
-d
$(TESTINSTALLDIR
) $(instsetoo_OUT
)/$(PRODUCTNAME_WITHOUT_SPACES
)_SDK
/archive
/install/en-US
/LibreOffice
*_archive_sdk.zip
112 mv
$(TESTINSTALLDIR
)/LibreOffice
*_archive_sdk
/LibreOffice
*_SDK
/sdk \
114 rmdir
$(TESTINSTALLDIR
)/LibreOffice
*_archive_sdk
/LibreOffice
*_SDK
115 rmdir
$(TESTINSTALLDIR
)/LibreOffice
*_archive_sdk
117 else # LIBO_TEST_INSTALL
118 $(call instsetoo_native_install_command
,openoffice
,$(if
$(filter WNT
,$(OS
)),$(instsetoo_native_WITH_LANG
),en-US
),,,$(PKGFORMAT
))
119 ifeq (ODK
,$(filter ODK
,$(BUILD_TYPE
)))
120 $(call instsetoo_native_install_command
,sdkoo
,en-US
,_SDK
,,$(PKGFORMAT
))
122 ifeq (HELP
,$(filter HELP
,$(BUILD_TYPE
))$(filter MACOSX
,$(OS
)))
123 $(foreach lang
,$(gb_HELP_LANGS
),\
124 $(call instsetoo_native_install_command
,ooohelppack
,$(lang
),,-helppack
,$(PKGFORMAT
)))
127 $(foreach lang
,$(instsetoo_native_WITH_LANG
),\
128 $(call instsetoo_native_install_command
,ooolangpack
,$(lang
),,-languagepack
,$(PKGFORMAT
)))
130 endif # LIBO_TEST_INSTALL
132 $(call gb_Trace_EndRange
,$(subst $(WORKDIR
)/,,$@
),PRL
)
134 TIMESTAMPURL ?
= "http://timestamp.globalsign.com/scripts/timestamp.dll"
135 $(call gb_CustomTarget_get_workdir
,instsetoo_native
/install)/msi_signing.done
: \
136 $(if
$(filter HELP
,$(BUILD_TYPE
)),$(call gb_CustomTarget_get_workdir
,instsetoo_native
/install)/msi_helppack_signing.done
) \
137 $(if
$(filter ODK
,$(BUILD_TYPE
)),$(call gb_CustomTarget_get_workdir
,instsetoo_native
/install)/msi_sdk_signing.done
) \
138 $(call gb_CustomTarget_get_workdir
,instsetoo_native
/install)/msi_main_signing.done
139 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),$(true
),PRL
,2)
140 $(call gb_Trace_StartRange
,$(subst $(WORKDIR
)/,,$@
),PRL
)
142 $(call gb_Trace_EndRange
,$(subst $(WORKDIR
)/,,$@
),PRL
)
144 $(call gb_CustomTarget_get_workdir
,instsetoo_native
/install)/msi_helppack_signing.done \
145 $(call gb_CustomTarget_get_workdir
,instsetoo_native
/install)/msi_sdk_signing.done \
146 $(call gb_CustomTarget_get_workdir
,instsetoo_native
/install)/msi_main_signing.done \
147 : $(SRCDIR
)/postprocess
/signing
/signing.pl
$(call gb_CustomTarget_get_workdir
,instsetoo_native
/install)/install.phony
149 $(call gb_CustomTarget_get_workdir
,instsetoo_native
/install)/msi_main_signing.done
:
150 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),$(true
),PRL
,2)
151 $(call gb_Trace_StartRange
,$(subst $(WORKDIR
)/,,$@
),PRL
)
152 $(PERL
) $(SRCDIR
)/postprocess
/signing
/signing.pl \
153 -l
$(subst .done
,_log.txt
,$@
) \
154 $(if
$(verbose
),-v
) \
155 $(if
$(PFXFILE
),-f
$(PFXFILE
)) \
156 $(if
$(PFXPASSWORD
),-p
$(PFXPASSWORD
)) \
157 $(if
$(TIMESTAMPURL
),-t
$(TIMESTAMPURL
)) \
158 -d
$(PRODUCTNAME_WITHOUT_SPACES
)\
$(LIBO_VERSION_MAJOR
).
$(LIBO_VERSION_MINOR
).
$(LIBO_VERSION_MICRO
).
$(LIBO_VERSION_PATCH
) \
159 $(WORKDIR
)/installation
/$(PRODUCTNAME_WITHOUT_SPACES
)/msi
/install/*/*.msi \
161 $(call gb_Trace_EndRange
,$(subst $(WORKDIR
)/,,$@
),PRL
)
163 $(call gb_CustomTarget_get_workdir
,instsetoo_native
/install)/msi_helppack_signing.done
:
164 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),$(true
),PRL
,2)
165 $(call gb_Trace_StartRange
,$(subst $(WORKDIR
)/,,$@
),PRL
)
166 $(PERL
) $(SRCDIR
)/postprocess
/signing
/signing.pl \
167 -l
$(subst .done
,_log.txt
,$@
) \
168 $(if
$(verbose
),-v
) \
169 $(if
$(PFXFILE
),-f
$(PFXFILE
)) \
170 $(if
$(PFXPASSWORD
),-p
$(PFXPASSWORD
)) \
171 $(if
$(TIMESTAMPURL
),-t
$(TIMESTAMPURL
)) \
172 -d
$(PRODUCTNAME_WITHOUT_SPACES
)\
$(LIBO_VERSION_MAJOR
).
$(LIBO_VERSION_MINOR
).
$(LIBO_VERSION_MICRO
).
$(LIBO_VERSION_PATCH
)\ Helppack \
173 $(WORKDIR
)/installation
/$(PRODUCTNAME_WITHOUT_SPACES
)_helppack
/msi
/install/*/*.msi \
175 $(call gb_Trace_EndRange
,$(subst $(WORKDIR
)/,,$@
),PRL
)
177 $(call gb_CustomTarget_get_workdir
,instsetoo_native
/install)/msi_sdk_signing.done
:
178 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),$(true
),PRL
,2)
179 $(call gb_Trace_StartRange
,$(subst $(WORKDIR
)/,,$@
),PRL
)
180 $(PERL
) $(SRCDIR
)/postprocess
/signing
/signing.pl \
181 -l
$(subst .done
,_log.txt
,$@
) \
182 $(if
$(verbose
),-v
) \
183 $(if
$(PFXFILE
),-f
$(PFXFILE
)) \
184 $(if
$(PFXPASSWORD
),-p
$(PFXPASSWORD
)) \
185 $(if
$(TIMESTAMPURL
),-t
$(TIMESTAMPURL
)) \
186 -d
$(PRODUCTNAME_WITHOUT_SPACES
)\
$(LIBO_VERSION_MAJOR
).
$(LIBO_VERSION_MINOR
).
$(LIBO_VERSION_MICRO
).
$(LIBO_VERSION_PATCH
)\ SDK \
187 $(WORKDIR
)/installation
/$(PRODUCTNAME_WITHOUT_SPACES
)_SDK
/msi
/install/*/*.msi \
189 $(call gb_Trace_EndRange
,$(subst $(WORKDIR
)/,,$@
),PRL
)
191 # vim: set noet sw=4 ts=4: