diff --git a/data/OpenWeather.png b/data/OpenWeather.png new file mode 100644 index 0000000..1a73626 Binary files /dev/null and b/data/OpenWeather.png differ diff --git a/gnome-shell-extension-openweather.spec b/gnome-shell-extension-openweather.spec new file mode 100644 index 0000000..b9f8f75 --- /dev/null +++ b/gnome-shell-extension-openweather.spec @@ -0,0 +1,52 @@ +%global git 2701627 +%global uuid openweather-extension@jenslody.de +%global github jenslody-gnome-shell-extension-weather +%global checkout git%{git} + +Name: gnome-shell-extension-openweather +Version: 0 +Release: 0.2.%{checkout}%{?dist} +Summary: An extension for displaying weather notifications from http://openweathermap.org in GNOME Shell + +Group: User Interface/Desktops +License: GPLv3+ +URL: https://github.com/jenslody/gnome-shell-extension-weather +Source0: https://github.com/jenslody/gnome-shell-extension-weather/tarball/master/%{github}-%{git}.tar.gz +BuildArch: noarch + +BuildRequires: autoconf >= 2.53, automake >= 1.9, glib2-devel, gnome-common >= 3.6.0, intltool >= 0.25 +Requires: gnome-shell >= 3.6.0 + +%description +gnome-shell-extension-openweather is an extension to display weather information +from http://openweathermap.org/ for many cities in GNOME Shell + +%prep +%setup -q -n %{github}-%{git} + +%build +NOCONFIGURE=1 ./autogen.sh +%configure --prefix=%{_prefix} +make %{?_smp_mflags} + +%install +make install DESTDIR=%{buildroot} +%find_lang %{name} + +%postun +if [ $1 -eq 0 ] ; then + %{_bindir}/glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || : +fi + +%posttrans +%{_bindir}/glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || : + +%files -f %{name}.lang +%doc AUTHORS COPYING README.md +%{_datadir}/glib-2.0/schemas/org.gnome.shell.extensions.openweather.gschema.xml +%{_datadir}/gnome-shell/extensions/%{uuid}/ + +%changelog +* Fri Nov 08 2013 Jens Lody - 0-0.1.git0d20641 +- Initial package for Fedora of the weather-extension fork using http://openweathermap.org + diff --git a/gnome-shell-extension-weather.cbp b/gnome-shell-extension-weather.cbp new file mode 100644 index 0000000..27d8710 --- /dev/null +++ b/gnome-shell-extension-weather.cbp @@ -0,0 +1,134 @@ + + + + + + diff --git a/update_revision.sh b/update_revision.sh new file mode 100755 index 0000000..d58ce2e --- /dev/null +++ b/update_revision.sh @@ -0,0 +1,55 @@ +#!/bin/sh + +GITHUB="jenslody-gnome-shell-extension-weather" +BASE_URL="https://github.com/jenslody/gnome-shell-extension-weather/tarball/master/" +TARBALL_PATH="/home/jens/rpmbuild/SOURCES/" +SPEC_PATH="/home/jens/rpmbuild/SPECS/" +SPEC_FILE="gnome-shell-extension-openweather.spec" + +SCRIPT_DIR=`dirname "$0"` +#echo "x${SCRIPT_DIR}x" +SCRIPT_DIR=`( cd "$SCRIPT_DIR" && pwd )` +#echo "y${SCRIPT_DIR}y" + + +if test -z "$1"; then + branch="master" +else + branch="$1" +fi + + +# make sure git answers in english +export LC_ALL="C" + +# let's import OLD_REV (if there) +if [ -f ./.last_commit ]; then + . ./.last_commit +else + OLD_COMMIT=0 +fi + +cd "$SCRIPT_DIR" + +git checkout $branch +git pull +echo "Using 'git log -1' to get the newest commit" +COMMIT=`git log -1 --pretty=format:"%h"` + +echo "Found revision: '${COMMIT}'" + +mv ${SPEC_FILE} ${SPEC_FILE}.tmp +sed "1 s/%global git .*/%global git $COMMIT/" < ${SPEC_FILE}.tmp > ${SPEC_FILE} +rm -f ${SPEC_FILE}.tmp +cp ${SPEC_FILE} ${SPEC_PATH}${SPEC_FILE} + +rm -f ${TARBALL_PATH}${GITHUB}-*.tar.gz +wget -c ${BASE_URL}${GITHUB}-${COMMIT}.tar.gz -O ${TARBALL_PATH}${GITHUB}-${COMMIT}.tar.gz + +cd ${SPEC_PATH} +rm -f ../SRPMS/${GITHUB}*.src.rpm +rpmbuild -bs ${SPEC_FILE} + +echo "OLD_COMMIT=$COMMIT" > ./.last_commit + +exit 0