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