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
12 ifeq ($(ENABLE_GIO
),TRUE
)
13 brand_URIPARAM
:= --urls
15 ifeq ($(ENABLE_GNOMEVFS
),TRUE
)
16 brand_URIPARAM
:= --urls
22 share_WORKDIR
:= $(call gb_CustomTarget_get_workdir
,sysui
/share
)
23 share_SRCDIR
:= $(SRCDIR
)/sysui
/desktop
25 share_TRANSLATE
:= $(SOLARENV
)/bin
/desktop-translate.pl
27 LAUNCHERLIST_APPS
:= writer calc draw impress math base startcenter
28 LAUNCHERLIST
:= $(LAUNCHERLIST_APPS
) qstart xsltfilter
29 LAUNCHERS
:= $(foreach launcher
,$(LAUNCHERLIST
),$(share_SRCDIR
)/menus
/$(launcher
).desktop
)
35 spreadsheet-template \
39 presentation-template \
46 oasis-spreadsheet-template \
47 oasis-spreadsheet-flat-xml \
49 oasis-drawing-template \
50 oasis-drawing-flat-xml \
52 oasis-presentation-template \
53 oasis-presentation-flat-xml \
55 oasis-master-document \
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 \
93 spreadsheet-template \
97 presentation-template \
103 share_ICONS
:= $(foreach size
,16x16
32x32
48x48
,\
104 $(foreach contrast
,hicolor locolor
,\
105 $(foreach app
,$(LAUNCHERLIST_APPS
),\
106 $(share_SRCDIR
)/icons
/$(contrast
)/$(size
)/apps
/$(app
).png
) \
107 $(foreach mime
,$(MIMEICONLIST
),\
108 $(share_SRCDIR
)/icons
/$(contrast
)/$(size
)/mimetypes
/$(mime
).png
)))
110 MIMEKEYS
:= $(foreach mime
,$(MIMELIST
),$(share_SRCDIR
)/mimetypes
/$(mime
).keys
)
111 MIMEDESKTOPS
:= $(foreach mime
,$(MIMELIST
),$(share_SRCDIR
)/mimetypes
/$(mime
).desktop
)
112 ULFS
:= documents.ulf \
113 launcher_comment.ulf \
114 launcher_genericname.ulf \
115 launcher_unityquicklist.ulf
117 $(eval
$(call gb_CustomTarget_CustomTarget
,sysui
/share
))
119 $(eval
$(call gb_CustomTarget_register_targets
,sysui
/share
,\
121 $(foreach product
,$(PRODUCTLIST
),\
122 $(product
)/build.flag \
123 $(product
)/openoffice.org.xml \
124 $(product
)/openoffice.mime \
125 $(product
)/openoffice.applications \
126 $(product
)/openoffice.keys \
127 $(product
)/openoffice.sh \
128 $(product
)/printeradmin.sh \
129 $(product
)/create_tree.sh \
130 $(product
)/mimelnklist \
131 $(product
)/launcherlist
) \
134 $(share_WORKDIR
)/%/openoffice.org.xml
: $(share_WORKDIR
)/documents.ulf
$(MIMEDESKTOPS
) $(share_SRCDIR
)/share
/create_mime_xml.pl
135 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),$(true
),PRL
,1)
136 $(PERL
) $(share_SRCDIR
)/share
/create_mime_xml.pl
$< > $@
139 $(share_WORKDIR
)/%/openoffice.keys
: \
140 $(share_SRCDIR
)/mimetypes
/openoffice.mime
$(MIMEKEYS
) $(share_SRCDIR
)/share
/brand.pl \
141 $(share_TRANSLATE
) $(share_WORKDIR
)/documents.ulf
143 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),$(true
),PRL
,1)
144 $(PERL
) $(share_SRCDIR
)/share
/brand.pl
-p
$* -u
$(UNIXFILENAME.
$*) \
145 --iconprefix
$(UNIXFILENAME.
$*)- $^
$(share_WORKDIR
)/$*
146 $(PERL
) $(share_TRANSLATE
) -p
$* -d
$(share_WORKDIR
)/$* \
147 --ext
"keys" --key
"description" $(share_WORKDIR
)/documents.ulf
150 $(share_WORKDIR
)/%/mimelnklist
: $(MIMEDESKTOPS
) $(share_SRCDIR
)/share
/brand.pl \
151 $(share_TRANSLATE
) $(share_WORKDIR
)/documents.ulf
153 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),$(true
),PRL
,1)
154 $(PERL
) $(share_SRCDIR
)/share
/brand.pl
-p
$* -u
$(UNIXFILENAME.
$*) \
155 --iconprefix
$(UNIXFILENAME.
$*)- $^
$(share_WORKDIR
)/$*
156 $(PERL
) $(share_TRANSLATE
) -p
$* -d
$(share_WORKDIR
)/$* \
157 --ext
"desktop" --key
"Comment" $(share_WORKDIR
)/documents.ulf
158 echo
"$(MIMEDESKTOPS)" > $@
160 $(share_WORKDIR
)/%/openoffice.mime
: $(share_SRCDIR
)/mimetypes
/openoffice.mime
162 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),$(true
),CAT
,1)
163 cat
$< | tr
-d
"\015" > $@
165 $(share_WORKDIR
)/%/openoffice.sh
: $(share_SRCDIR
)/share
/openoffice.sh
167 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),$(true
),CAT
,1)
168 cat
$< | tr
-d
"\015" | sed
-e
"s/%PREFIX/$(UNIXFILENAME.$*)/g" > $@
170 $(share_WORKDIR
)/%/printeradmin.sh
: $(share_SRCDIR
)/share
/printeradmin.sh
172 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),$(true
),CAT
,1)
173 cat
$< | tr
-d
"\015" | sed
-e
"s/%PREFIX/$(UNIXFILENAME.$*)/g" > $@
175 $(share_WORKDIR
)/%/create_tree.sh
: $(share_SRCDIR
)/share
/create_tree.sh
$(share_WORKDIR
)/%/mimelnklist
$(share_WORKDIR
)/%/printeradmin.sh \
176 $(share_WORKDIR
)/%/openoffice.org.xml
$(share_WORKDIR
)/%/openoffice.applications
$(share_WORKDIR
)/%/openoffice.mime \
177 $(share_WORKDIR
)/%/openoffice.keys
$(share_WORKDIR
)/%/launcherlist
179 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),$(true
),CAT
,1)
180 echo
"#!/bin/sh" > $@
181 echo
"PREFIX=$(UNIXFILENAME.$*)" >> $@
182 echo
"ICON_PREFIX=$(UNIXFILENAME.$*)" >> $@
183 echo
"ICON_SOURCE_DIR=$(SRCDIR)/sysui/desktop/icons" >> $@
184 echo
"PRODUCTVERSION=$(PRODUCTVERSION)" >> $@
189 $(share_WORKDIR
)/%/launcherlist
: $(LAUNCHERS
)
191 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),$(true
),ECH
,1)
192 echo
"$(addsuffix .desktop,$(filter-out qstart,$(LAUNCHERLIST)))" > $@
195 $(share_WORKDIR
)/%/openoffice.applications
: $(share_SRCDIR
)/mimetypes
/openoffice.applications
197 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),$(true
),CAT
,1)
198 cat
$< | tr
-d
"\015" | sed
-e
"s/OFFICENAME/$(UNIXFILENAME.$*)/" -e
"s/%PRODUCTNAME/$(PRODUCTNAME.$*) $(PRODUCTVERSION.$*)/" > $@
200 $(share_WORKDIR
)/%/build.flag
: $(share_SRCDIR
)/share
/brand.pl
$(LAUNCHERS
) \
201 $(share_TRANSLATE
) $(addprefix $(share_WORKDIR
)/,$(ULFS
))
203 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),$(true
),PRL
,1)
204 $(PERL
) $(share_SRCDIR
)/share
/brand.pl
-p
'$${PRODUCTNAME} $${PRODUCTVERSION}' -u
$(UNIXFILENAME.
$*) \
206 --iconprefix
'$${UNIXBASISROOTNAME}-' $^
$(share_WORKDIR
)/$*
207 $(PERL
) $(share_TRANSLATE
) -p
$(PRODUCTNAME.
$*)$(PRODUCTVERSION
) -d
$(share_WORKDIR
)/$* \
208 --ext
"desktop" --key
"Comment" $(share_WORKDIR
)/launcher_comment.ulf
209 $(PERL
) $(share_TRANSLATE
) -p
$(PRODUCTNAME.
$*)$(PRODUCTVERSION
) -d
$(share_WORKDIR
)/$* \
210 --ext
"desktop" --key
"GenericName" $(share_WORKDIR
)/launcher_genericname.ulf
211 $(PERL
) $(share_TRANSLATE
) -p
$(PRODUCTNAME.
$*)$(PRODUCTVERSION
) -d
$(share_WORKDIR
)/$* \
212 --ext
"desktop" --key
"UnityQuickList" $(share_WORKDIR
)/launcher_unityquicklist.ulf
215 ifneq ($(WITH_LANG
),)
216 $(share_WORKDIR
)/%.ulf
: $(share_SRCDIR
)/share
/%.ulf |
$(call gb_Executable_get_runtime_dependencies
,ulfex
)
217 $(call gb_Output_announce
,$@
,$(true
),SUM
,1)
218 MERGEINPUT
=`$(gb_MKTEMP)` && \
219 echo
$(foreach lang
,$(gb_TRANS_LANGS
),$(gb_POLOCATION
)/$(lang
)/sysui
/desktop
/share.po
) > $${MERGEINPUT} && \
220 $(call gb_Helper_abbreviate_dirs
,\
221 $(call gb_Executable_get_command
,ulfex
) -i
$< -o
$@
-m
$${MERGEINPUT} -l
all ) && \
222 rm -rf
$${MERGEINPUT}
224 $(share_WORKDIR
)/%.ulf
: $(share_SRCDIR
)/share
/%.ulf
228 # vim: set noet sw=4 ts=4: