Building RPM packages for OpenAFS

The OpenAFS source tree contains an RPM spec file for building RPM packages. Recent versions of OpenAFS have makefile targets to build the source distribution tarballs and a source RPM package (srpm). After creating these files, run the rpmbuild tool to create create the binary RPM packages.

The following commands show how to build RPM packages from a git checkout. The tools will create RPM packages from annotated git tags. Checkout a tag for the desired version, then generated the source rpm, then run rpmbuild to build the binaries RPM package files.

$ git clone git://git.openafs.org/openafs.git
$ cd openafs
$ git checkout <tag>
$ ./regen.sh
$ ./configure  # no configure options required
$ make dist
$ make srpm
$ rpmbuild --rebuild -ba --define "_topdir $(pwd)/packages/rpmbuild" packages/<name>.src.rpm

The packages will be created in the packages/rpmbuild/RPMS directory. See the RPM spec file in src/packaging/RedHat for --define options for optional features and packages.