From 47622c30bb6623fe0e207700038190f1aa9a7e31 Mon Sep 17 00:00:00 2001 From: Neroth Date: Thu, 19 Jan 2012 22:36:52 -0500 Subject: [PATCH] Adding the new settings panel in autotools --- configure.ac | 14 +++++++++++++- src/Makefile.am | 24 ++++++++++++++++++++---- 2 files changed, 33 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index 73514ab..144c862 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,6 @@ AC_PREREQ(2.63) dnl be carefull, the version needs to be in sync with your gnome shell version -AC_INIT([gnome-shell-extension-weather],[1.0],[https://github.com/ecyrbe/gnome-shell-extension-weather/issues]) +AC_INIT([gnome-shell-extension-weather],[1.0],[https://github.com/Neroth/gnome-shell-extension-weather/issues]) AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_AUX_DIR([config]) @@ -13,6 +13,18 @@ GETTEXT_PACKAGE=gnome-shell-extension-weather AC_SUBST(GETTEXT_PACKAGE) AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [The prefix for our gettext translation domains.]) + +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 + DESKTOP_DATADIR=$with_desktop_dir +else + DESKTOP_DATADIR="$datadir" +fi + +AM_CONDITIONAL(DESKTOP_DATADIR, test "x$with_desktop_dir" != xno) +AC_SUBST(DESKTOP_DATADIR) + IT_PROG_INTLTOOL(0.26) PKG_PROG_PKG_CONFIG([0.22]) diff --git a/src/Makefile.am b/src/Makefile.am index 2ad774f..6e6946f 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,4 +1,4 @@ -extensionurl = https://github.com/ecyrbe/gnome-shell-extension-weather +extensionurl = https://github.com/Neroth/gnome-shell-extension-weather # Change these to modify how installation is performed topextensiondir = $(datadir)/gnome-shell/extensions @@ -7,17 +7,33 @@ uuid = weather@gnome-shell-extensions.gnome.org extensiondir = $(topextensiondir)/$(uuid) -dist_extension_DATA = extension.js stylesheet.css +if DESKTOP_DATADIR + +applicationsdir = $(DESKTOP_DATADIR)/applications +applications_DATA = weather-settings.desktop + +endif + +dist_extension_DATA = extension.js stylesheet.css weather-settings.ui + nodist_extension_DATA = metadata.json $(EXTRA_EXTENSION) -EXTRA_DIST = metadata.json.in +nodist_extension_SCRIPTS = weather-settings + +EXTRA_DIST = metadata.json.in weather-settings.js.in weather-settings.desktop.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)|" $< > $@ -CLEANFILES = metadata.json +weather-settings: weather-settings.js.in $(top_builddir)/config.status + $(AM_V_GEN) sed -e "s|[@]EXTENSIONDIR@|$(extensiondir)|" $< > $@ + +weather-settings.desktop: weather-settings.desktop.in $(top_builddir)/config.status + $(AM_V_GEN) sed -e "s|[@]EXTENSIONDIR@|$(extensiondir)|" $< > $@ + +CLEANFILES = metadata.json weather-settings weather-settings.desktop gschemas_in = org.gnome.shell.extensions.weather.gschema.xml.in