Build system: generate metadata.json

Instead of hardcoding metadata.json, generate it from .in files,
adding installation prefixes, current target version and configured
uuid.
This commit is contained in:
Giovanni Campagna
2011-02-07 22:52:42 +01:00
parent ec772dce96
commit aaf2057725
5 changed files with 26 additions and 13 deletions
+14 -5
View File
@@ -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
@@ -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@"
}
@@ -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@"
}
@@ -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"
@@ -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@"
}