annotate 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
rev   line source
211
56aa89c588a1 Add more KDEPIM Enterprise 4 recipes: l10n, kdebase_runtime, kdebase_workspace
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
1 # Copyright (C) 2007, 2008 by Intevation GmbH
56aa89c588a1 Add more KDEPIM Enterprise 4 recipes: l10n, kdebase_runtime, kdebase_workspace
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
2 # Authors:
56aa89c588a1 Add more KDEPIM Enterprise 4 recipes: l10n, kdebase_runtime, kdebase_workspace
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
3 # Bernhard Herzog <bh@intevation.de>
56aa89c588a1 Add more KDEPIM Enterprise 4 recipes: l10n, kdebase_runtime, kdebase_workspace
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
4 #
56aa89c588a1 Add more KDEPIM Enterprise 4 recipes: l10n, kdebase_runtime, kdebase_workspace
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
5 # This program is free software under the GPL (>=v2)
56aa89c588a1 Add more KDEPIM Enterprise 4 recipes: l10n, kdebase_runtime, kdebase_workspace
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
6 # Read the file COPYING coming with the software for details.
56aa89c588a1 Add more KDEPIM Enterprise 4 recipes: l10n, kdebase_runtime, kdebase_workspace
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
7
56aa89c588a1 Add more KDEPIM Enterprise 4 recipes: l10n, kdebase_runtime, kdebase_workspace
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
8 """Build kdebase_runtime debian packages from the kdepim/enterprise4 branch."""
56aa89c588a1 Add more KDEPIM Enterprise 4 recipes: l10n, kdebase_runtime, kdebase_workspace
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
9
56aa89c588a1 Add more KDEPIM Enterprise 4 recipes: l10n, kdebase_runtime, kdebase_workspace
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
10 import os
56aa89c588a1 Add more KDEPIM Enterprise 4 recipes: l10n, kdebase_runtime, kdebase_workspace
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
11 import time
56aa89c588a1 Add more KDEPIM Enterprise 4 recipes: l10n, kdebase_runtime, kdebase_workspace
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
12 import re
56aa89c588a1 Add more KDEPIM Enterprise 4 recipes: l10n, kdebase_runtime, kdebase_workspace
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
13
56aa89c588a1 Add more KDEPIM Enterprise 4 recipes: l10n, kdebase_runtime, kdebase_workspace
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
14 import treepkg.util
56aa89c588a1 Add more KDEPIM Enterprise 4 recipes: l10n, kdebase_runtime, kdebase_workspace
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
15 import treepkg.packager
56aa89c588a1 Add more KDEPIM Enterprise 4 recipes: l10n, kdebase_runtime, kdebase_workspace
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
16
56aa89c588a1 Add more KDEPIM Enterprise 4 recipes: l10n, kdebase_runtime, kdebase_workspace
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
17
56aa89c588a1 Add more KDEPIM Enterprise 4 recipes: l10n, kdebase_runtime, kdebase_workspace
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
18 class SourcePackager(treepkg.packager.SourcePackager):
56aa89c588a1 Add more KDEPIM Enterprise 4 recipes: l10n, kdebase_runtime, kdebase_workspace
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
19
56aa89c588a1 Add more KDEPIM Enterprise 4 recipes: l10n, kdebase_runtime, kdebase_workspace
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
20 pkg_basename = "kdebase-runtime"
56aa89c588a1 Add more KDEPIM Enterprise 4 recipes: l10n, kdebase_runtime, kdebase_workspace
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
21
56aa89c588a1 Add more KDEPIM Enterprise 4 recipes: l10n, kdebase_runtime, kdebase_workspace
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
22 def __init__(self, *args, **kw):
56aa89c588a1 Add more KDEPIM Enterprise 4 recipes: l10n, kdebase_runtime, kdebase_workspace
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
23 super(SourcePackager, self).__init__(*args, **kw)
56aa89c588a1 Add more KDEPIM Enterprise 4 recipes: l10n, kdebase_runtime, kdebase_workspace
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
24 self.enterprise_version = (time.strftime("%Y%m%d", time.localtime()) \
56aa89c588a1 Add more KDEPIM Enterprise 4 recipes: l10n, kdebase_runtime, kdebase_workspace
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
25 + "." + str(self.revision))
56aa89c588a1 Add more KDEPIM Enterprise 4 recipes: l10n, kdebase_runtime, kdebase_workspace
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
26
56aa89c588a1 Add more KDEPIM Enterprise 4 recipes: l10n, kdebase_runtime, kdebase_workspace
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
27 def determine_package_version(self, directory):
56aa89c588a1 Add more KDEPIM Enterprise 4 recipes: l10n, kdebase_runtime, kdebase_workspace
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
28 enterprise_version = self.enterprise_version
56aa89c588a1 Add more KDEPIM Enterprise 4 recipes: l10n, kdebase_runtime, kdebase_workspace
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
29 return self.track.version_template % locals()
56aa89c588a1 Add more KDEPIM Enterprise 4 recipes: l10n, kdebase_runtime, kdebase_workspace
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
30
56aa89c588a1 Add more KDEPIM Enterprise 4 recipes: l10n, kdebase_runtime, kdebase_workspace
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
31 def do_package(self):
56aa89c588a1 Add more KDEPIM Enterprise 4 recipes: l10n, kdebase_runtime, kdebase_workspace
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
32 pkgbaseversion, pkgbasedir = self.export_sources()
56aa89c588a1 Add more KDEPIM Enterprise 4 recipes: l10n, kdebase_runtime, kdebase_workspace
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
33
56aa89c588a1 Add more KDEPIM Enterprise 4 recipes: l10n, kdebase_runtime, kdebase_workspace
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
34 pkgbasename = self.pkg_basename + "_" + pkgbaseversion
56aa89c588a1 Add more KDEPIM Enterprise 4 recipes: l10n, kdebase_runtime, kdebase_workspace
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
35 origtargz = os.path.join(self.work_dir,
56aa89c588a1 Add more KDEPIM Enterprise 4 recipes: l10n, kdebase_runtime, kdebase_workspace
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
36 pkgbasename + ".orig.tar.gz")
56aa89c588a1 Add more KDEPIM Enterprise 4 recipes: l10n, kdebase_runtime, kdebase_workspace
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
37 self.create_tarball(origtargz, self.work_dir,
56aa89c588a1 Add more KDEPIM Enterprise 4 recipes: l10n, kdebase_runtime, kdebase_workspace
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
38 os.path.basename(pkgbasedir))
56aa89c588a1 Add more KDEPIM Enterprise 4 recipes: l10n, kdebase_runtime, kdebase_workspace
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
39
56aa89c588a1 Add more KDEPIM Enterprise 4 recipes: l10n, kdebase_runtime, kdebase_workspace
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
40 changemsg = ("Update to SVN enterprise4 branch rev. %d"
56aa89c588a1 Add more KDEPIM Enterprise 4 recipes: l10n, kdebase_runtime, kdebase_workspace
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
41 % (self.revision,))
56aa89c588a1 Add more KDEPIM Enterprise 4 recipes: l10n, kdebase_runtime, kdebase_workspace
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
42 self.copy_debian_directory(pkgbasedir, pkgbaseversion,
56aa89c588a1 Add more KDEPIM Enterprise 4 recipes: l10n, kdebase_runtime, kdebase_workspace
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
43 changemsg)
56aa89c588a1 Add more KDEPIM Enterprise 4 recipes: l10n, kdebase_runtime, kdebase_workspace
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
44
56aa89c588a1 Add more KDEPIM Enterprise 4 recipes: l10n, kdebase_runtime, kdebase_workspace
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
45 self.create_source_package(pkgbasedir, origtargz)
56aa89c588a1 Add more KDEPIM Enterprise 4 recipes: l10n, kdebase_runtime, kdebase_workspace
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
46 self.move_source_package(pkgbasename)
56aa89c588a1 Add more KDEPIM Enterprise 4 recipes: l10n, kdebase_runtime, kdebase_workspace
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
47
56aa89c588a1 Add more KDEPIM Enterprise 4 recipes: l10n, kdebase_runtime, kdebase_workspace
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
48
56aa89c588a1 Add more KDEPIM Enterprise 4 recipes: l10n, kdebase_runtime, kdebase_workspace
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
49 class RevisionPackager(treepkg.packager.RevisionPackager):
56aa89c588a1 Add more KDEPIM Enterprise 4 recipes: l10n, kdebase_runtime, kdebase_workspace
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
50
56aa89c588a1 Add more KDEPIM Enterprise 4 recipes: l10n, kdebase_runtime, kdebase_workspace
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
51 source_packager_cls = SourcePackager
56aa89c588a1 Add more KDEPIM Enterprise 4 recipes: l10n, kdebase_runtime, kdebase_workspace
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
52
56aa89c588a1 Add more KDEPIM Enterprise 4 recipes: l10n, kdebase_runtime, kdebase_workspace
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
53
56aa89c588a1 Add more KDEPIM Enterprise 4 recipes: l10n, kdebase_runtime, kdebase_workspace
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
54 class PackageTrack(treepkg.packager.PackageTrack):
56aa89c588a1 Add more KDEPIM Enterprise 4 recipes: l10n, kdebase_runtime, kdebase_workspace
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
55
56aa89c588a1 Add more KDEPIM Enterprise 4 recipes: l10n, kdebase_runtime, kdebase_workspace
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
56 extra_config_desc = ["version_template"]
56aa89c588a1 Add more KDEPIM Enterprise 4 recipes: l10n, kdebase_runtime, kdebase_workspace
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
57
56aa89c588a1 Add more KDEPIM Enterprise 4 recipes: l10n, kdebase_runtime, kdebase_workspace
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
58 revision_packager_cls = RevisionPackager
56aa89c588a1 Add more KDEPIM Enterprise 4 recipes: l10n, kdebase_runtime, kdebase_workspace
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
59
56aa89c588a1 Add more KDEPIM Enterprise 4 recipes: l10n, kdebase_runtime, kdebase_workspace
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
60 def __init__(self, *args, **kw):
56aa89c588a1 Add more KDEPIM Enterprise 4 recipes: l10n, kdebase_runtime, kdebase_workspace
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
61 self.version_template = kw.pop("version_template")
56aa89c588a1 Add more KDEPIM Enterprise 4 recipes: l10n, kdebase_runtime, kdebase_workspace
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
62 super(PackageTrack, self).__init__(*args, **kw)
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)