comparison recipes/kde_enterprise_4/kdebase.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 8f2be31f0df1
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 kdebase 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 = "kdebase"
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 kdebase_version(self, directory):
28 """Determine the kdebase version.
29
30 The version is taken from the kdebase.lsm file.
31 """
32 return treepkg.util.extract_lsm_version(os.path.join(directory,
33 "kdebase.lsm"))
34
35 def determine_package_version(self, directory):
36 enterprise_version = self.enterprise_version
37 return self.track.version_template % locals()
38
39 def do_package(self):
40 pkgbaseversion, pkgbasedir = self.export_sources()
41
42 pkgbasename = self.pkg_basename + "_" + pkgbaseversion
43 origtargz = os.path.join(self.work_dir,
44 pkgbasename + ".orig.tar.gz")
45 self.create_tarball(origtargz, self.work_dir,
46 os.path.basename(pkgbasedir))
47
48 changemsg = ("Update to SVN enterprise4 branch rev. %d"
49 % (self.revision,))
50 self.copy_debian_directory(pkgbasedir, pkgbaseversion,
51 changemsg)
52
53 self.create_source_package(pkgbasedir, origtargz)
54 self.move_source_package(pkgbasename)
55
56
57 class RevisionPackager(treepkg.packager.RevisionPackager):
58
59 source_packager_cls = SourcePackager
60
61
62 class PackageTrack(treepkg.packager.PackageTrack):
63
64 svn_external_subdirs = ["workspace/kwin/clients/ozone/lib",
65 "workspace/kwin/clients/oxygen/lib"]
66
67 extra_config_desc = ["version_template"]
68
69 revision_packager_cls = RevisionPackager
70
71 def __init__(self, *args, **kw):
72 self.version_template = kw.pop("version_template")
73 super(PackageTrack, self).__init__(*args, **kw)
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)