This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository legacy-imlib2_loaders.

View the commit online.

commit 2eb5fbd0a51e1cef3e3d2925e08ff3e755133801
Author: Kim Woelders <[email protected]>
AuthorDate: Sat Dec 17 19:18:42 2022 +0100

    autofoo: Rework git tag/release stuff, as in imlib2
    
    - Add 'release' target to make dist without git tag in rpm name.
    - Use .git-src (not .git) to test if we are building from git.
---
 .git-src     |  0
 Makefile.am  | 21 ++++++++++++++-------
 configure.ac |  2 --
 3 files changed, 14 insertions(+), 9 deletions(-)

diff --git a/.git-src b/.git-src
new file mode 100644
index 0000000..e69de29
diff --git a/Makefile.am b/Makefile.am
index b94c444..d3fb9b5 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -16,16 +16,23 @@ EXTRA_DIST = AUTHORS COPYING COPYING-PLAIN COPYING.loader_xcf \
 	README.in README \
 	$(PACKAGE).spec.in
 
-if SRC_IS_GIT
-RPM_RELEASE=`echo -n "1.%(date '+%y%m%d').git"; git rev-parse --short=8 HEAD`
-else
-RPM_RELEASE=`echo -n "1.%(date '+%y%m%d')"`
-endif
 
 dist-hook: $(top_builddir)/$(PACKAGE).spec
 
+RPR_DEV = `echo -n "1.%(date '+%y%m%d').git"; git rev-parse --short=8 HEAD`
+RPR_REL = 1
+SED_DEV = "s/\@PACKAGE\@/@PACKAGE@/;s/\@VERSION\@/@VERSION@/;s/\@RPM_RELEASE\@/$(RPR_DEV)/"
+SED_REL = "s/\@PACKAGE\@/@PACKAGE@/;s/\@VERSION\@/@VERSION@/;s/\@RPM_RELEASE\@/$(RPR_REL)/"
+
 $(top_builddir)/$(PACKAGE).spec: FORCE
-	sed "s/\@PACKAGE\@/@PACKAGE@/;s/\@VERSION\@/@VERSION@/;s/\@RPM_RELEASE\@/$(RPM_RELEASE)/" \
-		$(top_srcdir)/$(PACKAGE).spec.in > $@
+	@if [ -f $(top_srcdir)/.git-src -a -z "$(release)" ]; then \
+	  sed $(SED_DEV) $(top_srcdir)/$(PACKAGE).spec.in > $@; \
+	else \
+	  sed $(SED_REL) $(top_srcdir)/$(PACKAGE).spec.in > $@; \
+	fi
+
+.PHONY: release
+release:
+	$(MAKE) dist release=y
 
 FORCE:
diff --git a/configure.ac b/configure.ac
index 8412da3..80808dd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -7,8 +7,6 @@ AC_CANONICAL_HOST
 AM_INIT_AUTOMAKE(1.6 dist-xz)
 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
 
-AM_CONDITIONAL(SRC_IS_GIT, test -d $srcdir/.git)
-
 AC_C_BIGENDIAN
 AC_PROG_CC
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to