From 4e58e6bbb275eb089be30497d9742185a7b9ddbc Mon Sep 17 00:00:00 2001 From: fredo Date: Thu, 26 May 2011 06:30:52 +0200 Subject: [PATCH] Add autotool compilation support this allows for some automatic configuration and potfiles management and allow to install the extension --- NEWS | 16 ++++++++++ README | 29 ++++++++++++++++++ autogen.sh | 20 ++++++++++++ config/.gitignore | 3 ++ configure.ac | 28 +++++++++++++++++ screenshot.png => data/screenshot.png | Bin m4/.gitignore | 1 + po/LINGUAS | 1 + po/POTFILES.in | 1 + ....pot => gnome-shell-extension-weather.pot} | 20 ++++++------ src/Makefile.am | 21 +++++++++++++ src/metadata.json | 1 - src/metadata.json.in | 8 +++++ 13 files changed, 138 insertions(+), 11 deletions(-) create mode 100644 NEWS create mode 100644 README create mode 100755 autogen.sh create mode 100644 config/.gitignore create mode 100644 configure.ac rename screenshot.png => data/screenshot.png (100%) create mode 100644 m4/.gitignore create mode 100644 po/LINGUAS create mode 100644 po/POTFILES.in rename po/{messages.pot => gnome-shell-extension-weather.pot} (80%) create mode 100644 src/Makefile.am delete mode 100644 src/metadata.json create mode 100644 src/metadata.json.in diff --git a/NEWS b/NEWS new file mode 100644 index 0000000..5df3714 --- /dev/null +++ b/NEWS @@ -0,0 +1,16 @@ +0.4 +=== +- add autotools support + + 0.3 + === +- add translation support + + 0.2 + === +- add yahoo backend +- add symbolic icons + + 0.1 ( + === + first skeleton implementation diff --git a/README b/README new file mode 100644 index 0000000..445136c --- /dev/null +++ b/README @@ -0,0 +1,29 @@ +## gnome-shell-extension-weather + +gnome-shell-extension-weather is a simple extension for displaying weather notifications in Gnome Shell. + +Currently, the weather report including forecast for today and tomorrow is fetched from [Yahoo](http://weather.yahoo.com/). + +### Installation + +1. Change `YAHOO_ID` to your location in extension.js (cf. [WOEID](http://developer.yahoo.com/geo/geoplanet/guide/concepts.html)) +2. Put directory `weather@venemo.com/` in `~/.local/share/gnome-shell/extensions/` +3. Restart Gnome Shell (`[Alt]+[F2]`, `r`) +4. Enjoy, contribute, ... + +### Licence + +Copyright (C) 2011 +ecyrbe //remove +spam to email +Timur Kristóf , +Elad Alfassa , +Simon Legner + +This file is part of gnome-shell-extension-weather. + +gnome-shell-extension-weather is free software: you can redistribute it and/or modify it under the terms of the **GNU General Public License as published by the Free Software Foundation, either version 3** of the License, or (at your option) any later version. + +gnome-shell-extension-weather is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + +You should have received a copy of the GNU General Public License along with gnome-shell-extension-weather. If not, see . + diff --git a/autogen.sh b/autogen.sh new file mode 100755 index 0000000..d9669c5 --- /dev/null +++ b/autogen.sh @@ -0,0 +1,20 @@ +#!/bin/bash +# Run this to generate all the initial makefiles, etc. + +srcdir=`dirname $0` +test -z "$srcdir" && srcdir=. + +PKG_NAME="gnome-shell-extensions" + +test -f $srcdir/configure.ac || { + echo -n "**Error**: Directory "\`$srcdir\'" does not look like the" + echo " top-level gnome-shell-extensions directory" + exit 1 +} + +which gnome-autogen.sh || { + echo "You need to install gnome-common from GNOME Git (or from" + echo "your OS vendor's package manager)." + exit 1 +} +. gnome-autogen.sh diff --git a/config/.gitignore b/config/.gitignore new file mode 100644 index 0000000..7e97b48 --- /dev/null +++ b/config/.gitignore @@ -0,0 +1,3 @@ +install-sh +mkinstalldirs +missing diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..38057c8 --- /dev/null +++ b/configure.ac @@ -0,0 +1,28 @@ +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],[3.0.1],[https://github.com/ecyrbe/gnome-shell-extension-weather/issues]) + +AC_CONFIG_MACRO_DIR([m4]) +AC_CONFIG_AUX_DIR([config]) + +AM_INIT_AUTOMAKE([1.10 dist-bzip2 no-dist-gzip foreign tar-ustar]) + +m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) + +GETTEXT_PACKAGE=gnome-shell-extension-weather +AC_SUBST(GETTEXT_PACKAGE) +AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", + [The prefix for our gettext translation domains.]) +IT_PROG_INTLTOOL(0.26) + +PKG_PROG_PKG_CONFIG([0.22]) + +GLIB_GSETTINGS + +dnl Please keep this sorted alphabetically +AC_CONFIG_FILES([ + Makefile + po/Makefile.in + src/Makefile +]) +AC_OUTPUT diff --git a/screenshot.png b/data/screenshot.png similarity index 100% rename from screenshot.png rename to data/screenshot.png diff --git a/m4/.gitignore b/m4/.gitignore new file mode 100644 index 0000000..9f841b0 --- /dev/null +++ b/m4/.gitignore @@ -0,0 +1 @@ +intltool.m4 diff --git a/po/LINGUAS b/po/LINGUAS new file mode 100644 index 0000000..527e861 --- /dev/null +++ b/po/LINGUAS @@ -0,0 +1 @@ +fr diff --git a/po/POTFILES.in b/po/POTFILES.in new file mode 100644 index 0000000..afca134 --- /dev/null +++ b/po/POTFILES.in @@ -0,0 +1 @@ +src/extension.js diff --git a/po/messages.pot b/po/gnome-shell-extension-weather.pot similarity index 80% rename from po/messages.pot rename to po/gnome-shell-extension-weather.pot index 6318be2..2720dba 100644 --- a/po/messages.pot +++ b/po/gnome-shell-extension-weather.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-05-24 16:54+0200\n" +"POT-Creation-Date: 2011-05-26 06:23+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,38 +17,38 @@ msgstr "" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" -#: extension.js:73 +#: extension.js:71 msgid "..." msgstr "" -#: extension.js:315 +#: extension.js:314 msgid "Loading current weather ..." msgstr "" -#: extension.js:316 +#: extension.js:315 msgid "Loading future weather ..." msgstr "" -#: extension.js:332 +#: extension.js:331 msgid "Loading ..." msgstr "" -#: extension.js:335 +#: extension.js:334 msgid "Please wait" msgstr "" -#: extension.js:353 +#: extension.js:352 msgid "Temperature:" msgstr "" -#: extension.js:355 +#: extension.js:354 msgid "Humidity:" msgstr "" -#: extension.js:357 +#: extension.js:356 msgid "Pressure:" msgstr "" -#: extension.js:359 +#: extension.js:358 msgid "Wind:" msgstr "" diff --git a/src/Makefile.am b/src/Makefile.am new file mode 100644 index 0000000..d6d06cd --- /dev/null +++ b/src/Makefile.am @@ -0,0 +1,21 @@ +extensionurl = https://github.com/ecyrbe/gnome-shell-extension-weather + +# Change these to modify how installation is performed +topextensiondir = $(datadir)/gnome-shell/extensions + +uuid = weather@gnome-shell-extensions.gnome.org + +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 $(top_builddir)/config.status + $(AM_V_GEN) sed -e "s|[@]LOCALEDIR@|$(datadir)/locale|" \ + -e "s|[@]uuid@|$(uuid)|" \ + -e "s|[@]shell_current@|$(PACKAGE_VERSION)|" \ + -e "s|[@]url@|$(extensionurl)|" $< > $@ + +CLEANFILES = metadata.json diff --git a/src/metadata.json b/src/metadata.json deleted file mode 100644 index fc18559..0000000 --- a/src/metadata.json +++ /dev/null @@ -1 +0,0 @@ -{"shell-version": ["3.0"], "uuid": "weather@venemo.net", "name": "Weather", "description": "Adds weather information next to the clock."} diff --git a/src/metadata.json.in b/src/metadata.json.in new file mode 100644 index 0000000..62db8e7 --- /dev/null +++ b/src/metadata.json.in @@ -0,0 +1,8 @@ +{ +"uuid": "@uuid@", +"name": "Weather indicator", +"description": "Adds weather information menu", +"shell-version": [ "@shell_current@" ], +"localedir": "@LOCALEDIR@", +"url": "@url@" +}