[gnome-shell-extensions] Build system: generate metadata.json
- From: Giovanni Campagna <gcampagna src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell-extensions] Build system: generate metadata.json
- Date: Mon, 7 Feb 2011 22:09:09 +0000 (UTC)
commit aaf205772570ce2d43f201ed50e0c11556af4907
Author: Giovanni Campagna <gcampagna src gnome org>
Date: Mon Feb 7 22:52:42 2011 +0100
Build system: generate metadata.json
Instead of hardcoding metadata.json, generate it from .in files,
adding installation prefixes, current target version and configured
uuid.
extension.mk | 19 ++++++++++++++-----
.../{metadata.json => metadata.json.in} | 5 +++--
.../example/{metadata.json => metadata.json.in} | 5 +++--
.../{metadata.json => metadata.json.in} | 5 +++--
.../{metadata.json => metadata.json.in} | 5 +++--
5 files changed, 26 insertions(+), 13 deletions(-)
---
diff --git a/extension.mk b/extension.mk
index 926bc7a..1370d97 100644
--- a/extension.mk
+++ b/extension.mk
@@ -1,10 +1,19 @@
# Change these to modify how installation is performed
-# If you modify extensionbase, you also need to modify
-# metadata.json of each extension
topextensiondir = $(datadir)/gnome-shell/extensions
extensionbase = @gnome-shell-extensions.gnome.org
-extensiondir = $(topextensiondir)/$(EXTENSION_ID)$(extensionbase)
+uuid = $(EXTENSION_ID)$(extensionbase)
-dist_extension_DATA = metadata.json extension.js stylesheet.css
-nodist_extension_DATA = $(EXTRA_EXTENSION)
+extensiondir = $(topextensiondir)/$(uuid)
+
+dist_extension_DATA = extension.js stylesheet.css
+nodist_extension_DATA = metadata.json $(EXTRA_EXTENSION)
+
+EXTRA_DIST = metadata.json.in
+
+metadata.json: metadata.json.in
+ sed -e "s|[ ]LOCALEDIR@|$(datadir)/locale|" \
+ -e "s|[ ]uuid@|$(uuid)|" \
+ -e "s|[ ]shell_current@|$(PACKAGE_VERSION)|" $< > $@
+
+CLEANFILES = metadata.json
diff --git a/extensions/alternate-tab/metadata.json b/extensions/alternate-tab/metadata.json.in
similarity index 65%
rename from extensions/alternate-tab/metadata.json
rename to extensions/alternate-tab/metadata.json.in
index 58a7acb..a7cb08b 100644
--- a/extensions/alternate-tab/metadata.json
+++ b/extensions/alternate-tab/metadata.json.in
@@ -1,7 +1,8 @@
{
-"uuid": "alternate-tab gnome-shell-extensions gnome org",
+"uuid": "@uuid@",
"name": "AlternateTab",
"description": "A replacement for Alt-Tab, allows to cycle between windows and does not group by application",
"original-author": "thomas bouffon gmail com",
-"shell-version": [ "2.91.5", "2.91.6" ]
+"shell-version": [ "2.91.5", "@shell_current@" ],
+"localedir": "@LOCALEDIR@"
}
diff --git a/extensions/example/metadata.json b/extensions/example/metadata.json.in
similarity index 61%
rename from extensions/example/metadata.json
rename to extensions/example/metadata.json.in
index 37071f4..5dcb493 100644
--- a/extensions/example/metadata.json
+++ b/extensions/example/metadata.json.in
@@ -1,6 +1,7 @@
{
- "uuid": "example gnome-shell-extensions gnome org",
+ "uuid": "@uuid@",
"name": "Hello, World!",
"description": "An example extension to show how it works. Shows Hello, world when clicking on the top panel.",
- "shell-version": [ "2.91.6" ]
+ "shell-version": [ "@shell_current@" ],
+ "localedir": "@LOCALEDIR@"
}
diff --git a/extensions/windowsNavigator/metadata.json b/extensions/windowsNavigator/metadata.json.in
similarity index 60%
rename from extensions/windowsNavigator/metadata.json
rename to extensions/windowsNavigator/metadata.json.in
index deaf7d2..b848daf 100644
--- a/extensions/windowsNavigator/metadata.json
+++ b/extensions/windowsNavigator/metadata.json.in
@@ -1,6 +1,7 @@
{
- "shell-version": ["2.91.5", "2.91.6"],
- "uuid": "windowsNavigator gnome-shell-extensions gnome org",
+ "shell-version": ["2.91.5", "@shell_current@"],
+ "uuid": "@uuid@",
+ "localedir": "@LOCALEDIR@",
"original-author": "zaspire rambler ru",
"name": "windowNavigator",
"description": "Allow keyboard selection of windows and workspaces in overlay mode"
diff --git a/extensions/xrandr-indicator/metadata.json b/extensions/xrandr-indicator/metadata.json.in
similarity index 62%
rename from extensions/xrandr-indicator/metadata.json
rename to extensions/xrandr-indicator/metadata.json.in
index 5021cc4..35d117e 100644
--- a/extensions/xrandr-indicator/metadata.json
+++ b/extensions/xrandr-indicator/metadata.json.in
@@ -1,6 +1,7 @@
{
-"uuid": "xrandr-indicator gnome-shell-extensions gnome org",
+"uuid": "@uuid@",
"name": "Monitor Status Indicator",
"description": "Add a systems status menu for rotating monitors (overrides what is currently provided by gnome-settings-daemon)",
-"shell-version": [ "2.91.5", "2.91.6" ]
+"shell-version": [ "2.91.5", "@shell_current@" ],
+"localedir": "@LOCALEDIR@"
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]