From 892aac3545f81a49846678c9d28d96008ad4935f Mon Sep 17 00:00:00 2001 From: Jens Lody Date: Fri, 21 Aug 2015 01:09:49 +0200 Subject: [PATCH] Add ability to set version via configure-script; useful for local-builds or when packaged for distros. --- configure.ac | 2 ++ data/Makefile.am | 3 ++- data/metadata.json.in | 3 ++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index e20f0a9..370afd9 100644 --- a/configure.ac +++ b/configure.ac @@ -20,6 +20,8 @@ PKG_PROG_PKG_CONFIG([0.22]) GLIB_GSETTINGS +AC_ARG_VAR(GIT_VERSION, git-version to be placed in metadata.json, will be overwritten when uploaded to gnome.org (default not set)) + AC_ARG_WITH(desktop-dir, [ --with-desktop-dir=PATH where to install desktop files (default=PREFIX/share)]) if test "x$with_desktop_dir" != x; then diff --git a/data/Makefile.am b/data/Makefile.am index 8ae305c..da10db4 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -16,7 +16,8 @@ EXTRA_DIST = metadata.json.in metadata.json: metadata.json.in $(top_builddir)/config.status $(AM_V_GEN) sed -e "s|[@]LOCALEDIR@|$(datadir)/locale|" \ -e "s|[@]uuid@|$(uuid)|" \ - -e "s|[@]url@|$(extensionurl)|" $< > $@ + -e "s|[@]url@|$(extensionurl)|" \ + -e "s|[@]version@|$(GIT_VERSION)|" $< > $@ CLEANFILES = metadata.json diff --git a/data/metadata.json.in b/data/metadata.json.in index f7d380c..2f82a74 100644 --- a/data/metadata.json.in +++ b/data/metadata.json.in @@ -4,5 +4,6 @@ "description": "Configuring where on the (main) screen notifications will appear, instead of just above the message tray", "shell-version": [ "3.10", "3.12", "3.14", "3.16", "3.17.4", "3.17.90" ], "localedir": "@LOCALEDIR@", -"url": "@url@" +"url": "@url@", +"version": "@version@" }