kwo pushed a commit to branch master. http://git.enlightenment.org/legacy/imlib2_loaders.git/commit/?id=377ff752c6307872f96fc123290c8cbfe5876451
commit 377ff752c6307872f96fc123290c8cbfe5876451 Author: Kim Woelders <k...@woelders.dk> Date: Sat Mar 7 16:54:05 2020 +0100 Spec file: Add git tag to rpm file name (if built from git checkout) --- Makefile.am | 21 +++++++++++++++++++-- configure.ac | 3 ++- imlib2_loaders.spec.in | 2 +- 3 files changed, 22 insertions(+), 4 deletions(-) diff --git a/Makefile.am b/Makefile.am index 8d3e7c9..b94c444 100644 --- a/Makefile.am +++ b/Makefile.am @@ -4,11 +4,28 @@ ACLOCAL_AMFLAGS = -I m4 SUBDIRS = src +CLEANFILES = $(PACKAGE).spec + MAINTAINERCLEANFILES = Makefile.in aclocal.m4 compile \ config.guess config.h.in config.sub \ configure depcomp install-sh \ ltmain.sh missing \ m4/*.m4 -EXTRA_DIST = AUTHORS COPYING COPYING-PLAIN COPYING.loader_xcf imlib2_loaders.spec imlib2_loaders.spec.in \ - README.in README +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 + +$(top_builddir)/$(PACKAGE).spec: FORCE + sed "s/\@PACKAGE\@/@PACKAGE@/;s/\@VERSION\@/@VERSION@/;s/\@RPM_RELEASE\@/$(RPM_RELEASE)/" \ + $(top_srcdir)/$(PACKAGE).spec.in > $@ + +FORCE: diff --git a/configure.ac b/configure.ac index a6648d4..df55897 100644 --- a/configure.ac +++ b/configure.ac @@ -7,6 +7,8 @@ AC_CANONICAL_HOST AM_INIT_AUTOMAKE(1.6 dist-bzip2) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) +AM_CONDITIONAL(SRC_IS_GIT, test -d $srcdir/.git) + AC_C_BIGENDIAN AC_PROG_CC @@ -71,7 +73,6 @@ src/Makefile src/modules/Makefile src/modules/loaders/Makefile README -imlib2_loaders.spec ]) AC_CONFIG_COMMANDS([default],[ ],[]) diff --git a/imlib2_loaders.spec.in b/imlib2_loaders.spec.in index 5430e60..a33b570 100644 --- a/imlib2_loaders.spec.in +++ b/imlib2_loaders.spec.in @@ -1,7 +1,7 @@ Summary: Additional image loaders for Imlib2 Name: @PACKAGE@ Version: @VERSION@ -Release: 1.%(date '+%y%m%d') +Release: @RPM_RELEASE@ License: Mixed Group: System Environment/Libraries URL: http://www.enlightenment.org --