comparison recipes/kde_enterprise_4/kdepimlibs.py @ 204:e868c6818f8c

Add recipes for KDEPIM enterprise 4 packages
author Bernhard Herzog <bh@intevation.de>
date Fri, 05 Sep 2008 19:43:59 +0000
parents
children 4f3bb25c80ec
comparison
equal deleted inserted replaced
203:b1525ac52e27 204:e868c6818f8c
1 # Copyright (C) 2007, 2008 by Intevation GmbH
2 # Authors:
3 # Bernhard Herzog <bh@intevation.de>
4 #
5 # This program is free software under the GPL (>=v2)
6 # Read the file COPYING coming with the software for details.
7
8 """Build kdepimlibs debian packages from the kdepim/enterprise4 branch."""
9
10 import os
11 import time
12 import re
13
14 import treepkg.util
15 import treepkg.packager
16
17
18 class SourcePackager(treepkg.packager.SourcePackager):
19
20 pkg_basename = "kdepimlibs"
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)