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.py
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 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.sh \
125 $(product
)/create_tree.sh \
126 $(if
$(INTROSPECTION_SCANNER
),\
127 $(product
)/LOKDocView-0.1.gir \
128 $(product
)/LOKDocView-0.1.typelib
) \
129 $(product
)/launcherlist
) \
132 $(share_WORKDIR
)/%/openoffice.org.xml
: $(share_WORKDIR
)/documents.ulf
$(MIMEDESKTOPS
) $(share_SRCDIR
)/share
/create_mime_xml.pl
133 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),$(true
),PRL
,1)
134 $(call gb_Trace_StartRange
,$(subst $(WORKDIR
)/,,$@
),PRL
)
135 $(PERL
) $(share_SRCDIR
)/share
/create_mime_xml.pl
$< > $@
136 $(call gb_Trace_EndRange
,$(subst $(WORKDIR
)/,,$@
),PRL
)
138 $(share_WORKDIR
)/%/openoffice.sh
: $(share_SRCDIR
)/share
/openoffice.sh
140 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),$(true
),CAT
,1)
141 $(call gb_Trace_StartRange
,$(subst $(WORKDIR
)/,,$@
),CAT
)
142 cat
$< | tr
-d
"\015" | sed
-e
"s/%PREFIX/$(UNIXFILENAME.$*)/g" > $@
143 $(call gb_Trace_EndRange
,$(subst $(WORKDIR
)/,,$@
),CAT
)
145 $(share_WORKDIR
)/%/create_tree.sh
: $(share_SRCDIR
)/share
/create_tree.sh \
146 $(share_WORKDIR
)/%/openoffice.org.xml
$(share_WORKDIR
)/%/launcherlist
148 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),$(true
),CAT
,1)
149 $(call gb_Trace_StartRange
,$(subst $(WORKDIR
)/,,$@
),CAT
)
150 echo
"#!/bin/sh" > $@
151 echo
"PREFIX=$(UNIXFILENAME.$*)" >> $@
152 echo
"ICON_PREFIX=$(UNIXFILENAME.$*)" >> $@
153 echo
"ICON_SOURCE_DIR=$(SRCDIR)/sysui/desktop/icons" >> $@
154 echo
"APPDATA_SOURCE_DIR=$(SRCDIR)/sysui/desktop/appstream-appdata" >> $@
155 echo
"PRODUCTVERSION=$(PRODUCTVERSION)" >> $@
158 $(call gb_Trace_EndRange
,$(subst $(WORKDIR
)/,,$@
),CAT
)
160 # Generate gobject-introspection files
161 # These are *not* packaged in rpms because there's no good place to put them
162 # where the system will actually find them and where it won't conflict with a
163 # distro packaged LO; on Fedora 30 at least there's no /opt path in
165 ifneq ($(INTROSPECTION_SCANNER
),)
167 $(share_WORKDIR
)/%/LOKDocView-0.1.gir
: \
168 $(call gb_Library_get_target
,libreofficekitgtk
)
170 PYTHONWARNINGS
=default g-ir-scanner
"${SRCDIR}/include/LibreOfficeKit/LibreOfficeKitGtk.h" \
171 "${SRCDIR}/libreofficekit/source/gtk/lokdocview.cxx" \
172 `${PKG_CONFIG} --cflags gobject-introspection-1.0 gtk+-3.0` \
173 -I
"${SRCDIR}/include/" \
174 --include=GLib-2.0
--include=GObject-2.0
--include=Gio-2.0 \
175 --library
=libreofficekitgtk
--library-path
="${INSTDIR}/program" \
176 --include=Gdk-3.0
--include=GdkPixbuf-2.0
--include=Gtk-3.0 \
177 --namespace
=LOKDocView
--nsversion
=0.1 --identifier-prefix
=LOKDoc
--symbol-prefix
=lok_doc \
178 --c-include
="LibreOfficeKit/LibreOfficeKitGtk.h" \
179 --output
="$@" --warn-all
--no-libtool
181 $(share_WORKDIR
)/%/LOKDocView-0.1.typelib
: $(share_WORKDIR
)/%/LOKDocView-0.1.gir
182 g-ir-compiler
"$<" --output
="$@"
186 $(share_WORKDIR
)/%/launcherlist
: $(LAUNCHERS
)
188 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),$(true
),ECH
,1)
189 $(call gb_Trace_StartRange
,$(subst $(WORKDIR
)/,,$@
),ECH
)
190 echo
"$(addsuffix .desktop,$(LAUNCHERLIST))" > $@
191 $(call gb_Trace_EndRange
,$(subst $(WORKDIR
)/,,$@
),ECH
)
194 # these .desktop files are written by brand.pl below
195 # need to have a rule for these because they are targets in Package_share
196 define sysui_Desktop_rule
197 $(share_WORKDIR
)/%/$(1).desktop
: $(share_WORKDIR
)/%/build.flag
202 $(foreach launcher
,$(LAUNCHERLIST
),$(eval
$(call sysui_Desktop_rule
,$(launcher
))))
204 $(share_WORKDIR
)/%/build.flag
: $(share_SRCDIR
)/share
/brand.pl
$(LAUNCHERS
) \
205 $(share_TRANSLATE
) $(addprefix $(share_WORKDIR
)/,$(ULFS
)) \
206 $(call gb_ExternalExecutable_get_dependencies
,python
)
208 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),$(true
),PRL
,1)
209 $(call gb_Trace_StartRange
,$(subst $(WORKDIR
)/,,$@
),PRL
)
210 $(PERL
) $(share_SRCDIR
)/share
/brand.pl
-p
'$${PRODUCTNAME} $${PRODUCTVERSION}' -u
$(UNIXFILENAME.
$*) \
212 --iconprefix
'$${UNIXBASISROOTNAME}-' $(LAUNCHERS
) $(share_WORKDIR
)/$*
213 $(call gb_ExternalExecutable_get_command
,python
) $(share_TRANSLATE
) -p
$(PRODUCTNAME.
$*)$(PRODUCTVERSION
) -d
$(share_WORKDIR
)/$* \
214 --ext
"desktop" --key
"Comment" $(share_WORKDIR
)/launcher_comment.ulf
215 $(call gb_ExternalExecutable_get_command
,python
) $(share_TRANSLATE
) -p
$(PRODUCTNAME.
$*)$(PRODUCTVERSION
) -d
$(share_WORKDIR
)/$* \
216 --ext
"desktop" --key
"GenericName" $(share_WORKDIR
)/launcher_genericname.ulf
217 $(call gb_ExternalExecutable_get_command
,python
) $(share_TRANSLATE
) -p
$(PRODUCTNAME.
$*)$(PRODUCTVERSION
) -d
$(share_WORKDIR
)/$* \
218 --ext
"desktop" --key
"UnityQuickList" $(share_WORKDIR
)/launcher_unityquicklist.ulf
220 $(call gb_Trace_EndRange
,$(subst $(WORKDIR
)/,,$@
),PRL
)
222 $(eval
$(call gb_CustomTarget_ulfex_rule
,\
223 $(share_WORKDIR
)/%.ulf
,\
224 $(share_SRCDIR
)/share
/%.ulf
,\
225 $(foreach lang
,$(gb_TRANS_LANGS
),\
226 $(gb_POLOCATION
)/$(lang
)/sysui
/desktop
/share.po
)))
228 # vim: set noet sw=4 ts=4: