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

git pushed a commit to branch master
in repository e16-epplets.

View the commit online.

commit 8b60be897ba83b47e7d97ffabd336d8c7a5b900f
Author: Kim Woelders <k...@woelders.dk>
AuthorDate: Sat Dec 9 20:57:16 2023 +0100

    autofoo: Rework git tag/release stuff
    
    - Add 'release' target to make dist without git tag in rpm name and
      version string.
    - Use .git-src (not .git) to test if we are building from git.
    
    (Now same as e16 and others).
---
 .git-src     |  0
 Makefile.am  | 28 +++++++++++++++++-----------
 configure.ac |  2 --
 3 files changed, 17 insertions(+), 13 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 69fbebd..eeeb172 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,26 +2,32 @@ AUTOMAKE_OPTIONS = foreign
 
 ACLOCAL_AMFLAGS = -I m4
 
-SUBDIRS = api epplets
-
-EXTRA_DIST = $(PACKAGE).spec.in
-
 MAINTAINERCLEANFILES = \
 	Makefile.in aclocal.m4 compile config.* configure depcomp \
 	install-sh ltmain.sh missing */Makefile.in
 
 CLEANFILES = $(PACKAGE).spec
 
-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
+EXTRA_DIST = $(PACKAGE).spec.in
+
+SUBDIRS = api epplets
 
 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 7697e16..6d63d3b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -7,8 +7,6 @@ AC_INIT([e16-epplets],[pkg_version],[enlightenment-devel@lists.sourceforge.net])
 AM_INIT_AUTOMAKE([foreign dist-xz])
 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
 
-AM_CONDITIONAL(SRC_IS_GIT, test -d $srcdir/.git)
-
 AC_CONFIG_MACRO_DIR([m4])
 
 AC_SUBST(E_RPM_REVISION, [rpm_revision])

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

Reply via email to