[Libreoffice-commits] .: 3 commits - solenv/bin sysui/desktop
Petr Mladek
pmladek at kemper.freedesktop.org
Tue Dec 20 11:02:27 PST 2011
solenv/bin/ooinstall | 9 +++++++++
sysui/desktop/debian/makefile.mk | 20 ++++++++++----------
sysui/desktop/productversion.mk | 6 +++---
sysui/desktop/share/makefile.mk | 2 +-
sysui/desktop/slackware/makefile.mk | 20 ++++++++++----------
5 files changed, 33 insertions(+), 24 deletions(-)
New commits:
commit 6703e91a745c78c2acf1beedfc55f7916d026ef9
Author: Petr Mladek <pmladek at suse.cz>
Date: Tue Dec 20 19:43:21 2011 +0100
avoid the hardcoded 3.4 version
diff --git a/sysui/desktop/debian/makefile.mk b/sysui/desktop/debian/makefile.mk
index 45e0f33..f6ae363 100755
--- a/sysui/desktop/debian/makefile.mk
+++ b/sysui/desktop/debian/makefile.mk
@@ -45,7 +45,7 @@ TARGET=debian
.IF "$(PKGFORMAT)"!="$(PKGFORMAT:s/deb//)"
-DEBFILES=$(foreach,i,{$(PRODUCTLIST)} $(PKGDIR)$/$i3.4-$(TARGET)-menus_$(PKGVERSION.$i)-$(PKGREV)_all.deb)
+DEBFILES=$(foreach,i,{$(PRODUCTLIST)} $(PKGDIR)$/$i$(PRODUCTVERSION)-$(TARGET)-menus_$(PKGVERSION.$i)-$(PKGREV)_all.deb)
.ENDIF
@@ -60,22 +60,22 @@ ALLTAR : $(DEBFILES)
%/DEBIAN/control : $$(@:f)
@$(MKDIRHIER) $(@:d) $*$/etc $*$/usr/share/applnk/Office $*$/usr/lib/menu
- ln -sf /opt/$(UNIXFILENAME.$(*:f:s/-/ /:1:s/3.4//)) $*$/etc$/
- /bin/sh -c -x "cd $(COMMONMISC)$/$(*:f:s/-/ /:1:s/3.4//) && DESTDIR=$(shell @cd $*; pwd) ICON_PREFIX=$(ICONPREFIX) KDEMAINDIR=/usr GNOMEDIR=/usr create_tree.sh"
- @cat openoffice.org-debian-menus | sed -e 's/%PRODUCTNAME/$(PRODUCTNAME.$(*:f:s/-/ /:1:s/3.4//)) $(PRODUCTVERSION.$(*:f:s/-/ /:1:s/3.4//))/' -e 's/%PREFIX/$(UNIXFILENAME.$(*:f:s/-/ /:1:s/3.4//))/' -e 's/%ICONPREFIX/$(ICONPREFIX.$(*:f:s/-/ /:1:s/3.4//))/' > $*$/usr/lib/menu/$(*:f:s/_/ /:1:s/3.4//)
- echo "Package: $(*:f:s/_/ /:1:s/3.4//)" > $@
- cat $(@:f) | tr -d "\015" | sed "s/%productname/$(PRODUCTNAME.$(*:f:s/-/ /:1:s/3.4//))/" >> $@
- echo "Version: $(PKGVERSION.$(*:f:s/-/ /:1:s/3.4//))-$(PKGREV)" >> $@
+ ln -sf /opt/$(UNIXFILENAME.$(*:f:s/-/ /:1:s/$(PRODUCTVERSION)//)) $*$/etc$/
+ /bin/sh -c -x "cd $(COMMONMISC)$/$(*:f:s/-/ /:1:s/$(PRODUCTVERSION)//) && DESTDIR=$(shell @cd $*; pwd) ICON_PREFIX=$(ICONPREFIX) KDEMAINDIR=/usr GNOMEDIR=/usr create_tree.sh"
+ @cat openoffice.org-debian-menus | sed -e 's/%PRODUCTNAME/$(PRODUCTNAME.$(*:f:s/-/ /:1:s/$(PRODUCTVERSION)//)) $(PRODUCTVERSION.$(*:f:s/-/ /:1:s/$(PRODUCTVERSION)//))/' -e 's/%PREFIX/$(UNIXFILENAME.$(*:f:s/-/ /:1:s/$(PRODUCTVERSION)//))/' -e 's/%ICONPREFIX/$(ICONPREFIX.$(*:f:s/-/ /:1:s/$(PRODUCTVERSION)//))/' > $*$/usr/lib/menu/$(*:f:s/_/ /:1:s/$(PRODUCTVERSION)//)
+ echo "Package: $(*:f:s/_/ /:1:s/$(PRODUCTVERSION)//)" > $@
+ cat $(@:f) | tr -d "\015" | sed "s/%productname/$(PRODUCTNAME.$(*:f:s/-/ /:1:s/$(PRODUCTVERSION)//))/" >> $@
+ echo "Version: $(PKGVERSION.$(*:f:s/-/ /:1:s/$(PRODUCTVERSION)//))-$(PKGREV)" >> $@
@du -k -s $* | awk -F ' ' '{ printf "Installed-Size: %s\n", $$1 ; }' >> $@
%/DEBIAN/postinst : $$(@:f)
- @cat $< | tr -d "\015" | sed -e "s/%PREFIX/$(UNIXFILENAME.$(*:f:s/-/ /:1:s/3.4//))/g" > $@
+ @cat $< | tr -d "\015" | sed -e "s/%PREFIX/$(UNIXFILENAME.$(*:f:s/-/ /:1:s/$(PRODUCTVERSION)//))/g" > $@
%/DEBIAN/postrm : $$(@:f)
- @cat $< | tr -d "\015" | sed -e "s/%PREFIX/$(UNIXFILENAME.$(*:f:s/-/ /:1:s/3.4//))/g" > $@
+ @cat $< | tr -d "\015" | sed -e "s/%PREFIX/$(UNIXFILENAME.$(*:f:s/-/ /:1:s/$(PRODUCTVERSION)//))/g" > $@
%/DEBIAN/prerm : $$(@:f)
- @cat $< | tr -d "\015" | sed -e "s/%PREFIX/$(UNIXFILENAME.$(*:f:s/-/ /:1:s/3.4//))/g" > $@
+ @cat $< | tr -d "\015" | sed -e "s/%PREFIX/$(UNIXFILENAME.$(*:f:s/-/ /:1:s/$(PRODUCTVERSION)//))/g" > $@
# --- packaging ---------------------------------------------------
diff --git a/sysui/desktop/slackware/makefile.mk b/sysui/desktop/slackware/makefile.mk
index 4da439e..f75fdf3 100755
--- a/sysui/desktop/slackware/makefile.mk
+++ b/sysui/desktop/slackware/makefile.mk
@@ -40,7 +40,7 @@ TARGET=slackware
# --- Files --------------------------------------------------------
-MENUFILES=$(PKGDIR)$/{$(PRODUCTLIST)}3.4-$(TARGET)-menus-$(PKGVERSION)-noarch-$(PKGREV).tgz
+MENUFILES=$(PKGDIR)$/{$(PRODUCTLIST)}$(PRODUCTVERSION)-$(TARGET)-menus-$(PKGVERSION)-noarch-$(PKGREV).tgz
# --- Targets -------------------------------------------------------
@@ -59,26 +59,26 @@ $(MISC)/$(TARGET)/usr/share/applications/ :
# FIXME: removal of *-extension.* only to create identical packages to OOF680
%/usr/share/applications :
@$(MKDIRHIER) $@
- /bin/sh -c "cd $(COMMONMISC)$/$(*:b:s/-/ /:1:s/3.4//); DESTDIR=$(shell @cd $*; pwd) GNOMEDIR="" ICON_PREFIX=$(ICONPREFIX.$(*:b:s/-/ /:1:s/3.4//)) KDEMAINDIR=/opt/kde .$/create_tree.sh"
+ /bin/sh -c "cd $(COMMONMISC)$/$(*:b:s/-/ /:1:s/$(PRODUCTVERSION)//); DESTDIR=$(shell @cd $*; pwd) GNOMEDIR="" ICON_PREFIX=$(ICONPREFIX.$(*:b:s/-/ /:1:s/$(PRODUCTVERSION)//)) KDEMAINDIR=/opt/kde .$/create_tree.sh"
$(RM) $*$/opt$/kde$/share$/icons$/*$/*$/*$/*-extension.png
$(RM) $*$/opt$/kde$/share$/mimelnk$/application$/*-extension.desktop
$(RM) $*$/usr$/share$/applications$/*.desktop
$(RM) $*$/usr$/bin$/soffice
%$/install$/doinst.sh : update-script
- @echo "( cd etc ; rm -rf $(UNIXFILENAME.$(*:b:s/-/ /:1:s/3.4//)) )" > $@
- @echo "( cd etc ; ln -snf /opt/$(UNIXFILENAME.$(*:b:s/-/ /:1:s/3.4//):s/-//) $(UNIXFILENAME.$(*:b:s/-/ /:1:s/3.4//)) )" >> $@
+ @echo "( cd etc ; rm -rf $(UNIXFILENAME.$(*:b:s/-/ /:1:s/$(PRODUCTVERSION)//)) )" > $@
+ @echo "( cd etc ; ln -snf /opt/$(UNIXFILENAME.$(*:b:s/-/ /:1:s/$(PRODUCTVERSION)//):s/-//) $(UNIXFILENAME.$(*:b:s/-/ /:1:s/$(PRODUCTVERSION)//)) )" >> $@
@echo "( cd usr/bin ; rm -rf soffice )" >> $@
- @echo "( cd usr/bin ; ln -sf /etc/$(UNIXFILENAME.$(*:b:s/-/ /:1:s/3.4//))/program/soffice soffice )" >> $@
- @echo -e $(foreach,i,$(shell @cat $(COMMONMISC)$/$(*:b:s/-/ /:1:s/3.4//)/launcherlist) "\n( cd usr/share/applications ; rm -rf $(UNIXFILENAME.$(*:b:s/-/ /:1:s/3.4//))-$i )\n( cd usr/share/applications ; ln -sf /etc/$(UNIXFILENAME.$(*:b:s/-/ /:1:s/3.4//))/share/xdg/$i $(UNIXFILENAME.$(*:b:s/-/ /:1:s/3.4//))-$i )") >> $@
+ @echo "( cd usr/bin ; ln -sf /etc/$(UNIXFILENAME.$(*:b:s/-/ /:1:s/$(PRODUCTVERSION)//))/program/soffice soffice )" >> $@
+ @echo -e $(foreach,i,$(shell @cat $(COMMONMISC)$/$(*:b:s/-/ /:1:s/$(PRODUCTVERSION)//)/launcherlist) "\n( cd usr/share/applications ; rm -rf $(UNIXFILENAME.$(*:b:s/-/ /:1:s/$(PRODUCTVERSION)//))-$i )\n( cd usr/share/applications ; ln -sf /etc/$(UNIXFILENAME.$(*:b:s/-/ /:1:s/$(PRODUCTVERSION)//))/share/xdg/$i $(UNIXFILENAME.$(*:b:s/-/ /:1:s/$(PRODUCTVERSION)//))-$i )") >> $@
@cat $< >> $@
%$/install$/slack-desc : slack-desc
@$(MKDIRHIER) $(@:d)
- @sed -e "s/PKGNAME/$(*:b:s/-/ /:1:s/3.4//)-$(TARGET)-menus/g" -e "s/PKGVERSION/$(PKGVERSION.$(*:b:s/-/ /:1:s/3.4//))/g" \
- -e "s/LONGPRODUCTNAME/$(PRODUCTNAME.$(*:b:s/-/ /:1:s/3.4//)) $(PRODUCTVERSION.$(*:b:s/-/ /:1:s/3.4//))/g" \
- -e "s/PRODUCTNAME/$(PRODUCTNAME.$(*:b:s/-/ /:1:s/3.4//))/g" \
- -e "s/UNIXFILENAME/$(UNIXFILENAME.$(*:b:s/-/ /:1:s/3.4//))/g" $< > $@
+ @sed -e "s/PKGNAME/$(*:b:s/-/ /:1:s/$(PRODUCTVERSION)//)-$(TARGET)-menus/g" -e "s/PKGVERSION/$(PKGVERSION.$(*:b:s/-/ /:1:s/$(PRODUCTVERSION)//))/g" \
+ -e "s/LONGPRODUCTNAME/$(PRODUCTNAME.$(*:b:s/-/ /:1:s/$(PRODUCTVERSION)//)) $(PRODUCTVERSION.$(*:b:s/-/ /:1:s/$(PRODUCTVERSION)//))/g" \
+ -e "s/PRODUCTNAME/$(PRODUCTNAME.$(*:b:s/-/ /:1:s/$(PRODUCTVERSION)//))/g" \
+ -e "s/UNIXFILENAME/$(UNIXFILENAME.$(*:b:s/-/ /:1:s/$(PRODUCTVERSION)//))/g" $< > $@
# needed to satisfy the slackware package tools - they need
# the entries like this
commit 9d94cd46ed8921ac6a459c125be3edad57f04a4e
Author: Petr Mladek <pmladek at suse.cz>
Date: Tue Dec 20 19:39:57 2011 +0100
set correct icon names in desktop files
also use icon names *3.5* instead of *35*; this version is used on another
locations as well; it allows to reuse the UNIXBASISROOTNAME variable that
is substituted by the installer
diff --git a/sysui/desktop/productversion.mk b/sysui/desktop/productversion.mk
index cc790f8..398241d 100755
--- a/sysui/desktop/productversion.mk
+++ b/sysui/desktop/productversion.mk
@@ -63,18 +63,18 @@ PRODUCTVERSION.libreoffice = $(PRODUCTVERSION)
PRODUCTVERSIONSHORT.libreoffice = $(PRODUCTVERSIONSHORT)
PKGVERSION.libreoffice = $(PKGVERSION)
UNIXFILENAME.libreoffice = $(PRODUCTNAME.libreoffice:l)$(PRODUCTVERSION.libreoffice)
-ICONPREFIX.libreoffice = $(UNIXFILENAME.libreoffice:s/.//g)
+ICONPREFIX.libreoffice = $(UNIXFILENAME.libreoffice)
PRODUCTNAME.lodev = LibreOfficeDev
PRODUCTVERSION.lodev = $(PRODUCTVERSION)
PRODUCTVERSIONSHORT.lodev = $(PRODUCTVERSIONSHORT)
PKGVERSION.lodev = $(PKGVERSION)
UNIXFILENAME.lodev = lodev$(PRODUCTVERSION.lodev)
-ICONPREFIX.lodev = $(UNIXFILENAME.lodev:s/.//g)
+ICONPREFIX.lodev = $(UNIXFILENAME.lodev)
PRODUCTNAME.oxygenoffice = OxygenOffice
PRODUCTVERSION.oxygenoffice = $(PRODUCTVERSION)
PRODUCTVERSIONSHORT.oxygenoffice = $(PRODUCTVERSIONSHORT)
PKGVERSION.oxygenoffice = $(PKGVERSION)
UNIXFILENAME.oxygenoffice = $(PRODUCTNAME.oxygenoffice:l)$(PRODUCTVERSION.oxygenoffice)
-ICONPREFIX.oxygenoffice = $(UNIXFILENAME.oxygenoffice:s/.//g)
+ICONPREFIX.oxygenoffice = $(UNIXFILENAME.oxygenoffice)
diff --git a/sysui/desktop/share/makefile.mk b/sysui/desktop/share/makefile.mk
index 88954ae..f6a34b1 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.$(@:d:d:f))-' $< $(@:db).$(INPATH).$(@:f)
+ @$(PERL) brand.pl -p '$${{PRODUCTNAME}} $${{PRODUCTVERSION}}' -u $(UNIXWRAPPERNAME) --iconprefix '$${{UNIXBASISROOTNAME}}-' $< $(@: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
commit ec9230598eaa507a4e8971f20d893169c846c9d7
Author: Petr Mladek <pmladek at suse.cz>
Date: Tue Dec 20 16:33:26 2011 +0100
allow to call ooinstall twice with $DESTDIR
diff --git a/solenv/bin/ooinstall b/solenv/bin/ooinstall
index cf9ad9e..794e81b 100755
--- a/solenv/bin/ooinstall
+++ b/solenv/bin/ooinstall
@@ -116,6 +116,15 @@ if ($is_windows) {
"-msilanguage $ENV{SRC_ROOT}/instsetoo_native/$ENV{INPATH}/misc/win_ulffiles";
}
+# FIXME: a better solution would be to fix installer to deal with broken symlinks
+# make distro-pack-install shufle with the SDK installation to make it LSB compliant
+# it creates symlinks from the orignal path to /usr/share; they are not valid with $DESTDIR
+# and potential second ooinstall call fails with strange error messages if the old tree is still there
+if ($destdir && "$ENV{DESTDIR}" ne "/" && -d "$ENV{DESTDIR}") {
+ print "Cleaning destdir...\n";
+ system ("rm -rf \"$ENV{DESTDIR}\"") && die "Failed to clean up destdir: $!";
+}
+
print "Running LibreOffice installer\n";
system ("cd $ENV{SRC_ROOT}/instsetoo_native/util ; " .
"perl -w $ENV{SOLARENV}/bin/make_installer.pl " .
More information about the Libreoffice-commits
mailing list