[libreoffice] 02/02: add diversions for dialog.xlc/script.xlc for Access2Base move
This is an automated email from the git hooks/post-receive script.
rene pushed a commit to branch debian-experimental-4.2
in repository libreoffice.
commit ca7dfac14b029030dca640a7122baa0993daba22
Author: Rene Engelhard <rene@debian.org>
Date: Thu May 15 17:37:27 2014 +0200
add diversions for dialog.xlc/script.xlc for Access2Base move
---
changelog | 6 ++++--
libreoffice-base.postrm.in | 18 ++++++++++++++++++
libreoffice-base.preinst.in | 18 ++++++++++++++++++
rules | 16 ++++++++++++++++
4 files changed, 56 insertions(+), 2 deletions(-)
diff --git a/changelog b/changelog
index 205b9fe..68641d9 100644
--- a/changelog
+++ b/changelog
@@ -1,12 +1,14 @@
-libreoffice (1:4.2.5~rc1~git20140510-1) UNRELEASED; urgency=low
+libreoffice (1:4.2.5~rc1~git20140514-1) UNRELEASED; urgency=low
* new upstream snapshot
- * debin/rules:
+ * debian/rules:
- move /usr/lib/libreoffice/share/basic/Access2Base from -common to -base,
as it clearly is Base-specific
* debian/control.in:
- add Replaces: for the Access2Base move
+ * debian/libreoffice-base.{preinst,postrm}.in: dpkg-divert dialog.xlc
+ and script.xlc... FIXME: Better, scalable solution..
-- Rene Engelhard <rene@debian.org> Thu, 08 May 2014 14:23:53 +0200
diff --git a/libreoffice-base.postrm.in b/libreoffice-base.postrm.in
new file mode 100755
index 0000000..88042b2
--- /dev/null
+++ b/libreoffice-base.postrm.in
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+set -e
+
+#INCLUDE_SHELL_LIB#
+
+if [ "$1" = "remove" ]; then
+ dpkg-divert --package $DPKG_MAINTSCRIPT_PACKAGE --remove --rename \
+ --divert /usr/lib/libreoffice/share/basic/dialog.xlc.noaccess \
+ /usr/lib/libreoffice/share/basic/dialog.xlc
+ dpkg-divert --package $DPKG_MAINTSCRIPT_PACKAGE --remove --rename \
+ --divert /usr/lib/libreoffice/share/basic/script.xlc.noaccess \
+ /usr/lib/libreoffice/share/basic/script.xlc
+fi
+
+#DEBHELPER#
+
+exit 0
diff --git a/libreoffice-base.preinst.in b/libreoffice-base.preinst.in
new file mode 100755
index 0000000..d2e5b4c
--- /dev/null
+++ b/libreoffice-base.preinst.in
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+set -e
+
+#INCLUDE_SHELL_LIB#
+
+if [ upgrade != "$1" ] || dpkg --compare-versions "$2" lt 1:4.2.5~rc1-1; then
+ dpkg-divert --package $DPKG_MAINTSCRIPT_PACKAGE --add --rename \
+ --divert /usr/lib/libreoffice/share/basic/dialog.xlc.noaccess \
+ /usr/lib/libreoffice/share/basic/dialog.xlc
+ dpkg-divert --package $DPKG_MAINTSCRIPT_PACKAGE --add --rename \
+ --divert /usr/lib/libreoffice/share/basic/script.xlc.noaccess \
+ /usr/lib/libreoffice/share/basic/script.xlc
+fi
+
+#DEBHELPER#
+
+exit 0
diff --git a/rules b/rules
index 496ed63..7a8dc3f 100755
--- a/rules
+++ b/rules
@@ -2190,8 +2190,24 @@ ifeq "$(PACKAGE_BASE)" "y"
mkdir -p $(PKGDIR)-base/$(OODIR)/share/basic
mv $(PKGDIR)-common/$(OODIR)/share/basic/Access2Base \
$(PKGDIR)-base/$(OODIR)/share/basic
+ cp $(PKGDIR)-common/$(OODIR)/share/basic/dialog.xlc \
+ $(PKGDIR)-base/$(OODIR)/share/basic
+ cp $(PKGDIR)-common/$(OODIR)/share/basic/script.xlc \
+ $(PKGDIR)-base/$(OODIR)/share/basic
+ # FIXME. Does not scale. This has to be a diversion...
+ t=`mktemp -q`; grep -v Access2Base $(PKGDIR)-common/$(OODIR)/share/basic/dialog.xlc > \
+ $$t && mv $$t $(PKGDIR)-common/$(OODIR)/share/basic/dialog.xlc && rm -f $$t
+ t=`mktemp -q`; grep -v Access2Base $(PKGDIR)-common/$(OODIR)/share/basic/script.xlc > \
+ $$t && mv $$t $(PKGDIR)-common/$(OODIR)/share/basic/script.xlc &
+& rm -f $$t
else
rm -rf $(PKGDIR)-common/$(OODIR)/share/basic/Access2Base
+ t=`mktemp -q`; grep -v Access2Base $(PKGDIR)-common/$(OODIR)/share/basic/dialog.xlc > \
+ $$t && mv $$t $(PKGDIR)-common/$(OODIR)/share/basic/dialog.xlc &
+& rm -f $$t
+ t=`mktemp -q`; grep -v Access2Base $(PKGDIR)-common/$(OODIR)/share/basic/script.xlc > \
+ $$t && mv $$t $(PKGDIR)-common/$(OODIR)/share/basic/script.xlc &
+& rm -f $$t
endif
find debian/tmp ! -perm -200 | xargs -r chmod u+w
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-openoffice/libreoffice.git
Reply to: