From f0863805807ee2df0ca3d989ecfe54b7a63626d0 Mon Sep 17 00:00:00 2001 From: Toni Gundogdu Date: Thu, 29 Aug 2013 11:04:22 +0300 Subject: [PATCH] Do not bundle 'version' file, have install create it Instead of creating the 'version' file to be distributed using dist-hook have the install-data-hook create the file making it possible to store additional details (e.g. build opts) to the file. install-data-hook: Create the 'version' file. Use ini-style format. Add configuration invocation command line options as 'configuration' to the file. uninstall-hook: * Remove symbolic link "major.minor" * Remove current version dir Signed-off-by: Toni Gundogdu --- share/Makefile.am | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/share/Makefile.am b/share/Makefile.am index 59e8b2f..2f1f628 100644 --- a/share/Makefile.am +++ b/share/Makefile.am @@ -101,20 +101,15 @@ scandir=$(pkgdatadir)/$(VERSION)/scan dist_scan_DATA=\ scan/youtube.lua -.PHONY: version - -version: - @if test -d "$(top_srcdir)/.git" -o -f "$(top_srcdir)/.git"; then \ - "$(top_srcdir)/gen-ver.sh" "$(top_srcdir)" > $@; \ - fi - -dist-hook: version - -versiondir=$(pkgdatadir)/$(VERSION) -dist_version_DATA=version - install-data-hook: cd $(DESTDIR)$(pkgdatadir) && rm -f $(VERSION_MM) && \ - $(LN_S) $(VERSION) $(VERSION_MM) + $(LN_S) $(VERSION) $(VERSION_MM) ; \ + cd $(VERSION_MM) && echo "[libquvi-scripts]" >version && \ + echo "configuration = $(BUILD_OPTS)" >>version && \ + echo "version = v$(VERSION)" >>version + +uninstall-hook: + rm -rf "$(DESTDIR)$(pkgdatadir)/$(VERSION)" ; \ + rm -f "$(DESTDIR)$(pkgdatadir)/$(VERSION_MM)" # vim: set ts=2 sw=2 tw=72 expandtab: -- 2.11.4.GIT