Do not bundle 'version' file, have install create it
authorToni Gundogdu <legatvs@gmail.com>
Thu, 29 Aug 2013 08:04:22 +0000 (29 11:04 +0300)
committerToni Gundogdu <legatvs@gmail.com>
Thu, 29 Aug 2013 13:12:29 +0000 (29 16:12 +0300)
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 <legatvs@gmail.com>
share/Makefile.am

index 59e8b2f..2f1f628 100644 (file)
@@ -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: