build: Add rpm target 14/14114/17
authorMichael Meffie <mmeffie@sinenomine.net>
Mon, 24 Aug 2020 17:12:13 +0000 (13:12 -0400)
committerBenjamin Kaduk <kaduk@mit.edu>
Fri, 4 Sep 2020 14:03:58 +0000 (10:03 -0400)
Add a top-level makefile target to build RPMs for Red Hat distributions
from the currently checked out commit. The resulting rpms are placed in
the packages/rpmbuild/RPMS/<arch> directory.

The rpm target is intended to be a convenience for testing changes to
the rpm packaging or generating packages for local testing.

Change-Id: Id951eb2b03629be59f6258e89e8356fe1fde1ff5
Reviewed-on: https://gerrit.openafs.org/14114
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

Makefile.in

index 72014bc..0c73bec 100644 (file)
@@ -788,6 +788,10 @@ srpm: dist
          packages/openafs-*-src.tar.bz2 \
          packages/openafs-*-doc.tar.bz2
 
+rpm: srpm
+       rpmbuild --rebuild --define "_topdir @TOP_OBJDIR@/packages/rpmbuild" \
+         packages/openafs-*.src.rpm
+
 dox:
        if test "x$(DOXYGEN)" != "x"; then \
            mkdir -p doc/doxygen/output && $(DOXYGEN) doc/doxygen/Doxyfile; \