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_KDE4
),TRUE
)
16 brand_URIPARAM
:= --urls
17 else ifeq ($(ENABLE_QT5
),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
)/launcherlist
) \
135 $(share_WORKDIR
)/%/openoffice.org.xml
: $(share_WORKDIR
)/documents.ulf
$(MIMEDESKTOPS
) $(share_SRCDIR
)/share
/create_mime_xml.pl
136 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),$(true
),PRL
,1)
137 $(PERL
) $(share_SRCDIR
)/share
/create_mime_xml.pl
$< > $@
140 $(share_WORKDIR
)/%/openoffice.keys
: \
141 $(share_SRCDIR
)/mimetypes
/openoffice.mime
$(MIMEKEYS
) $(share_SRCDIR
)/share
/brand.pl \
142 $(share_TRANSLATE
) $(share_WORKDIR
)/documents.ulf
144 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),$(true
),PRL
,1)
145 $(PERL
) $(share_SRCDIR
)/share
/brand.pl
-p
$* -u
$(UNIXFILENAME.
$*) \
146 --iconprefix
$(UNIXFILENAME.
$*)- $^
$(share_WORKDIR
)/$*
147 $(PERL
) $(share_TRANSLATE
) -p
$* -d
$(share_WORKDIR
)/$* \
148 --ext
"keys" --key
"description" $(share_WORKDIR
)/documents.ulf
151 $(share_WORKDIR
)/%/openoffice.mime
: $(share_SRCDIR
)/mimetypes
/openoffice.mime
153 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),$(true
),CAT
,1)
154 cat
$< | tr
-d
"\015" > $@
156 $(share_WORKDIR
)/%/openoffice.sh
: $(share_SRCDIR
)/share
/openoffice.sh
158 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),$(true
),CAT
,1)
159 cat
$< | tr
-d
"\015" | sed
-e
"s/%PREFIX/$(UNIXFILENAME.$*)/g" > $@
161 $(share_WORKDIR
)/%/create_tree.sh
: $(share_SRCDIR
)/share
/create_tree.sh \
162 $(share_WORKDIR
)/%/openoffice.org.xml
$(share_WORKDIR
)/%/openoffice.applications
$(share_WORKDIR
)/%/openoffice.mime \
163 $(share_WORKDIR
)/%/openoffice.keys
$(share_WORKDIR
)/%/launcherlist
$(if
$(INTROSPECTION_SCANNER
),$(call gb_Library_get_target
,libreofficekitgtk
))
165 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),$(true
),CAT
,1)
166 echo
"#!/bin/sh" > $@
167 echo
"PREFIX=$(UNIXFILENAME.$*)" >> $@
168 echo
"ICON_PREFIX=$(UNIXFILENAME.$*)" >> $@
169 echo
"ICON_SOURCE_DIR=$(SRCDIR)/sysui/desktop/icons" >> $@
170 echo
"APPDATA_SOURCE_DIR=$(SRCDIR)/sysui/desktop/appstream-appdata" >> $@
171 echo
"PRODUCTVERSION=$(PRODUCTVERSION)" >> $@
172 echo
"INTROSPECTION_SCANNER=$(INTROSPECTION_SCANNER)" >> $@
177 $(share_WORKDIR
)/%/launcherlist
: $(LAUNCHERS
)
179 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),$(true
),ECH
,1)
180 echo
"$(addsuffix .desktop,$(filter-out qstart,$(LAUNCHERLIST)))" > $@
183 $(share_WORKDIR
)/%/openoffice.applications
: $(share_SRCDIR
)/mimetypes
/openoffice.applications
185 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),$(true
),CAT
,1)
186 cat
$< | tr
-d
"\015" | sed
-e
"s/OFFICENAME/$(UNIXFILENAME.$*)/" -e
"s/%PRODUCTNAME/$(PRODUCTNAME.$*) $(PRODUCTVERSION.$*)/" > $@
188 # these .desktop files are written by brand.pl below
189 # need to have a rule for these because they are targets in Package_share
190 define sysui_Desktop_rule
191 $(share_WORKDIR
)/%/$(1).desktop
: $(share_WORKDIR
)/%/build.flag
196 $(foreach launcher
,$(LAUNCHERLIST
),$(eval
$(call sysui_Desktop_rule
,$(launcher
))))
198 $(share_WORKDIR
)/%/build.flag
: $(share_SRCDIR
)/share
/brand.pl
$(LAUNCHERS
) \
199 $(share_TRANSLATE
) $(addprefix $(share_WORKDIR
)/,$(ULFS
))
201 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),$(true
),PRL
,1)
202 $(PERL
) $(share_SRCDIR
)/share
/brand.pl
-p
'$${PRODUCTNAME} $${PRODUCTVERSION}' -u
$(UNIXFILENAME.
$*) \
204 --iconprefix
'$${UNIXBASISROOTNAME}-' $^
$(share_WORKDIR
)/$*
205 $(PERL
) $(share_TRANSLATE
) -p
$(PRODUCTNAME.
$*)$(PRODUCTVERSION
) -d
$(share_WORKDIR
)/$* \
206 --ext
"desktop" --key
"Comment" $(share_WORKDIR
)/launcher_comment.ulf
207 $(PERL
) $(share_TRANSLATE
) -p
$(PRODUCTNAME.
$*)$(PRODUCTVERSION
) -d
$(share_WORKDIR
)/$* \
208 --ext
"desktop" --key
"GenericName" $(share_WORKDIR
)/launcher_genericname.ulf
209 $(PERL
) $(share_TRANSLATE
) -p
$(PRODUCTNAME.
$*)$(PRODUCTVERSION
) -d
$(share_WORKDIR
)/$* \
210 --ext
"desktop" --key
"UnityQuickList" $(share_WORKDIR
)/launcher_unityquicklist.ulf
213 $(eval
$(call gb_CustomTarget_ulfex_rule
,\
214 $(share_WORKDIR
)/%.ulf
,\
215 $(share_SRCDIR
)/share
/%.ulf
,\
216 $(foreach lang
,$(gb_TRANS_LANGS
),\
217 $(gb_POLOCATION
)/$(lang
)/sysui
/desktop
/share.po
)))
219 # vim: set noet sw=4 ts=4: