comparison enterprise/kdei18n.py @ 66:3c2e8cb7e658

merge
author Bernhard Herzog <bh@intevation.de>
date Wed, 11 Apr 2007 17:05:48 +0200
parents 6b5f7f7575f6
children fb5332a286cf
comparison
equal deleted inserted replaced
65:bebe06ff4bd6 66:3c2e8cb7e658
11 import time 11 import time
12 12
13 import treepkg.packager 13 import treepkg.packager
14 import treepkg.util 14 import treepkg.util
15 import treepkg.run as run 15 import treepkg.run as run
16 from treepkg.cmdexpand import cmdexpand
16 17
17 18
18 class SourcePackager(treepkg.packager.SourcePackager): 19 class SourcePackager(treepkg.packager.SourcePackager):
19 20
20 """Creates the debian source package for the i18n files 21 """Creates the debian source package for the i18n files
48 version_template = "%(kdepimversion)s.enterprise.0.%(enterprise_version)s" 49 version_template = "%(kdepimversion)s.enterprise.0.%(enterprise_version)s"
49 return version_template % locals() 50 return version_template % locals()
50 51
51 def unpack_orig_tarball(self): 52 def unpack_orig_tarball(self):
52 orig_tarball = self.track.orig_tarball 53 orig_tarball = self.track.orig_tarball
53 run.call(["tar", "xjf", orig_tarball, "-C", self.work_dir]) 54 run.call(cmdexpand("tar xjf $tarball -C $directory",
55 tarball=orig_tarball, directory=self.work_dir))
54 tarbasename = os.path.basename(orig_tarball) 56 tarbasename = os.path.basename(orig_tarball)
55 splitext = os.path.splitext 57 splitext = os.path.splitext
56 return os.path.join(self.work_dir, 58 return os.path.join(self.work_dir,
57 splitext(splitext(tarbasename)[0])[0]) 59 splitext(splitext(tarbasename)[0])[0])
58 60
69 de_dir = os.path.join(pkgbasedir, "de") 71 de_dir = os.path.join(pkgbasedir, "de")
70 os.rename(de_dir, new_de_dir) 72 os.rename(de_dir, new_de_dir)
71 treepkg.util.copytree(untarred_dir, de_dir) 73 treepkg.util.copytree(untarred_dir, de_dir)
72 treepkg.util.copytree(new_de_dir, de_dir) 74 treepkg.util.copytree(new_de_dir, de_dir)
73 logging.info("Running scripts/autogen.sh for kde-i18n-de tarball") 75 logging.info("Running scripts/autogen.sh for kde-i18n-de tarball")
74 run.call(["/bin/sh", "scripts/autogen.sh", "de"], cwd=pkgbasedir, 76 run.call(cmdexpand("/bin/sh scripts/autogen.sh de"), cwd=pkgbasedir,
75 suppress_output=True) 77 suppress_output=True)
76 78
77 tarballdir = "kde-i18n-de-" + pkgbaseversion 79 tarballdir = "kde-i18n-de-" + pkgbaseversion
78 os.rename(de_dir, os.path.join(pkgbasedir, tarballdir)) 80 os.rename(de_dir, os.path.join(pkgbasedir, tarballdir))
79 81
80 tarball = os.path.join(os.path.dirname(pkgbasedir), 82 tarball = os.path.join(os.path.dirname(pkgbasedir),
81 tarballdir + ".tar.bz2") 83 tarballdir + ".tar.bz2")
82 run.call(["tar", "cjf", tarball, "-C", pkgbasedir, tarballdir]) 84 run.call(cmdexpand("tar cjf $tarball -C $pkgbasedir $tarballdir",
85 **locals()))
83 logging.info("Created kde-i18n-de tarball") 86 logging.info("Created kde-i18n-de tarball")
84 return tarball 87 return tarball
85 88
86 def do_package(self): 89 def do_package(self):
87 # Create a new kde-i18n-de tarball from current SVN and the base 90 # Create a new kde-i18n-de tarball from current SVN and the base
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)