This is an archive of the discontinued LLVM Phabricator instance.

CMake: Add a build target for generating a source RPM
ClosedPublic

Authored by tstellar on Feb 17 2017, 7:21 AM.

Details

Summary

'make srpm' or 'ninja srpm' will tar up the current source code and then
build a source RPM package.

By default it will use the llvm.spec file to generate the source RPM,
but you can specify your own custom spec file with the
LLVM_SRPM_USER_BINARY_SPECFILE option. CMake will perform variable
substitution on your custom specfile, so you can reference CMake
variables in it. For example:

Version: @LLVM_RPM_SPEC_VERSION@

Note that everything in the source directory will be included in the
tarball so if you have a clang check out in tools/clang, then all
the clang source will end up in the tarball to. It is recommended
to only use this build target with a clean source tree.

Event Timeline

tstellar created this revision.Feb 17 2017, 7:21 AM
beanz accepted this revision.Feb 17 2017, 2:20 PM

LGTM. This is really cool, thanks for putting it together.

This revision is now accepted and ready to land.Feb 17 2017, 2:20 PM
This revision was automatically updated to reflect the committed changes.