1#************************************************************** 2# 3# Licensed to the Apache Software Foundation (ASF) under one 4# or more contributor license agreements. See the NOTICE file 5# distributed with this work for additional information 6# regarding copyright ownership. The ASF licenses this file 7# to you under the Apache License, Version 2.0 (the 8# "License"); you may not use this file except in compliance 9# with the License. You may obtain a copy of the License at 10# 11# http://www.apache.org/licenses/LICENSE-2.0 12# 13# Unless required by applicable law or agreed to in writing, 14# software distributed under the License is distributed on an 15# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16# KIND, either express or implied. See the License for the 17# specific language governing permissions and limitations 18# under the License. 19# 20#************************************************************** 21 22 23 24PRJ=..$/.. 25 26PRJNAME=sysui 27TARGET=desktopshare 28 29# --- Settings ----------------------------------------------------- 30 31.INCLUDE : settings.mk 32 33# --- Product Version Information ---------------------------------- 34 35.INCLUDE : ../productversion.mk 36 37# --- Files -------------------------------------------------------- 38 39.IF "$(WITH_LANG)"!="" 40ULFDIR:=$(COMMONMISC)$/$(TARGET) 41.ELSE # "$(WITH_LANG)"!="" 42ULFDIR:=. 43.ENDIF # "$(WITH_LANG)"!="" 44 45ULFFILES= \ 46 documents.ulf \ 47 launcher_comment.ulf \ 48 launcher_genericname.ulf \ 49 launcher_name.ulf 50 51LAUNCHERLIST = writer calc draw impress math base printeradmin qstart startcenter javafilter 52LAUNCHERDEPN = ../menus/{$(LAUNCHERLIST)}.desktop 53 54LAUNCHERFLAGFILE = $(COMMONMISC)/$(TARGET)/xdg.flag 55 56MIMELIST = \ 57 text \ 58 text-template \ 59 spreadsheet \ 60 spreadsheet-template \ 61 drawing \ 62 drawing-template \ 63 presentation \ 64 presentation-template \ 65 formula \ 66 master-document \ 67 oasis-text \ 68 oasis-text-template \ 69 oasis-spreadsheet \ 70 oasis-spreadsheet-template \ 71 oasis-drawing \ 72 oasis-drawing-template \ 73 oasis-presentation \ 74 oasis-presentation-template \ 75 oasis-formula \ 76 oasis-master-document \ 77 oasis-database \ 78 oasis-web-template \ 79 ms-excel-sheet-12 \ 80 ms-excel-sheet \ 81 ms-excel-template-12 \ 82 ms-powerpoint-presentation-12 \ 83 ms-powerpoint-presentation \ 84 ms-powerpoint-template-12 \ 85 ms-word-document-12 \ 86 ms-word-document \ 87 ms-word-document2 \ 88 ms-word-template-12 \ 89 openxmlformats-officedocument-presentationml-presentation \ 90 openxmlformats-officedocument-presentationml-template \ 91 openxmlformats-officedocument-spreadsheetml-sheet \ 92 openxmlformats-officedocument-spreadsheetml-template \ 93 openxmlformats-officedocument-wordprocessingml-document \ 94 openxmlformats-officedocument-wordprocessingml-template \ 95 ms-excel-sheet-binary-12 \ 96 extension 97 98MIMEICONLIST = \ 99 oasis-text \ 100 oasis-text-template \ 101 oasis-spreadsheet \ 102 oasis-spreadsheet-template \ 103 oasis-drawing \ 104 oasis-drawing-template \ 105 oasis-presentation \ 106 oasis-presentation-template \ 107 oasis-formula \ 108 oasis-master-document \ 109 oasis-database \ 110 oasis-web-template \ 111 text \ 112 text-template \ 113 spreadsheet \ 114 spreadsheet-template \ 115 drawing \ 116 drawing-template \ 117 presentation \ 118 presentation-template \ 119 formula \ 120 master-document \ 121 database \ 122 extension 123 124ICONDEPN = \ 125 ../icons/hicolor/{16x16 32x32 48x48}/apps/{$(LAUNCHERLIST:s/qstart//:s/javafilter//)}.png \ 126 ../icons/hicolor/{16x16 32x32 48x48}/mimetypes/{$(MIMEICONLIST)}.png \ 127 ../icons/locolor/{16x16 32x32}/apps/{$(LAUNCHERLIST:s/qstart//:s/javafilter//)}.png \ 128 ../icons/locolor/{16x16 32x32}/mimetypes/{$(MIMEICONLIST)}.png 129 130# --- Targets ------------------------------------------------------ 131 132.INCLUDE : target.mk 133 134.IF "$(GUI)"=="UNX" 135ALLTAR : $(LAUNCHERFLAGFILE) $(SPECFILES) $(COMMONMISC)$/{$(PRODUCTLIST)}$/build.flag 136 137.ENDIF # "$(GUI)"=="UNIX" 138 139# 140# Copy/patch the .desktop files to the output tree and 141# merge-in the translations. 142# 143 144$(LAUNCHERFLAGFILE) : ../productversion.mk brand.pl translate.pl $(ULFDIR)$/launcher_name.ulf $(ULFDIR)$/launcher_comment.ulf $(ULFDIR)/launcher_genericname.ulf 145$(LAUNCHERFLAGFILE) : $(LAUNCHERDEPN) 146 @@-$(MKDIRHIER) $(@:db).$(INPATH).$(@:f) 147 @echo Creating desktop entries for $(@:f) .. 148 @echo --------------------------------- 149 @$(PERL) brand.pl -p '$${{PRODUCTNAME}} $${{PRODUCTVERSION}}' -u $(UNIXWRAPPERNAME) --iconprefix '$${{WITHOUTDOTUNIXPRODUCTNAME}}${ICONVERSION}-' $< $(@:db).$(INPATH).$(@:f) 150 @$(PERL) translate.pl -p '$${{PRODUCTNAME}} $${{PRODUCTVERSION}}' -d $(@:db).$(INPATH).$(@:f) --ext "desktop" --key "Name" $(ULFDIR)$/launcher_name.ulf 151 @$(PERL) translate.pl -p '$${{PRODUCTNAME}} $${{PRODUCTVERSION}}' -d $(@:db).$(INPATH).$(@:f) --ext "desktop" --key "Comment" $(ULFDIR)$/launcher_comment.ulf 152 @$(PERL) translate.pl -p '$${{PRODUCTNAME}} $${{PRODUCTVERSION}}' -d $(@:db).$(INPATH).$(@:f) --ext "desktop" --key "GenericName" $(ULFDIR)$/launcher_genericname.ulf 153 @$(MV) -f $(@:db).$(INPATH).$(@:f)/* $(@:d) 154 @rmdir $(@:db).$(INPATH).$(@:f) 155 @touch $@ 156 157# 158# Create shared mime info xml file 159# 160$(COMMONMISC)$/{$(PRODUCTLIST)}$/openoffice.org.xml : ../mimetypes/{$(MIMELIST)}.desktop create_mime_xml.pl 161$(COMMONMISC)$/{$(PRODUCTLIST)}$/openoffice.org.xml : $(ULFDIR)$/documents.ulf 162 @echo Create shared mime info xml file .. 163 @echo --------------------------------- 164 @$(PERL) create_mime_xml.pl $< > $@.$(INPATH) 165 @mv -f $@.$(INPATH) $@ 166 167# 168# Create GNOME mime-info files 169# 170 171$(COMMONMISC)$/{$(PRODUCTLIST)}$/openoffice.keys : ../mimetypes/openoffice.mime brand.pl translate.pl ../productversion.mk $(ULFDIR)$/documents.ulf 172$(COMMONMISC)$/{$(PRODUCTLIST)}$/openoffice.keys : ../mimetypes/{$(MIMELIST)}.keys 173 @@-$(MKDIRHIER) $(@:d) 174 @echo Creating GNOME .keys file for $(@:d:d:f) .. 175 @echo --------------------------------- 176 @$(PERL) brand.pl -p $(PRODUCTNAME.$(@:d:d:f)) -u $(UNIXFILENAME.$(@:d:d:f)) --iconprefix "$(ICONPREFIX.$(@:d:d:f))-" $< $(MISC)/$(@:d:d:f) 177 @$(PERL) translate.pl -p $(PRODUCTNAME.$(@:d:d:f)) -d $(MISC)/$(@:d:d:f) --ext "keys" --key "description" $(ULFDIR)$/documents.ulf 178 @cat $(MISC)/$(@:d:d:f)/{$(MIMELIST)}.keys > $@.$(INPATH) 179 @mv -f $@.$(INPATH) $@ 180 181$(COMMONMISC)$/{$(PRODUCTLIST)}$/openoffice.mime : ../mimetypes/$$(@:f) 182 @@-$(MKDIRHIER) $(@:d) 183 @echo Creating GNOME .mime file for $(@:d:d:f) .. 184 @echo --------------------------------- 185 @cat $< | tr -d "\015" > $@.$(INPATH) 186 @mv -f $@.$(INPATH) $@ 187 188$(COMMONMISC)$/{$(PRODUCTLIST)}$/openoffice.applications : ../productversion.mk 189$(COMMONMISC)$/{$(PRODUCTLIST)}$/openoffice.applications : ../mimetypes/$$(@:f) 190 @@-$(MKDIRHIER) $(@:d) 191 @echo Creating GNOME .applications file for $(@:d:d:f) .. 192 @echo --------------------------------- 193 @cat $< | tr -d "\015" | sed -e "s/OFFICENAME/$(UNIXFILENAME.$(@:d:d:f))/" -e "s/%PRODUCTNAME/$(PRODUCTNAME.$(@:d:d:f)) $(PRODUCTVERSION.$(@:d:d:f))/" > $@.$(INPATH) 194 @mv -f $@.$(INPATH) $@ 195 196# 197# Create KDE mimelnk files 198# 199$(COMMONMISC)$/{$(PRODUCTLIST)}$/mimelnklist : brand.pl translate.pl ../productversion.mk $(ULFDIR)$/documents.ulf 200$(COMMONMISC)$/{$(PRODUCTLIST)}$/mimelnklist : ../mimetypes/{$(MIMELIST)}.desktop 201 @@-$(MKDIRHIER) $(@:db).$(INPATH) 202 @echo Creating KDE mimelnk entries for $(@:d:d:f) .. 203 @echo --------------------------------- 204 @$(PERL) brand.pl -p "$(PRODUCTNAME.$(@:d:d:f))" -u $(UNIXFILENAME.$(@:d:d:f)) --iconprefix "$(ICONPREFIX.$(@:d:d:f))-" $< $(@:db).$(INPATH) 205 @$(PERL) ../share/translate.pl -p "$(PRODUCTNAME.$(@:d:d:f))" -d $(@:db).$(INPATH) --ext "desktop" --key "Comment" $(ULFDIR)$/documents.ulf 206 @mv -f $(@:db).$(INPATH)/* $(@:d) 207 @rmdir $(@:db).$(INPATH) 208 @echo "{$(MIMELIST)}.desktop" > $@ 209 210# 211# Generate customized install scripts 212# 213$(COMMONMISC)$/{$(PRODUCTLIST)}$/create_tree.sh : makefile.mk 214$(COMMONMISC)$/{$(PRODUCTLIST)}$/create_tree.sh : $$(@:f) 215 @@-$(MKDIRHIER) $(@:d) 216 @echo "#\!/bin/sh" > $@.$(INPATH) 217 @echo "PREFIX=$(UNIXFILENAME.$(@:d:d:f))" >> $@.$(INPATH) 218 @echo "ICON_PREFIX=$(ICONPREFIX.$(@:d:d:f))" >> $@.$(INPATH) 219 @echo "ICON_SOURCE_DIR=../../../desktop/icons" >> $@.$(INPATH) 220 @cat $< >> $@.$(INPATH) 221 @chmod 774 $@.$(INPATH) 222 @mv -f $@.$(INPATH) $@ 223 224# 225# Create skript files 226# 227 228$(COMMONMISC)$/{$(PRODUCTLIST)}$/{openoffice printeradmin}.sh : ../productversion.mk 229$(COMMONMISC)$/{$(PRODUCTLIST)}$/{openoffice printeradmin}.sh : $$(@:f) 230 @@-$(MKDIRHIER) $(@:d) 231 @cat $< | tr -d "\015" | sed -e "s/%PREFIX/$(UNIXFILENAME.$(@:d:d:f))/g" > $@.$(INPATH) 232 @mv -f $@.$(INPATH) $@ 233 234# 235# Launcher list 236# 237 238$(COMMONMISC)$/{$(PRODUCTLIST)}$/launcherlist : $(LAUNCHERDEPN) 239 @@-$(MKDIRHIER) $(@:d) 240 @echo "{$(LAUNCHERLIST:s/qstart//)}.desktop" >$@.$(INPATH) 241 @mv -f $@.$(INPATH) $@ 242 243# 244# Flagfile 245# 246$(COMMONMISC)$/{$(PRODUCTLIST)}$/build.flag : $(ICONDEPN) \ 247 $(COMMONMISC)$/{$(PRODUCTLIST)}$/launcherlist \ 248 $(COMMONMISC)$/{$(PRODUCTLIST)}$/mimelnklist \ 249 $(COMMONMISC)$/{$(PRODUCTLIST)}$/create_tree.sh \ 250 $(COMMONMISC)$/{$(PRODUCTLIST)}$/openoffice.keys \ 251 $(COMMONMISC)$/{$(PRODUCTLIST)}$/openoffice.mime \ 252 $(COMMONMISC)$/{$(PRODUCTLIST)}$/openoffice.org.xml \ 253 $(COMMONMISC)$/{$(PRODUCTLIST)}$/openoffice.applications \ 254 $(COMMONMISC)$/{$(PRODUCTLIST)}$/{openoffice printeradmin}.sh 255 @touch $@ 256 257