./packages/openofficeorg/3.3.0/experimental r2123: merge dokos scripts/gentranspkgs.py from libreoffice/experimental/3.3.0 r2294
------------------------------------------------------------
revno: 2123
committer: Rene Engelhard <rene@debian.org>
branch nick: experimental
timestamp: Sat 2011-01-01 21:44:42 +0100
message:
merge dokos scripts/gentranspkgs.py from libreoffice/experimental/3.3.0 r2294
added:
scripts/gentranspkgs.py
modified:
changelog
rules
=== modified file 'changelog'
--- a/changelog 2011-01-01 20:38:04 +0000
+++ b/changelog 2011-01-01 20:44:42 +0000
@@ -1,5 +1,6 @@
openoffice.org (1:3.3.0~ooo330m7-1) UNRELEASED; urgency=low
+ [ Rene Engelhard ]
* OpenOffice.org 3.3.0 release branch milestone 7
- fixes hebrew text in sheet tabs when using system fonts
(closes: #433231)
@@ -59,6 +60,10 @@
* debian/catalog.xml.in: ... here and fix path to dtd
* debian/udk*in, debian/xmerge-javadoc.in: Sun Microsystems, Inc -> Oracle
+ [ Matthias Klose ]
+ * debian/rules:
+ - Allow the generation of transitional openoffice.org-* packages.
+
-- Rene Engelhard <rene@debian.org> Tue, 12 Oct 2010 23:46:24 +0200
openoffice.org (1:3.2.1-11) unstable; urgency=medium
=== modified file 'rules'
--- a/rules 2011-01-01 20:38:04 +0000
+++ b/rules 2011-01-01 20:44:42 +0000
@@ -100,6 +100,8 @@
BUILD_KFREEBSD=y
PATCHSET=$(DIST)
BUILD_DEPS=
+OOO_TRANS_PKGS=n
+
BUILD_PYUNO=y
USE_PYCENTRAL=y
USE_PYSUPPORT=n
@@ -1891,6 +1893,12 @@
perl -pi -e 's/^Breaks:.*myspell.*\n//' debian/control
endif
+ifeq "$(OOO_TRANS_PKGS)" "y"
+ python debian/scripts/gentranspkgs.py < debian/control > debian/control.ooo
+ cat debian/control.ooo >> debian/control
+ rm -f debian/control.ooo
+endif
+
.DELETE_ON_ERROR: debian/control
build: build-arch build-indep
=== added file 'scripts/gentranspkgs.py'
--- a/scripts/gentranspkgs.py 1970-01-01 00:00:00 +0000
+++ b/scripts/gentranspkgs.py 2011-01-01 20:44:42 +0000
@@ -0,0 +1,49 @@
+#! /usr/bin/python
+
+import re, sys, fileinput
+
+skip_packages = ('')
+
+def gen_transitonal_packages():
+ skip = True
+ copy_fields = ('Section', 'Architecture', 'Priority', 'Description')
+ copy_fields = ('Section', 'Priority', 'Description')
+ pkgs = {}
+ for line in fileinput.input():
+ if line == '\n':
+ skip = True
+ if ':' in line:
+ f, v = line.split(':', 1)
+ v = v.strip()
+ if f == 'Package':
+ if v.startswith('libreoffice-'):
+ n = v.replace('libreoffice-', 'openoffice.org-')
+ p = {'Depends': v}
+ pkgs[n] = p
+ skip = False
+ else:
+ skip = True
+ if not skip and f in copy_fields:
+ p[f] = v
+
+ for p, attrs in pkgs.iteritems():
+ if p in skip_packages:
+ continue
+ print "Package: %s" % p
+ print "Architecture: all"
+ for f, v in attrs.items():
+ if f in ('Depends', 'Description'):
+ continue
+ print "%s: %s" % (f, v)
+ print "Depends: %s" % attrs['Depends']
+ print "Description: %s" % attrs['Description']
+ print " This is a transitional package, replacing the OpenOffice.org packaging"
+ print " with the LibreOffice packaging."
+ print " ."
+ print " It can be safely removed after an upgrade."
+ print
+
+def main():
+ gen_transitonal_packages()
+
+main()
Reply to: