ctdb-build: Add target to build RPMs
authorAmitay Isaacs <amitay@gmail.com>
Tue, 10 Jun 2014 06:30:38 +0000 (16:30 +1000)
committerMichael Adam <obnox@samba.org>
Fri, 20 Jun 2014 21:38:10 +0000 (23:38 +0200)
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Michael Adam <obnox@samba.org>
ctdb/Makefile
ctdb/wscript

index 44fd756a2c10e004477bda263f9fb6705c93d506..c2ee2ddb96b7977e3715fff7c59525a0c841ecef 100644 (file)
@@ -31,6 +31,9 @@ distcheck:
        touch .tmplock
        WAFLOCK=.tmplock $(WAF) distcheck
 
+rpm:
+       $(WAF) rpm
+
 clean:
        $(WAF) clean
 
index 4920f9e438534fb6a415374405f86d549b6ffbed..26730981a3789a4530488f5d2529d70816c7ba30 100755 (executable)
@@ -556,6 +556,15 @@ def dist():
 
     samba_dist.dist()
 
+def rpmonly(ctx):
+    cmd = 'rpmbuild -ta --clean --rmsource ctdb-%s.tar.gz' % VERSION
+    samba_utils.RUN_COMMAND(cmd)
+
+def rpm(ctx):
+    import Scripting
+    Scripting.commands.append('dist')
+    Scripting.commands.append('rpmonly')
+
 def ctags(ctx):
     "build 'tags' file using ctags"
     import Utils