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_TDE
),TRUE
)
16 brand_URIPARAM
:= --urls
17 else ifeq ($(ENABLE_KDE4
),TRUE
)
18 brand_URIPARAM
:= --urls
23 share_WORKDIR
:= $(call gb_CustomTarget_get_workdir
,sysui
/share
)
24 share_SRCDIR
:= $(SRCDIR
)/sysui
/desktop
26 share_TRANSLATE
:= $(SRCDIR
)/solenv
/bin
/desktop-translate.pl
28 LAUNCHERLIST_APPS
:= writer calc draw impress math base startcenter
29 LAUNCHERLIST
:= $(LAUNCHERLIST_APPS
) qstart xsltfilter
30 LAUNCHERS
:= $(foreach launcher
,$(LAUNCHERLIST
),$(share_SRCDIR
)/menus
/$(launcher
).desktop
)
36 spreadsheet-template \
40 presentation-template \
47 oasis-spreadsheet-template \
48 oasis-spreadsheet-flat-xml \
50 oasis-drawing-template \
51 oasis-drawing-flat-xml \
53 oasis-presentation-template \
54 oasis-presentation-flat-xml \
56 oasis-master-document \
57 oasis-master-document-template \
62 ms-excel-template-12 \
63 ms-powerpoint-presentation-12 \
64 ms-powerpoint-presentation \
65 ms-powerpoint-template-12 \
70 openxmlformats-officedocument-presentationml-presentation \
71 openxmlformats-officedocument-presentationml-template \
72 openxmlformats-officedocument-spreadsheetml-sheet \
73 openxmlformats-officedocument-spreadsheetml-template \
74 openxmlformats-officedocument-wordprocessingml-document \
75 openxmlformats-officedocument-wordprocessingml-template \
76 ms-excel-sheet-binary-12 \
83 oasis-spreadsheet-template \
85 oasis-drawing-template \
87 oasis-presentation-template \
89 oasis-master-document \
90 oasis-master-document-template \
96 spreadsheet-template \
100 presentation-template \
106 share_ICONS
:= $(foreach size
,16x16
32x32
48x48
,\
107 $(foreach contrast
,hicolor locolor
,\
108 $(foreach app
,$(LAUNCHERLIST_APPS
),\
109 $(share_SRCDIR
)/icons
/$(contrast
)/$(size
)/apps
/$(app
).png
) \
110 $(foreach mime
,$(MIMEICONLIST
),\
111 $(share_SRCDIR
)/icons
/$(contrast
)/$(size
)/mimetypes
/$(mime
).png
)))
113 MIMEKEYS
:= $(foreach mime
,$(MIMELIST
),$(share_SRCDIR
)/mimetypes
/$(mime
).keys
)
114 MIMEDESKTOPS
:= $(foreach mime
,$(MIMELIST
),$(share_SRCDIR
)/mimetypes
/$(mime
).desktop
)
115 ULFS
:= documents.ulf \
116 launcher_comment.ulf \
117 launcher_genericname.ulf \
118 launcher_unityquicklist.ulf
120 $(eval
$(call gb_CustomTarget_CustomTarget
,sysui
/share
))
122 $(eval
$(call gb_CustomTarget_register_targets
,sysui
/share
,\
124 $(foreach product
,$(PRODUCTLIST
),\
125 $(product
)/build.flag \
126 $(product
)/openoffice.org.xml \
127 $(product
)/openoffice.mime \
128 $(product
)/openoffice.applications \
129 $(product
)/openoffice.keys \
130 $(product
)/openoffice.sh \
131 $(product
)/create_tree.sh \
132 $(product
)/mimelnklist \
133 $(product
)/launcherlist
) \
136 $(share_WORKDIR
)/%/openoffice.org.xml
: $(share_WORKDIR
)/documents.ulf
$(MIMEDESKTOPS
) $(share_SRCDIR
)/share
/create_mime_xml.pl
137 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),$(true
),PRL
,1)
138 $(PERL
) $(share_SRCDIR
)/share
/create_mime_xml.pl
$< > $@
141 $(share_WORKDIR
)/%/openoffice.keys
: \
142 $(share_SRCDIR
)/mimetypes
/openoffice.mime
$(MIMEKEYS
) $(share_SRCDIR
)/share
/brand.pl \
143 $(share_TRANSLATE
) $(share_WORKDIR
)/documents.ulf
145 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),$(true
),PRL
,1)
146 $(PERL
) $(share_SRCDIR
)/share
/brand.pl
-p
$* -u
$(UNIXFILENAME.
$*) \
147 --iconprefix
$(UNIXFILENAME.
$*)- $^
$(share_WORKDIR
)/$*
148 $(PERL
) $(share_TRANSLATE
) -p
$* -d
$(share_WORKDIR
)/$* \
149 --ext
"keys" --key
"description" $(share_WORKDIR
)/documents.ulf
152 $(share_WORKDIR
)/%/mimelnklist
: $(MIMEDESKTOPS
) $(share_SRCDIR
)/share
/brand.pl \
153 $(share_TRANSLATE
) $(share_WORKDIR
)/documents.ulf
155 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),$(true
),PRL
,1)
156 $(PERL
) $(share_SRCDIR
)/share
/brand.pl
-p
$* -u
$(UNIXFILENAME.
$*) \
157 --iconprefix
$(UNIXFILENAME.
$*)- $^
$(share_WORKDIR
)/$*
158 $(PERL
) $(share_TRANSLATE
) -p
$* -d
$(share_WORKDIR
)/$* \
159 --ext
"desktop" --key
"Comment" $(share_WORKDIR
)/documents.ulf
160 echo
"$(MIMEDESKTOPS)" > $@
162 $(share_WORKDIR
)/%/openoffice.mime
: $(share_SRCDIR
)/mimetypes
/openoffice.mime
164 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),$(true
),CAT
,1)
165 cat
$< | tr
-d
"\015" > $@
167 $(share_WORKDIR
)/%/openoffice.sh
: $(share_SRCDIR
)/share
/openoffice.sh
169 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),$(true
),CAT
,1)
170 cat
$< | tr
-d
"\015" | sed
-e
"s/%PREFIX/$(UNIXFILENAME.$*)/g" > $@
172 $(share_WORKDIR
)/%/create_tree.sh
: $(share_SRCDIR
)/share
/create_tree.sh
$(share_WORKDIR
)/%/mimelnklist \
173 $(share_WORKDIR
)/%/openoffice.org.xml
$(share_WORKDIR
)/%/openoffice.applications
$(share_WORKDIR
)/%/openoffice.mime \
174 $(share_WORKDIR
)/%/openoffice.keys
$(share_WORKDIR
)/%/launcherlist
$(if
$(INTROSPECTION_SCANNER
),$(call gb_Library_get_target
,libreofficekitgtk
))
176 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),$(true
),CAT
,1)
177 echo
"#!/bin/sh" > $@
178 echo
"PREFIX=$(UNIXFILENAME.$*)" >> $@
179 echo
"ICON_PREFIX=$(UNIXFILENAME.$*)" >> $@
180 echo
"ICON_SOURCE_DIR=$(SRCDIR)/sysui/desktop/icons" >> $@
181 echo
"APPDATA_SOURCE_DIR=$(SRCDIR)/sysui/desktop/appstream-appdata" >> $@
182 echo
"PRODUCTVERSION=$(PRODUCTVERSION)" >> $@
183 echo
"INTROSPECTION_SCANNER=$(INTROSPECTION_SCANNER)" >> $@
188 $(share_WORKDIR
)/%/launcherlist
: $(LAUNCHERS
)
190 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),$(true
),ECH
,1)
191 echo
"$(addsuffix .desktop,$(filter-out qstart,$(LAUNCHERLIST)))" > $@
194 $(share_WORKDIR
)/%/openoffice.applications
: $(share_SRCDIR
)/mimetypes
/openoffice.applications
196 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),$(true
),CAT
,1)
197 cat
$< | tr
-d
"\015" | sed
-e
"s/OFFICENAME/$(UNIXFILENAME.$*)/" -e
"s/%PRODUCTNAME/$(PRODUCTNAME.$*) $(PRODUCTVERSION.$*)/" > $@
199 # these .desktop files are written by brand.pl below
200 # need to have a rule for these because they are targets in Package_share
201 define sysui_Desktop_rule
202 $(share_WORKDIR
)/%/$(1).desktop
: $(share_WORKDIR
)/%/build.flag
207 $(foreach launcher
,$(LAUNCHERLIST
),$(eval
$(call sysui_Desktop_rule
,$(launcher
))))
209 $(share_WORKDIR
)/%/build.flag
: $(share_SRCDIR
)/share
/brand.pl
$(LAUNCHERS
) \
210 $(share_TRANSLATE
) $(addprefix $(share_WORKDIR
)/,$(ULFS
))
212 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),$(true
),PRL
,1)
213 $(PERL
) $(share_SRCDIR
)/share
/brand.pl
-p
'$${PRODUCTNAME} $${PRODUCTVERSION}' -u
$(UNIXFILENAME.
$*) \
215 --iconprefix
'$${UNIXBASISROOTNAME}-' $^
$(share_WORKDIR
)/$*
216 $(PERL
) $(share_TRANSLATE
) -p
$(PRODUCTNAME.
$*)$(PRODUCTVERSION
) -d
$(share_WORKDIR
)/$* \
217 --ext
"desktop" --key
"Comment" $(share_WORKDIR
)/launcher_comment.ulf
218 $(PERL
) $(share_TRANSLATE
) -p
$(PRODUCTNAME.
$*)$(PRODUCTVERSION
) -d
$(share_WORKDIR
)/$* \
219 --ext
"desktop" --key
"GenericName" $(share_WORKDIR
)/launcher_genericname.ulf
220 $(PERL
) $(share_TRANSLATE
) -p
$(PRODUCTNAME.
$*)$(PRODUCTVERSION
) -d
$(share_WORKDIR
)/$* \
221 --ext
"desktop" --key
"UnityQuickList" $(share_WORKDIR
)/launcher_unityquicklist.ulf
224 $(eval
$(call gb_CustomTarget_ulfex_rule
,\
225 $(share_WORKDIR
)/%.ulf
,\
226 $(share_SRCDIR
)/share
/%.ulf
,\
227 $(foreach lang
,$(gb_TRANS_LANGS
),\
228 $(gb_POLOCATION
)/$(lang
)/sysui
/desktop
/share.po
)))
230 # vim: set noet sw=4 ts=4: