From 2d59a57783987e040c4261b826065ed24fa8f594 Mon Sep 17 00:00:00 2001 From: Jens Lody Date: Sat, 8 Feb 2014 12:27:33 +0100 Subject: [PATCH] Add Code::Blocks projectfile, spec-file template, specfile update-script and icon used on https://extensions.gnome.org to the repo --- data/OpenWeather.png | Bin 0 -> 1880 bytes gnome-shell-extension-openweather.spec | 52 ++++++++++ gnome-shell-extension-weather.cbp | 134 +++++++++++++++++++++++++ update_revision.sh | 55 ++++++++++ 4 files changed, 241 insertions(+) create mode 100644 data/OpenWeather.png create mode 100644 gnome-shell-extension-openweather.spec create mode 100644 gnome-shell-extension-weather.cbp create mode 100755 update_revision.sh diff --git a/data/OpenWeather.png b/data/OpenWeather.png new file mode 100644 index 0000000000000000000000000000000000000000..1a7362657650d96fb3ec376f1efbc5f9d5e656db GIT binary patch literal 1880 zcmV-e2dDUnP)QX&O0FUYtf%5+zmQx^)|0QrD(hT*tu}nVR4L1}$LLESKGLrVl$r+pRCK z1(JvTOQUmU&g|^>pPBFfeKU|j1{q}VX+l}SvAjSvU{V8W3_g~g21{_W%74So#9f)qoC##|qwYCx-*a$^F@VX((0&_74Pr}d$^bbI& z7Y1$+`FMnn1(eFwdl%>gjJ5KCUZ4kP-%x;kYc;ggLt`D36~j6=IBcM3Aat0SO^_G} zfUf|~^^mP9RDLuJ!23YgN*I4X0#$N}M}WB9MwT}R8n?g~nqg-X1k1tVmfoNy)>9GS z6yVGUUq0mJLbd}m1>!N7nx-c@PmlbMENR2-l_ubl&guuQ10Q%j)YMeKt_PvD3919K zmnL;bPuZAeuy|pU88i)41!iX8@-@B`9U)f+zU{yi&;U%QLqNMrdkiQ7Jb+(SsScLn zZfSsBJD}zPP;=$18?uO$qR7#$kZT2#3b$^ zKPAafCFPqHh(hQB{PYDl_71Gi^HJZhgU+pWxZN%$C&szbdzsUxPc=417l_ zQ`$}(0fwbIblbC-^yad;bOQv-Ajcz<3sRglnUI!n%PW`QNEe*F1q0h60=UPVO(et!|&-4_@e z8;b*1WEPMX0Tp--cp7L}h+%Tt!D&w@QN9zDEZNH>jn;rL{JRhOLh$@65b9I-#y1c1 zSo@>oy0h*(n*{|vdV6~r92|5;qtOZAbh-qxf#+r3enSXOs~T2a$L(|^)F{s(4c8Nf z5B0;T3vm1t96tm9_!l@l^?dKyXQ?z1pEZbi}1M3%OX%%Sjd3`2XHtXjE;`_!r`!Qe0;pRzrVjS5{c9UZvw9_ zSB!#^y#S{C`OMW7 zT$RdPP&{x|nl6y=U>ilU%t8mg+Isw#@2V6|GAnVDgFdKw{w4aiIPcKRUj zyRx!!T&`?PCKI}@V;BayVIT|xA;c$TSr=83&>{&%Q9dD{s)-FVKR?gV&=8SGB%CgR z0I*k8wL&2bvk+oF<#?~G!1cYj!`V*(R87+qUDqe?mu6&;K?WIQkU<8kjsF1Ho~e__ S!Q+1b0000= 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