comparison recipes/kde_enterprise_3_5/kdepim.py @ 271:12facd1b5f19

Implement tag detection for the KDEPIM enterprise 3.5 packages. This is a simple port of the implementation for the enterprise 4 branch. This change leads to a lot of duplicated code that needs to be refactored.
author Bernhard Herzog <bh@intevation.de>
date Thu, 07 May 2009 13:51:21 +0000
parents 710538908609
children c0cbd133b607
comparison
equal deleted inserted replaced
270:e5e23c3acaea 271:12facd1b5f19
1 # Copyright (C) 2007, 2008 by Intevation GmbH 1 # Copyright (C) 2007, 2008, 2009 by Intevation GmbH
2 # Authors: 2 # Authors:
3 # Bernhard Herzog <bh@intevation.de> 3 # Bernhard Herzog <bh@intevation.de>
4 # 4 #
5 # This program is free software under the GPL (>=v2) 5 # This program is free software under the GPL (>=v2)
6 # Read the file COPYING coming with the software for details. 6 # Read the file COPYING coming with the software for details.
13 import re 13 import re
14 14
15 import treepkg.util 15 import treepkg.util
16 import treepkg.packager 16 import treepkg.packager
17 17
18 import base
18 19
19 class SourcePackager(treepkg.packager.SourcePackager): 20 class SourcePackager(base.BaseSourcePackager):
20 21
21 pkg_basename = "kdepim" 22 pkg_basename = "kdepim"
22 23 changemsg_template = "Update to SVN enterprise35 branch rev. %(revision)d"
23 def __init__(self, *args, **kw):
24 super(SourcePackager, self).__init__(*args, **kw)
25 self.enterprise_version = (time.strftime("%Y%m%d", time.localtime()) \
26 + "." + str(self.revision))
27 24
28 def kdepim_version(self, directory): 25 def kdepim_version(self, directory):
29 """Determine the kdepim version. 26 """Determine the kdepim version.
30 27
31 The version is taken from the kdepim.lsm file. 28 The version is taken from the kdepim.lsm file.
53 failed.append(versionfile) 50 failed.append(versionfile)
54 if failed: 51 if failed:
55 raise RuntimeError("kdepim: failed to update version numbers in %s" 52 raise RuntimeError("kdepim: failed to update version numbers in %s"
56 % (", ".join(failed),)) 53 % (", ".join(failed),))
57 54
58 def do_package(self):
59 pkgbaseversion, pkgbasedir = self.export_sources()
60 self.update_version_numbers(pkgbasedir)
61
62 pkgbasename = "kdepim_" + pkgbaseversion
63 origtargz = os.path.join(self.work_dir,
64 pkgbasename + ".orig.tar.gz")
65 self.create_tarball(origtargz, self.work_dir,
66 os.path.basename(pkgbasedir))
67
68 changemsg = ("Update to SVN enterprise35 branch rev. %d"
69 % (self.revision,))
70 self.copy_debian_directory(pkgbasedir, pkgbaseversion,
71 changemsg)
72
73 self.create_source_package(pkgbasedir, origtargz)
74 self.move_source_package(pkgbasename)
75
76 55
77 class RevisionPackager(treepkg.packager.RevisionPackager): 56 class RevisionPackager(treepkg.packager.RevisionPackager):
78 57
79 source_packager_cls = SourcePackager 58 source_packager_cls = SourcePackager
80 59
81 60
82 class PackageTrack(treepkg.packager.PackageTrack): 61 class PackageTrack(base.BasePackageTrack):
83 62
84 revision_packager_cls = RevisionPackager 63 revision_packager_cls = RevisionPackager
85 64
86 svn_external_subdirs = ["admin"] 65 svn_external_subdirs = ["admin"]
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)