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 include $(SRCDIR
)/sysui
/productlist.mk
13 ifeq ($(ENABLE_GIO
),TRUE
)
14 brand_URIPARAM
:= --urls
15 else ifeq ($(ENABLE_QT5
),TRUE
)
16 brand_URIPARAM
:= --urls
21 share_WORKDIR
:= $(call gb_CustomTarget_get_workdir
,sysui
/share
)
22 share_SRCDIR
:= $(SRCDIR
)/sysui
/desktop
24 share_TRANSLATE
:= $(SRCDIR
)/solenv
/bin
/desktop-translate.pl
26 LAUNCHERLIST_APPS
:= writer calc draw impress math base startcenter
27 LAUNCHERLIST
:= $(LAUNCHERLIST_APPS
) xsltfilter
28 LAUNCHERS
:= $(foreach launcher
,$(LAUNCHERLIST
),$(share_SRCDIR
)/menus
/$(launcher
).desktop
)
34 spreadsheet-template \
38 presentation-template \
45 oasis-spreadsheet-template \
46 oasis-spreadsheet-flat-xml \
48 oasis-drawing-template \
49 oasis-drawing-flat-xml \
51 oasis-presentation-template \
52 oasis-presentation-flat-xml \
54 oasis-master-document \
55 oasis-master-document-template \
60 ms-excel-template-12 \
61 ms-powerpoint-presentation-12 \
62 ms-powerpoint-presentation \
63 ms-powerpoint-template-12 \
68 openxmlformats-officedocument-presentationml-presentation \
69 openxmlformats-officedocument-presentationml-template \
70 openxmlformats-officedocument-spreadsheetml-sheet \
71 openxmlformats-officedocument-spreadsheetml-template \
72 openxmlformats-officedocument-wordprocessingml-document \
73 openxmlformats-officedocument-wordprocessingml-template \
74 ms-excel-sheet-binary-12 \
81 oasis-spreadsheet-template \
83 oasis-drawing-template \
85 oasis-presentation-template \
87 oasis-master-document \
88 oasis-master-document-template \
94 spreadsheet-template \
98 presentation-template \
104 share_ICONS
:= $(foreach size
,16x16
32x32
48x48
,\
105 $(foreach contrast
,hicolor locolor
,\
106 $(foreach app
,$(LAUNCHERLIST_APPS
),\
107 $(share_SRCDIR
)/icons
/$(contrast
)/$(size
)/apps
/$(app
).png
) \
108 $(foreach mime
,$(MIMEICONLIST
),\
109 $(share_SRCDIR
)/icons
/$(contrast
)/$(size
)/mimetypes
/$(mime
).png
)))
111 MIMEKEYS
:= $(foreach mime
,$(MIMELIST
),$(share_SRCDIR
)/mimetypes
/$(mime
).keys
)
112 MIMEDESKTOPS
:= $(foreach mime
,$(MIMELIST
),$(share_SRCDIR
)/mimetypes
/$(mime
).desktop
)
113 ULFS
:= documents.ulf \
114 launcher_comment.ulf \
115 launcher_genericname.ulf \
116 launcher_unityquicklist.ulf
118 $(eval
$(call gb_CustomTarget_CustomTarget
,sysui
/share
))
120 $(eval
$(call gb_CustomTarget_register_targets
,sysui
/share
,\
122 $(foreach product
,$(PRODUCTLIST
),\
123 $(product
)/build.flag \
124 $(product
)/openoffice.org.xml \
125 $(product
)/openoffice.mime \
126 $(product
)/openoffice.applications \
127 $(product
)/openoffice.keys \
128 $(product
)/openoffice.sh \
129 $(product
)/create_tree.sh \
130 $(product
)/launcherlist
) \
133 $(share_WORKDIR
)/%/openoffice.org.xml
: $(share_WORKDIR
)/documents.ulf
$(MIMEDESKTOPS
) $(share_SRCDIR
)/share
/create_mime_xml.pl
134 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),$(true
),PRL
,1)
135 $(PERL
) $(share_SRCDIR
)/share
/create_mime_xml.pl
$< > $@
138 $(share_WORKDIR
)/%/openoffice.keys
: \
139 $(share_SRCDIR
)/mimetypes
/openoffice.mime
$(MIMEKEYS
) $(share_SRCDIR
)/share
/brand.pl \
140 $(share_TRANSLATE
) $(share_WORKDIR
)/documents.ulf
142 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),$(true
),PRL
,1)
143 $(PERL
) $(share_SRCDIR
)/share
/brand.pl
-p
$* -u
$(UNIXFILENAME.
$*) \
144 --iconprefix
$(UNIXFILENAME.
$*)- $^
$(share_WORKDIR
)/$*
145 $(PERL
) $(share_TRANSLATE
) -p
$* -d
$(share_WORKDIR
)/$* \
146 --ext
"keys" --key
"description" $(share_WORKDIR
)/documents.ulf
149 $(share_WORKDIR
)/%/openoffice.mime
: $(share_SRCDIR
)/mimetypes
/openoffice.mime
151 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),$(true
),CAT
,1)
152 cat
$< | tr
-d
"\015" > $@
154 $(share_WORKDIR
)/%/openoffice.sh
: $(share_SRCDIR
)/share
/openoffice.sh
156 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),$(true
),CAT
,1)
157 cat
$< | tr
-d
"\015" | sed
-e
"s/%PREFIX/$(UNIXFILENAME.$*)/g" > $@
159 $(share_WORKDIR
)/%/create_tree.sh
: $(share_SRCDIR
)/share
/create_tree.sh \
160 $(share_WORKDIR
)/%/openoffice.org.xml
$(share_WORKDIR
)/%/openoffice.applications
$(share_WORKDIR
)/%/openoffice.mime \
161 $(share_WORKDIR
)/%/openoffice.keys
$(share_WORKDIR
)/%/launcherlist
$(if
$(INTROSPECTION_SCANNER
),$(call gb_Library_get_target
,libreofficekitgtk
))
163 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),$(true
),CAT
,1)
164 echo
"#!/bin/sh" > $@
165 echo
"PREFIX=$(UNIXFILENAME.$*)" >> $@
166 echo
"ICON_PREFIX=$(UNIXFILENAME.$*)" >> $@
167 echo
"ICON_SOURCE_DIR=$(SRCDIR)/sysui/desktop/icons" >> $@
168 echo
"APPDATA_SOURCE_DIR=$(SRCDIR)/sysui/desktop/appstream-appdata" >> $@
169 echo
"PRODUCTVERSION=$(PRODUCTVERSION)" >> $@
170 echo
"INTROSPECTION_SCANNER=$(INTROSPECTION_SCANNER)" >> $@
175 $(share_WORKDIR
)/%/launcherlist
: $(LAUNCHERS
)
177 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),$(true
),ECH
,1)
178 echo
"$(addsuffix .desktop,$(LAUNCHERLIST))" > $@
181 $(share_WORKDIR
)/%/openoffice.applications
: $(share_SRCDIR
)/mimetypes
/openoffice.applications
183 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),$(true
),CAT
,1)
184 cat
$< | tr
-d
"\015" | sed
-e
"s/OFFICENAME/$(UNIXFILENAME.$*)/" -e
"s/%PRODUCTNAME/$(PRODUCTNAME.$*) $(PRODUCTVERSION.$*)/" > $@
186 # these .desktop files are written by brand.pl below
187 # need to have a rule for these because they are targets in Package_share
188 define sysui_Desktop_rule
189 $(share_WORKDIR
)/%/$(1).desktop
: $(share_WORKDIR
)/%/build.flag
194 $(foreach launcher
,$(LAUNCHERLIST
),$(eval
$(call sysui_Desktop_rule
,$(launcher
))))
196 $(share_WORKDIR
)/%/build.flag
: $(share_SRCDIR
)/share
/brand.pl
$(LAUNCHERS
) \
197 $(share_TRANSLATE
) $(addprefix $(share_WORKDIR
)/,$(ULFS
))
199 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),$(true
),PRL
,1)
200 $(PERL
) $(share_SRCDIR
)/share
/brand.pl
-p
'$${PRODUCTNAME} $${PRODUCTVERSION}' -u
$(UNIXFILENAME.
$*) \
202 --iconprefix
'$${UNIXBASISROOTNAME}-' $^
$(share_WORKDIR
)/$*
203 $(PERL
) $(share_TRANSLATE
) -p
$(PRODUCTNAME.
$*)$(PRODUCTVERSION
) -d
$(share_WORKDIR
)/$* \
204 --ext
"desktop" --key
"Comment" $(share_WORKDIR
)/launcher_comment.ulf
205 $(PERL
) $(share_TRANSLATE
) -p
$(PRODUCTNAME.
$*)$(PRODUCTVERSION
) -d
$(share_WORKDIR
)/$* \
206 --ext
"desktop" --key
"GenericName" $(share_WORKDIR
)/launcher_genericname.ulf
207 $(PERL
) $(share_TRANSLATE
) -p
$(PRODUCTNAME.
$*)$(PRODUCTVERSION
) -d
$(share_WORKDIR
)/$* \
208 --ext
"desktop" --key
"UnityQuickList" $(share_WORKDIR
)/launcher_unityquicklist.ulf
211 $(eval
$(call gb_CustomTarget_ulfex_rule
,\
212 $(share_WORKDIR
)/%.ulf
,\
213 $(share_SRCDIR
)/share
/%.ulf
,\
214 $(foreach lang
,$(gb_TRANS_LANGS
),\
215 $(gb_POLOCATION
)/$(lang
)/sysui
/desktop
/share.po
)))
217 # vim: set noet sw=4 ts=4: