comparison recipes/kde_enterprise_4/kdebase_runtime.py @ 219:0d227defc124

Use the recipes.kde_enterprise_4.base module to define the kdebase_runtime packager
author Bernhard Herzog <bh@intevation.de>
date Tue, 06 Jan 2009 16:34:01 +0000
parents 56aa89c588a1
children
comparison
equal deleted inserted replaced
218:4f3bb25c80ec 219:0d227defc124
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.
7 7
8 """Build kdebase_runtime debian packages from the kdepim/enterprise4 branch.""" 8 """Build kdebase_runtime debian packages from the kdepim/enterprise4 branch."""
9 9
10 import os 10 import base
11 import time 11 base.define_kdepim_packager("kdebase-runtime")
12 import re
13
14 import treepkg.util
15 import treepkg.packager
16
17
18 class SourcePackager(treepkg.packager.SourcePackager):
19
20 pkg_basename = "kdebase-runtime"
21
22 def __init__(self, *args, **kw):
23 super(SourcePackager, self).__init__(*args, **kw)
24 self.enterprise_version = (time.strftime("%Y%m%d", time.localtime()) \
25 + "." + str(self.revision))
26
27 def determine_package_version(self, directory):
28 enterprise_version = self.enterprise_version
29 return self.track.version_template % locals()
30
31 def do_package(self):
32 pkgbaseversion, pkgbasedir = self.export_sources()
33
34 pkgbasename = self.pkg_basename + "_" + pkgbaseversion
35 origtargz = os.path.join(self.work_dir,
36 pkgbasename + ".orig.tar.gz")
37 self.create_tarball(origtargz, self.work_dir,
38 os.path.basename(pkgbasedir))
39
40 changemsg = ("Update to SVN enterprise4 branch rev. %d"
41 % (self.revision,))
42 self.copy_debian_directory(pkgbasedir, pkgbaseversion,
43 changemsg)
44
45 self.create_source_package(pkgbasedir, origtargz)
46 self.move_source_package(pkgbasename)
47
48
49 class RevisionPackager(treepkg.packager.RevisionPackager):
50
51 source_packager_cls = SourcePackager
52
53
54 class PackageTrack(treepkg.packager.PackageTrack):
55
56 extra_config_desc = ["version_template"]
57
58 revision_packager_cls = RevisionPackager
59
60 def __init__(self, *args, **kw):
61 self.version_template = kw.pop("version_template")
62 super(PackageTrack, self).__init__(*args, **kw)
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)