bh@221: # Copyright (C) 2007, 2008, 2009 by Intevation GmbH bh@204: # Authors: bh@204: # Bernhard Herzog bh@204: # bh@204: # This program is free software under the GPL (>=v2) bh@204: # Read the file COPYING coming with the software for details. bh@204: bh@221: """Build kdepim debian packages from the kdepim/enterprise4 branch. bh@204: """ bh@204: bh@204: import os bh@204: bh@204: import treepkg.util bh@204: bh@221: import base bh@204: bh@221: class SourcePackager(base.BaseSourcePackager): bh@204: bh@204: pkg_basename = "kdepim" bh@204: bh@204: def update_version_numbers(self, pkgbasedir): bh@204: """Overrides the inherited method to update version numbers in the code bh@204: """ bh@214: versionstring = "(enterprise4 %s)" % self.enterprise_version bh@204: failed = [] bh@214: for versionfile in ["kaddressbook/kabcore.cpp", bh@214: "kmail/kmversion.h", bh@214: "kontact/src/main.cpp", bh@204: "korganizer/version.h"]: bh@204: if not treepkg.util.replace_in_file(os.path.join(pkgbasedir, bh@204: versionfile), bh@214: "\(enterprise4 ([^)]*)\)", bh@204: versionstring): bh@204: failed.append(versionfile) bh@204: if failed: bh@204: raise RuntimeError("kdepim: failed to update version numbers in %s" bh@204: % (", ".join(failed),)) bh@204: bh@204: bh@221: base.define_kdepim_packager()