annotate recipes/kde_enterprise_4/kdelibs.py @ 205:8f2be31f0df1

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