summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am22
1 files changed, 19 insertions, 3 deletions
diff --git a/Makefile.am b/Makefile.am
index 8e4421d..47b2c0e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -4,6 +4,8 @@ ACLOCAL_AMFLAGS = -I m4
SUBDIRS = src data doc
+CLEANFILES = $(PACKAGE).spec
+
MAINTAINERCLEANFILES = aclocal.m4 compile \
config.guess config.h.in config.sub configure \
depcomp install-sh ltmain.sh missing Makefile.in \
@@ -14,8 +16,22 @@ bin_SCRIPTS = imlib2-config
EXTRA_DIST = AUTHORS COPYING COPYING-PLAIN gendoc \
Doxyfile \
README.in README \
- imlib2.pc.in \
- imlib2.spec.in imlib2.spec
+ $(PACKAGE).pc.in \
+ $(PACKAGE).spec.in
pkgconfigdir = $(libdir)/pkgconfig
-pkgconfig_DATA = imlib2.pc
+pkgconfig_DATA = $(PACKAGE).pc
+
+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: