Mercurial > treepkg
comparison recipes/kde_enterprise_4/kdebase_runtime.py @ 211:56aa89c588a1
Add more KDEPIM Enterprise 4 recipes: l10n, kdebase_runtime, kdebase_workspace
author | Bernhard Herzog <bh@intevation.de> |
---|---|
date | Fri, 14 Nov 2008 19:46:56 +0000 |
parents | |
children | 0d227defc124 |
comparison
equal
deleted
inserted
replaced
210:63f73bb9c459 | 211:56aa89c588a1 |
---|---|
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_runtime 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-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) |