diff options
author | Stephen Gallagher <sgallagh@redhat.com> | 2010-01-18 09:40:54 -0500 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2010-01-22 09:14:04 -0500 |
commit | 79fe6a7650e6960af4a742c7943d09ffa652c429 (patch) | |
tree | 4e5f5dbb8bd2cdf041e7ca8dab9d3852381728e9 | |
parent | 487109b910b07c3a2260a6daa234af051d34cd52 (diff) | |
download | sssd-79fe6a7650e6960af4a742c7943d09ffa652c429.tar.gz sssd-79fe6a7650e6960af4a742c7943d09ffa652c429.tar.xz sssd-79fe6a7650e6960af4a742c7943d09ffa652c429.zip |
Add 'prerelease-rpms' target to Makefile
This target is available only if building from a git checkout.
It will automatically populate the PRERELEASE_VERSION in
version.m4 with the current datestamp and git commit id for
creating an RPM.
-rw-r--r-- | Makefile.am | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am index b0f8959f1..b5b95824f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -26,6 +26,14 @@ rpms: dist-gzip rpmroot cd $(RPMBUILD); \ rpmbuild --define "_topdir $(RPMBUILD)" -ba SPECS/sssd.spec +if GIT_CHECKOUT +prerelease-rpms: + cp $(srcdir)/version.m4 $(srcdir)/version.m4.orig + sed -e "s/m4_define(\[PRERELEASE_VERSION_NUMBER\], \[.*\])/m4_define(\[PRERELEASE_VERSION_NUMBER\], \[.`date +%Y%m%d`git`git log -1 --pretty=format:%h`\])/" < $(srcdir)/version.m4.orig > $(srcdir)/version.m4 + $(MAKE) rpms + mv $(srcdir)/version.m4.orig $(srcdir)/version.m4 +endif + # make srpms will use the old digest algorithm to be compatible # with RHEL5 srpms: dist-gzip rpmroot |