diff options
author | Petr Mladek <pmladek@suse.cz> | 2011-12-05 19:32:00 +0100 |
---|---|---|
committer | Petr Mladek <pmladek@suse.cz> | 2011-12-05 21:08:00 +0100 |
commit | 8412548e734ddf699ddbffba0cf7edeb2548c86c (patch) | |
tree | d43b7a9180796c627603bb2b26f4aa0c661897c7 /sysui | |
parent | bee2841519d15d8df1520ef3052e3a8da19eac1b (diff) |
allow to install desktop integration in Linux dev build
The desktop integration searched for the package name by the dash "-"
delimiter on many locations. It was not easy to add support for
package names with the dash.
In addition, there was an inconsistence. Most package names used the
"libo-dev" prefix name but the ure packages used "lodev". It was
installed into the prefix /opt/lo-dev.
So, I remaned everything to "lodev". It removed the inconsistence
and solved solution with the dash.
Diffstat (limited to 'sysui')
-rwxr-xr-x | sysui/desktop/freedesktop/freedesktop-menus.spec | 2 | ||||
-rwxr-xr-x | sysui/desktop/mandriva/mandriva-menus.spec | 2 | ||||
-rwxr-xr-x | sysui/desktop/productversion.mk | 7 | ||||
-rwxr-xr-x | sysui/desktop/share/create_tree.sh | 7 | ||||
-rwxr-xr-x | sysui/desktop/share/makefile.mk | 8 | ||||
-rwxr-xr-x | sysui/desktop/suse/suse-menus.spec | 2 |
6 files changed, 18 insertions, 10 deletions
diff --git a/sysui/desktop/freedesktop/freedesktop-menus.spec b/sysui/desktop/freedesktop/freedesktop-menus.spec index ba4b68d90a1d..d4efca5ed2b6 100755 --- a/sysui/desktop/freedesktop/freedesktop-menus.spec +++ b/sysui/desktop/freedesktop/freedesktop-menus.spec @@ -372,7 +372,7 @@ done # glibc breaks rpm unless rpm is build with internal glob-matching (issue 49374) # https://bugzilla.redhat.com/beta/show_bug.cgi?id=134362 %defattr(-, root, root) -%if "%unixfilename" != "libreoffice%productversion" +%if "%unixfilename" != "libreoffice%productversion" && "%unixfilename" != "lodev%productversion" # compat symlinks %attr(0755,root,root) /opt/%unixfilename %endif diff --git a/sysui/desktop/mandriva/mandriva-menus.spec b/sysui/desktop/mandriva/mandriva-menus.spec index 47f64ed226cb..0c1fb01e36c2 100755 --- a/sysui/desktop/mandriva/mandriva-menus.spec +++ b/sysui/desktop/mandriva/mandriva-menus.spec @@ -317,7 +317,7 @@ fi %files -%if "%unixfilename" != "libreoffice%productversion" +%if "%unixfilename" != "libreoffice%productversion" && "%unixfilename" != "lodev%productversion" # compat symlinks %attr(0755,root,root) /opt/%unixfilename %attr(0755,root,root) /usr/bin/libreoffice%productversion diff --git a/sysui/desktop/productversion.mk b/sysui/desktop/productversion.mk index 2e581d0f5107..cc790f86ae0e 100755 --- a/sysui/desktop/productversion.mk +++ b/sysui/desktop/productversion.mk @@ -65,6 +65,13 @@ PKGVERSION.libreoffice = $(PKGVERSION) UNIXFILENAME.libreoffice = $(PRODUCTNAME.libreoffice:l)$(PRODUCTVERSION.libreoffice) ICONPREFIX.libreoffice = $(UNIXFILENAME.libreoffice:s/.//g) +PRODUCTNAME.lodev = LibreOfficeDev +PRODUCTVERSION.lodev = $(PRODUCTVERSION) +PRODUCTVERSIONSHORT.lodev = $(PRODUCTVERSIONSHORT) +PKGVERSION.lodev = $(PKGVERSION) +UNIXFILENAME.lodev = lodev$(PRODUCTVERSION.lodev) +ICONPREFIX.lodev = $(UNIXFILENAME.lodev:s/.//g) + PRODUCTNAME.oxygenoffice = OxygenOffice PRODUCTVERSION.oxygenoffice = $(PRODUCTVERSION) PRODUCTVERSIONSHORT.oxygenoffice = $(PRODUCTVERSIONSHORT) diff --git a/sysui/desktop/share/create_tree.sh b/sysui/desktop/share/create_tree.sh index 141e9a10d4ea..2df81132a71a 100755 --- a/sysui/desktop/share/create_tree.sh +++ b/sysui/desktop/share/create_tree.sh @@ -53,7 +53,7 @@ ln -sf "${office_root}/program/soffice" "${DESTDIR}/usr/bin/${PREFIX}" cp printeradmin.sh "${DESTDIR}/usr/bin/${PREFIX}-printeradmin" chmod 0755 "${DESTDIR}/usr/bin/${PREFIX}-printeradmin" -if test "${PREFIX}" != libreoffice${PRODUCTVERSION} ; then +if test "${PREFIX}" != libreoffice${PRODUCTVERSION} -a "${PREFIX}" != lodev${PRODUCTVERSION} ; then # compat symlinks mkdir -p "${DESTDIR}${office_prefix}" ln -sf libreoffice${PRODUCTVERSION} "${DESTDIR}${office_root}" @@ -61,9 +61,10 @@ if test "${PREFIX}" != libreoffice${PRODUCTVERSION} ; then ln -sf /usr/bin/${PREFIX}-printeradmin "${DESTDIR}/usr/bin/libreoffice${PRODUCTVERSION}-printeradmin" fi +test "${PREFIX}" = lodev${PRODUCTVERSION} && mime_def_file="lodev${PRODUCTVERSION}.xml" || mime_def_file="libreoffice${PRODUCTVERSION}.xml" mkdir -p "${DESTDIR}/usr/share/mime/packages" -cp openoffice.org.xml "${DESTDIR}/usr/share/mime/packages/libreoffice${PRODUCTVERSION}.xml" -chmod 0644 "${DESTDIR}/usr/share/mime/packages/libreoffice${PRODUCTVERSION}.xml" +cp openoffice.org.xml "${DESTDIR}/usr/share/mime/packages/$mime_def_file" +chmod 0644 "${DESTDIR}/usr/share/mime/packages/$mime_def_file" mkdir -p "${DESTDIR}/usr/share/applications" for i in `cat launcherlist`; do diff --git a/sysui/desktop/share/makefile.mk b/sysui/desktop/share/makefile.mk index cfaa1ee1fdea..88954ae3f58a 100755 --- a/sysui/desktop/share/makefile.mk +++ b/sysui/desktop/share/makefile.mk @@ -150,7 +150,7 @@ $(LAUNCHERFLAGFILE) : $(LAUNCHERDEPN) @@-$(MKDIRHIER) $(@:db).$(INPATH).$(@:f) @echo Creating desktop entries for $(@:f) .. @echo --------------------------------- - @$(PERL) brand.pl -p '$${{PRODUCTNAME}} $${{PRODUCTVERSION}}' -u $(UNIXWRAPPERNAME) --iconprefix '$(ICONPREFIX.libreoffice)-' $< $(@:db).$(INPATH).$(@:f) + @$(PERL) brand.pl -p '$${{PRODUCTNAME}} $${{PRODUCTVERSION}}' -u $(UNIXWRAPPERNAME) --iconprefix '$(ICONPREFIX.$(@:d:d:f))-' $< $(@:db).$(INPATH).$(@:f) @$(PERL) translate.pl -p '$${{PRODUCTNAME}} $${{PRODUCTVERSION}}' -d $(@:db).$(INPATH).$(@:f) --ext "desktop" --key "Name" $(ULFDIR)$/launcher_name.ulf @$(PERL) translate.pl -p '$${{PRODUCTNAME}} $${{PRODUCTVERSION}}' -d $(@:db).$(INPATH).$(@:f) --ext "desktop" --key "Comment" $(ULFDIR)$/launcher_comment.ulf @$(PERL) translate.pl -p '$${{PRODUCTNAME}} $${{PRODUCTVERSION}}' -d $(@:db).$(INPATH).$(@:f) --ext "desktop" --key "GenericName" $(ULFDIR)$/launcher_genericname.ulf @@ -180,7 +180,7 @@ $(COMMONMISC)$/{$(PRODUCTLIST)}$/openoffice.keys : ../mimetypes/{$(MIMELIST)}.ke @@-$(MKDIRHIER) $(@:d) @echo Creating GNOME .keys file for $(@:d:d:f) .. @echo --------------------------------- - @$(PERL) brand.pl -p $(PRODUCTNAME.$(@:d:d:f)) -u $(UNIXFILENAME.$(@:d:d:f)) --iconprefix '$(ICONPREFIX.libreoffice)-' $< $(MISC)/$(@:d:d:f) + @$(PERL) brand.pl -p $(PRODUCTNAME.$(@:d:d:f)) -u $(UNIXFILENAME.$(@:d:d:f)) --iconprefix '$(ICONPREFIX.$(@:d:d:f))-' $< $(MISC)/$(@:d:d:f) @$(PERL) translate.pl -p $(PRODUCTNAME.$(@:d:d:f)) -d $(MISC)/$(@:d:d:f) --ext "keys" --key "description" $(ULFDIR)$/documents.ulf @cat $(MISC)/$(@:d:d:f)/{$(MIMELIST)}.keys > $@.$(INPATH) @mv -f $@.$(INPATH) $@ @@ -208,7 +208,7 @@ $(COMMONMISC)$/{$(PRODUCTLIST)}$/mimelnklist : ../mimetypes/{$(MIMELIST)}.deskto @@-$(MKDIRHIER) $(@:db).$(INPATH) @echo Creating KDE mimelnk entries for $(@:d:d:f) .. @echo --------------------------------- - @$(PERL) brand.pl -p "$(PRODUCTNAME.$(@:d:d:f))" -u $(UNIXFILENAME.$(@:d:d:f)) --iconprefix '$(ICONPREFIX.libreoffice)-' $< $(@:db).$(INPATH) + @$(PERL) brand.pl -p "$(PRODUCTNAME.$(@:d:d:f))" -u $(UNIXFILENAME.$(@:d:d:f)) --iconprefix '$(ICONPREFIX.$(@:d:d:f))-' $< $(@:db).$(INPATH) @$(PERL) ../share/translate.pl -p "$(PRODUCTNAME.$(@:d:d:f))" -d $(@:db).$(INPATH) --ext "desktop" --key "Comment" $(ULFDIR)$/documents.ulf @mv -f $(@:db).$(INPATH)/* $(@:d) @rmdir $(@:db).$(INPATH) @@ -222,7 +222,7 @@ $(COMMONMISC)$/{$(PRODUCTLIST)}$/create_tree.sh : $$(@:f) @@-$(MKDIRHIER) $(@:d) @echo "#!/bin/bash" > $@.$(INPATH) @echo "PREFIX=$(UNIXFILENAME.$(@:d:d:f))" >> $@.$(INPATH) - @echo "ICON_PREFIX=$(ICONPREFIX.libreoffice)" >> $@.$(INPATH) + @echo "ICON_PREFIX=$(ICONPREFIX.$(@:d:d:f))" >> $@.$(INPATH) @echo "ICON_SOURCE_DIR=../../../desktop/icons" >> $@.$(INPATH) @echo "PRODUCTVERSION=$(PRODUCTVERSION.$(@:d:d:f))" >> $@.$(INPATH) @cat $< >> $@.$(INPATH) diff --git a/sysui/desktop/suse/suse-menus.spec b/sysui/desktop/suse/suse-menus.spec index 933a3ae2c71c..ea5ae3187eba 100755 --- a/sysui/desktop/suse/suse-menus.spec +++ b/sysui/desktop/suse/suse-menus.spec @@ -338,7 +338,7 @@ for themedir in /opt/gnome/share/icons/gnome /opt/gnome/share/icons/hicolor /opt done %files -%if "%unixfilename" != "libreoffice%productversion" +%if "%unixfilename" != "libreoffice%productversion" && "%unixfilename" != "lodev%productversion" # compat symlinks %attr(0755,root,root) /opt/%unixfilename %attr(0755,root,root) /usr/bin/libreoffice%productversion |