From: Toni Gundogdu Date: Thu, 29 Aug 2013 08:04:22 +0000 (+0300) Subject: Do not bundle 'version' file, have install create it X-Git-Tag: v0.9.20130903~4^2 X-Git-Url: https://repo.or.cz/w/libquvi-scripts.git/commitdiff_plain/f0863805807ee2df0ca3d989ecfe54b7a63626d0 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 --- 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: