summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.am8
-rw-r--r--configure.ac2
2 files changed, 10 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
index 8801d08ce..b0f8959f1 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -36,6 +36,14 @@ srpms: dist-gzip rpmroot
--define _source_filedigest_algorithm=1 \
-bs SPECS/sssd.spec
+if GIT_CHECKOUT
+prerelease-srpms:
+ 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) srpms
+ mv $(srcdir)/version.m4.orig $(srcdir)/version.m4
+endif
+
tests: all
for subdir in $(SUBDIRS); do \
$(MAKE) -C $$subdir $@; \
diff --git a/configure.ac b/configure.ac
index d0785ad78..7f329676d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -13,5 +13,7 @@ AC_CONFIG_SUBDIRS([replace common server sss_client])
AC_SUBST([PRERELEASE_VERSION],
PRERELEASE_VERSION_NUMBER)
+AM_CONDITIONAL([GIT_CHECKOUT], [git log -1 &>/dev/null])
+
AC_CONFIG_FILES([Makefile contrib/sssd.spec])
AC_OUTPUT