summaryrefslogtreecommitdiffstats
path: root/configure.py
diff options
context:
space:
mode:
authorMaxim Kalaev <maximk@il.ibm.com>2012-07-26 12:21:30 (GMT)
committerMaxim Kalaev <maximk@il.ibm.com>2012-07-27 10:22:34 (GMT)
commit0cd552c0dc7b2aa1da692737f0f7d257b08ecdbc (patch)
tree0e94bbb1e39f76698e077e992c2bd9a2a09400fe /configure.py
parent83d5629c04a055a5794b3bfa8ef9b0ba8d97d816 (diff)
downloadNinja-0cd552c0dc7b2aa1da692737f0f7d257b08ecdbc.zip
Ninja-0cd552c0dc7b2aa1da692737f0f7d257b08ecdbc.tar.gz
Ninja-0cd552c0dc7b2aa1da692737f0f7d257b08ecdbc.tar.bz2
packaging: added basic RPM building
Diffstat (limited to 'configure.py')
-rwxr-xr-xconfigure.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/configure.py b/configure.py
index bf2596c..b8c6d86 100755
--- a/configure.py
+++ b/configure.py
@@ -386,6 +386,26 @@ n.comment('Build only the main binary by default.')
n.default(ninja)
n.newline()
+if host == 'linux':
+ n.comment('Packaging')
+ n.rule('rpmbuild',
+ command="rpmbuild \
+ --define 'ver git' \
+ --define \"rel `git rev-parse --short HEAD`\" \
+ --define '_topdir %(pwd)/rpm-build' \
+ --define '_builddir %{_topdir}' \
+ --define '_rpmdir %{_topdir}' \
+ --define '_srcrpmdir %{_topdir}' \
+ --define '_rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm' \
+ --define '_specdir %{_topdir}' \
+ --define '_sourcedir %{_topdir}' \
+ --quiet \
+ -bb misc/packaging/ninja.spec",
+ description='Building RPM..')
+ n.build('rpm', 'rpmbuild',
+ implicit=['ninja','README', 'COPYING', doc('manual.html')])
+ n.newline()
+
n.build('all', 'phony', all_targets)
print 'wrote %s.' % BUILD_FILENAME