From b09f32dbdc97f2fdba810e1684deee2e9df479bc Mon Sep 17 00:00:00 2001 From: Kurt Zenker Date: Fri, 21 Jan 2005 10:23:55 +0000 Subject: [PATCH] INTEGRATION: CWS sysui03 (1.8.2); FILE MERGED 2005/01/11 07:56:05 obr 1.8.2.3: #i39755#,#i33855# Moved Solaris desktop integration into a single package. Moved the start scripts in /usr/bin into the desktop integration packages and made the module launchers symbolic links into the office installation. 2004/12/13 09:05:28 obr 1.8.2.2: RESYNC: (1.8-1.9); FILE MERGED 2004/12/10 08:40:36 obr 1.8.2.1: #i35819# gnome files now moved to /opt/gnome --- sysui/desktop/suse/makefile.mk | 90 ++++++++++++++++++---------------- 1 file changed, 47 insertions(+), 43 deletions(-) diff --git a/sysui/desktop/suse/makefile.mk b/sysui/desktop/suse/makefile.mk index 325f6c25926f..c7f9548bc933 100644 --- a/sysui/desktop/suse/makefile.mk +++ b/sysui/desktop/suse/makefile.mk @@ -72,16 +72,13 @@ TARGET=suse # --- Files -------------------------------------------------------- -ICONPREFIX = $(UNIXFILENAME:s/.//) +# GNOME does not like icon names with more than one '.' +ICONPREFIX = $(UNIXFILENAME:s/.//g) LAUNCHERLIST = writer calc draw impress math base printeradmin -LAUNCHERDEPN = ../menus/{$(LAUNCHERLIST)}.desktop +LAUNCHERDEPN = $(foreach,i,$(LAUNCHERLIST) $(UNIXFILENAME)-$i.desktop) LAUNCHERDIR = $(shell cd $(MISC)$/$(TARGET); pwd) -LAUNCHERFLAGFILES = \ - $(MISC)/$(TARGET)/opt/gnome2/share/applications.flag \ - $(MISC)/$(TARGET)/opt/kde3/share/applnk/Office.flag - MIMELIST = \ text \ text-template \ @@ -155,16 +152,20 @@ KDEICONLIST = \ .IF "$(RPM)"!="" -RPMFLAGFILE = $(MISC)$/$(TARGET).flag +PKGNAME=$(shell sed -n -e 's/^Name: //p' $(TARGET)-menus.spec) +RPMFILE=$(BIN)/noarch/$(PKGNAME)-$(PKGVERSION)-$(PKGREV).noarch.rpm RPMDEPN = \ - $(MISC)/$(TARGET)/opt/gnome2/share/applications.flag \ - $(MISC)/$(TARGET)/opt/kde3/share/applnk/Office.flag \ - $(MISC)/$(TARGET)/opt/gnome2/share/application-registry/$(UNIXFILENAME).applications \ - $(MISC)/$(TARGET)/opt/gnome2/share/mime-info/$(UNIXFILENAME).keys \ - $(MISC)/$(TARGET)/opt/gnome2/share/mime-info/$(UNIXFILENAME).mime \ + $(MISC)/$(TARGET)/etc/$(UNIXFILENAME) \ + $(MISC)/$(TARGET)/usr/bin/$(UNIXFILENAME) \ + $(MISC)/$(TARGET)/usr/bin/$(UNIXFILENAME)-printeradmin \ + $(MISC)/$(TARGET)/opt/gnome/share/applications/{$(LAUNCHERDEPN)} \ + $(MISC)/$(TARGET)/opt/kde3/share/applnk/Office/{$(LAUNCHERDEPN)} \ + $(MISC)/$(TARGET)/opt/gnome/share/application-registry/$(UNIXFILENAME).applications \ + $(MISC)/$(TARGET)/opt/gnome/share/mime-info/$(UNIXFILENAME).keys \ + $(MISC)/$(TARGET)/opt/gnome/share/mime-info/$(UNIXFILENAME).mime \ $(MISC)/$(TARGET)/opt/kde3/share/mimelnk/application.flag \ - $(MISC)/$(TARGET)/opt/gnome2/share/icons/gnome/{$(GNOMEICONLIST)} \ - $(MISC)/$(TARGET)/opt/gnome2/share/icons/{$(HCICONLIST)} \ + $(MISC)/$(TARGET)/opt/gnome/share/icons/gnome/{$(GNOMEICONLIST)} \ + $(MISC)/$(TARGET)/opt/gnome/share/icons/{$(HCICONLIST)} \ $(MISC)/$(TARGET)/opt/kde3/share/icons/{$(KDEICONLIST)} RPMDIR = $(shell cd $(BIN); pwd) @@ -178,37 +179,25 @@ ULFDIR = $(COMMONMISC)$/desktopshare .IF "$(RPM)"!="" -ALLTAR : $(RPMFLAGFILE) +ALLTAR : $(RPMFILE) # --- launcher ------------------------------------------------------ -# -# Copy/patch the .desktop files to the output tree and -# merge-in the translations. -# -$(LAUNCHERFLAGFILES) : $(LAUNCHERDEPN) ../productversion.mk ../share/brand.pl ../share/translate.pl $(ULFDIR)/launcher_name.ulf $(ULFDIR)/launcher_comment.ulf - @$(MKDIRHIER) $(@:db) - @echo Creating desktop entries .. - @echo --------------------------------- - @$(PERL) ../share/brand.pl -p "$(LONGPRODUCTNAME)" -u $(UNIXFILENAME) --prefix "$(UNIXFILENAME)-" --iconprefix "$(ICONPREFIX)-" $(LAUNCHERDEPN) $(@:db) - @$(PERL) ../share/translate.pl -p "$(LONGPRODUCTNAME)" -d $(@:db) --prefix "$(UNIXFILENAME)-" --ext "desktop" --key "Name" $(ULFDIR)/launcher_name.ulf - @$(PERL) ../share/translate.pl -p "$(LONGPRODUCTNAME)" -d $(@:db) --prefix "$(UNIXFILENAME)-" --ext "desktop" --key "Comment" $(ULFDIR)/launcher_comment.ulf -.IF "$(WITH_LIBSN)"=="YES" - @$(foreach,i,$(LAUNCHERLIST) $(shell echo "StartupNotify=true" >> $(@:db)/$(UNIXFILENAME)-$i.desktop)) -.ENDIF - @touch $@ +%.desktop : + @$(MKDIRHIER) $(@:d) + @ln -s $(subst,$(UNIXFILENAME)-, /etc/$(UNIXFILENAME)/share/xdg/$(@:f)) $@ # --- icons -------------------------------------------------------- # # This target is responsible for copying the GNOME icons to their package specific target -# e.g. $(LAUNCHERDIR)/opt/gnome2/share/icons/gnome/16x16/apps/openoffice-writer.png +# e.g. $(LAUNCHERDIR)/opt/gnome/share/icons/gnome/16x16/apps/openoffice-writer.png # -$(MISC)/$(TARGET)/opt/gnome2/share/icons/gnome/{$(GNOMEICONLIST)} : ../icons/hicolor/$$(@:d:d:d:d:f)/$$(@:d:d:f)/$$(@:f:s/$(ICONPREFIX)-//) +$(MISC)/$(TARGET)/opt/gnome/share/icons/gnome/{$(GNOMEICONLIST)} : ../icons/hicolor/$$(@:d:d:d:d:f)/$$(@:d:d:f)/$$(@:f:s/$(ICONPREFIX)-//) @$(MKDIRHIER) $(@:d) @$(COPY) $< $@ -$(MISC)/$(TARGET)/opt/gnome2/share/icons/{$(HCICONLIST)} : ../icons/$$(@:d:d:d:d:d:d:f)/$$(@:d:d:d:d:f)/$$(@:d:d:f)/$$(@:f:s/$(ICONPREFIX)-//) +$(MISC)/$(TARGET)/opt/gnome/share/icons/{$(HCICONLIST)} : ../icons/$$(@:d:d:d:d:d:d:f)/$$(@:d:d:d:d:f)/$$(@:d:d:f)/$$(@:f:s/$(ICONPREFIX)-//) @$(MKDIRHIER) $(@:d) @$(COPY) $< $@ @@ -218,7 +207,7 @@ $(MISC)/$(TARGET)/opt/kde3/share/icons/{$(KDEICONLIST)} : ../icons/$$(@:d:d:d:d: # --- mime types --------------------------------------------------- -$(MISC)/$(TARGET)/opt/gnome2/share/mime-info/$(UNIXFILENAME).keys : $(GNOMEMIMEDEPN) ../productversion.mk ../share/brand.pl ../share/translate.pl $(ULFDIR)/documents.ulf +$(MISC)/$(TARGET)/opt/gnome/share/mime-info/$(UNIXFILENAME).keys : $(GNOMEMIMEDEPN) ../productversion.mk ../share/brand.pl ../share/translate.pl $(ULFDIR)/documents.ulf @$(MKDIRHIER) $(@:d) @echo Creating GNOME .keys file .. @echo --------------------------------- @@ -226,7 +215,7 @@ $(MISC)/$(TARGET)/opt/gnome2/share/mime-info/$(UNIXFILENAME).keys : $(GNOMEMIMED @$(PERL) ../share/translate.pl -p $(PRODUCTNAME) -d $(MISC)/$(TARGET) --ext "keys" --key "description" $(ULFDIR)/documents.ulf @cat $(MISC)/$(TARGET)/{$(MIMELIST)}.keys > $@ -$(MISC)/$(TARGET)/opt/gnome2/share/mime-info/$(UNIXFILENAME).mime : ../mimetypes/openoffice.mime +$(MISC)/$(TARGET)/opt/gnome/share/mime-info/$(UNIXFILENAME).mime : ../mimetypes/openoffice.mime @$(MKDIRHIER) $(@:d) @echo Creating GNOME .mime file .. @echo --------------------------------- @@ -240,19 +229,34 @@ $(KDEMIMEFLAGFILE) : $(KDEMIMEDEPN) ../productversion.mk ../share/brand.pl ../sh @$(PERL) ../share/translate.pl -p "$(PRODUCTNAME)" -d $(@:db) --prefix "$(UNIXFILENAME)-" --ext "desktop" --key "Comment" $(ULFDIR)/documents.ulf @touch $@ -$(MISC)/$(TARGET)/opt/gnome2/share/application-registry/$(UNIXFILENAME).applications : ../productversion.mk ../mimetypes/openoffice.applications +$(MISC)/$(TARGET)/opt/gnome/share/application-registry/$(UNIXFILENAME).applications : ../productversion.mk ../mimetypes/openoffice.applications @$(MKDIRHIER) $(@:d) @echo Creating GNOME .applications file .. @echo --------------------------------- @cat ../mimetypes/openoffice.applications | tr -d "\015" | sed -e "s/openoffice/$(UNIXFILENAME)/" -e "s/%PRODUCTNAME/$(LONGPRODUCTNAME)/" > $@ -# --- packaging --------------------------------------------------- - -$(RPMFLAGFILE) : $(RPMDEPN) - @cat $(@:b)-menus.spec | tr -d "\015" | sed -e "s/%PREFIX/$(UNIXFILENAME)/" -e "s/%ICONPREFIX/$(ICONPREFIX)/" -e "s/Version: .*/Version: $(PKGVERSION)/" -e "s/Release: .*/Release: $(PKGREV)/" > $(@:db)-menus.spec - @echo "%define _rpmdir $(RPMDIR)" >> $(@:db)-menus.spec - @$(RPM) -bb $(@:db)-menus.spec --buildroot $(LAUNCHERDIR) --target noarch - +-chmod g+w $(BIN)$/noarch +# --- script ------------------------------------------------------ + +$(MISC)/$(TARGET)/usr/bin/$(UNIXFILENAME) : ../share/openoffice.sh + @$(MKDIRHIER) $(@:d) + @cat $< | tr -d "\015" | sed -e "s/%PREFIX/$(UNIXFILENAME)/g" > $@ + +$(MISC)/$(TARGET)/usr/bin/$(UNIXFILENAME)-printeradmin : ../share/printeradmin.sh + @$(MKDIRHIER) $(@:d) + @cat $< | tr -d "\015" | sed -e "s/%PREFIX/$(UNIXFILENAME)/g" > $@ + +$(MISC)/$(TARGET)/etc/$(UNIXFILENAME) : + @$(MKDIRHIER) $(@:d) @touch $@ +# --- packaging --------------------------------------------------- + +$(RPMFILE) : $(RPMDEPN) $(TARGET)-menus.spec + $(MKDIRHIER) $(@:d) + @cat $(TARGET)-menus.spec | tr -d "\015" | sed -e "s/%PREFIX/$(UNIXFILENAME)/g" \ + -e "s/%ICONPREFIX/$(ICONPREFIX)/" -e "s/Version: .*/Version: $(PKGVERSION)/" \ + -e "s/Release: .*/Release: $(PKGREV)/" > $(MISC)/$(TARGET)-menus.spec + @echo "%define _rpmdir $(RPMDIR)" >> $(MISC)/$(TARGET)-menus.spec + @$(RPM) -bb $(MISC)/$(TARGET)-menus.spec --buildroot $(LAUNCHERDIR) --target noarch + .ENDIF