summaryrefslogtreecommitdiff
path: root/cscript
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-08-04 19:37:55 +0100
committerCarl Hetherington <cth@carlh.net>2014-08-04 19:37:55 +0100
commitb3ab2230281429ab8c0fcfd75c5b421ec958bcac (patch)
tree6faf3852b81902c1b0a7b8911b0884f26978f1cb /cscript
parentc93d58a9ed4276c7b1d40165ebc542fc3cde496d (diff)
More RPM tweaks.
Diffstat (limited to 'cscript')
-rw-r--r--cscript22
1 files changed, 11 insertions, 11 deletions
diff --git a/cscript b/cscript
index 6d15bc99f..0bfde74be 100644
--- a/cscript
+++ b/cscript
@@ -217,29 +217,29 @@ def package_debian(target, cpu, version):
return debs
def package_centos(target, cpu, version):
- os.makedirs('%s/rpmbuild/BUILD' % target.directory)
- os.makedirs('%s/rpmbuild/RPMS' % target.directory)
- os.makedirs('%s/rpmbuild/SOURCES' % target.directory)
- os.makedirs('%s/rpmbuild/SPECS' % target.directory)
- os.makedirs('%s/rpmbuild/SRPMS' % target.directory)
-
- f = open(os.path.expanduser('~/.rpmmacros'), 'w')
- print >>f,os.path.expanduser("%_topdir ~/rpmbuild")
+ os.makedirs('build/rpmbuild/BUILD')
+ os.makedirs('build/rpmbuild/RPMS')
+ os.makedirs('build/rpmbuild/SOURCES')
+ os.makedirs('build/rpmbuild/SPECS')
+ os.makedirs('build/rpmbuild/SRPMS')
+
+ f = open('build/rpmmacros', 'w')
+ print >>f,os.path.expanduser("%_topdir ~/build/rpmbuild")
f.close()
target.command('./waf dist')
shutil.copyfile(
"%s/src/dcpomatic/dcpomatic-%s.tar.bz2" % (target.directory, version),
- "%s/rpmbuild/SOURCES/dcpomatic-%s.tar.bz2" % (target.directory, version)
+ "build/rpmbuild/SOURCES/dcpomatic-%s.tar.bz2" % version
)
- target.command('rpmbuild -bb build/platform/linux/dcpomatic.spec')
+ target.command('rpmbuild --rcfile build/rpmmacros -bb build/platform/linux/dcpomatic.spec')
rpms = []
if cpu == "amd64":
cpu = "x86_64"
- for p in glob.glob('%s/rpmbuild/RPMS/%s/*.rpm' % (target.directory, cpu)):
+ for p in glob.glob('build/rpmbuild/RPMS/%s/*.rpm' % cpu):
rpms.append(os.path.abspath(p))
return rpms