[thermostat/f19] Add thermostat icon and systemd requires.

jerboaa jerboaa at fedoraproject.org
Fri May 31 13:12:29 UTC 2013


commit 6c3ec290f6fde3d4a6c4966eba3170cd85352b41
Author: Severin Gehwolf <sgehwolf at redhat.com>
Date:   Fri May 31 15:08:32 2013 +0200

    Add thermostat icon and systemd requires.

 thermostat.spec          |   40 +++++++++++++++++++++++++++++--
 thermostat_icon_64px.svg |   58 ++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 95 insertions(+), 3 deletions(-)
---
diff --git a/thermostat.spec b/thermostat.spec
index a532ad4..f52195c 100644
--- a/thermostat.spec
+++ b/thermostat.spec
@@ -10,7 +10,7 @@ Name:       thermostat
 Version:    0.9.2
 # If building from snapshot out of hg, uncomment and adjust below value as appropriate
 #Release:    0.1.20130521hg%{hgrev}%{?dist}
-Release:    2%{?dist}
+Release:    3%{?dist}
 Summary:    A monitoring and serviceability tool for OpenJDK
 License:    GPLv2+ with exceptions
 URL:        http://icedtea.classpath.org/thermostat/
@@ -22,6 +22,7 @@ Source0:    http://icedtea.classpath.org/download/%{name}/%{name}-%{version}.tar
 # This is _NOT_ suitable for upstream at this point.
 # It's very Fedora specific.
 Source1:    thermostat-sysconfig
+Source2:    thermostat_icon_64px.svg
 # FIXME: This has been fixed upstream with rev 9c20c3b08192.
 #        Should get removed next release.
 Patch0:     init_layout_new.patch
@@ -128,6 +129,9 @@ Requires: google-gson
 Requires: apache-commons-fileupload
 Requires: httpcomponents-core
 Requires: httpcomponents-client
+Requires(post): systemd
+Requires(preun): systemd
+Requires(postun): systemd
 # At this point some of the icons in thermostat are hard-coded to
 # gnome icons. This is going to change upstream. Once that's done
 # (self-contained within thermostat) we can remove this again.
@@ -334,7 +338,12 @@ mkdir -p %{buildroot}%{_datarootdir}
 # JNI things live there
 mkdir -p %{buildroot}%{_libdir}/%{name}
 mkdir -p %{buildroot}%{_jnidir}
+# Systemd files live there
 mkdir -p %{buildroot}%{_unitdir}
+# Thermostat icon lives there
+mkdir -p %{buildroot}%{_datarootdir}/icons/hicolor/scalable/apps
+# Thermostat desktop lives there
+mkdir -p %{buildroot}%{_datarootdir}/applications
 
 # Dance the xmvn install limbo. This only makes sense if %mvn_build does NOT
 # have the '-i' switch.
@@ -379,10 +388,16 @@ cp -a *.service %{buildroot}%{_unitdir}/
 popd
 rm -rf distribution/target/systemd
 
-# remove agent/storage directories which get symlinked later
+# Remove agent/storage directories which get symlinked later
 rm -r distribution/target/storage/{db,run,logs}
 rm -r distribution/target/agent/{run,logs}
 
+# Move the thermostat desktop file to /usr/share/applications
+# This makes "thermostat gui" show up in gnome shell.
+cp distribution/target/%{name}.desktop %{buildroot}%{_datarootdir}/applications/%{name}.desktop
+# Install the SVG icon
+cp %{SOURCE2} %{buildroot}%{_datarootdir}/icons/hicolor/scalable/apps/%{name}.svg
+
 # move everything else into /usr/share/thermostat
 cp -a distribution/target %{buildroot}%{_datarootdir}/%{name}
 
@@ -533,24 +548,39 @@ popd
     -s /sbin/nologin -r -d %{_datarootdir}/%{name} thermostat 2>/dev/null || :
 
 %post
-# install but don't activate
+# Install but don't activate
 %systemd_post %{name}-agent.service
 %systemd_post %{name}-storage.service
+# Required for icon cache (i.e. Thermostat icon)
+/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
 
 %preun
 %systemd_preun %{name}-agent.service
 %systemd_preun %{name}-storage.service
 
 %postun
+# Required for icon cache (i.e. Thermostat icon)
+if [ $1 -eq 0 ] ; then
+    /bin/touch --no-create %{_datadir}/icons/hicolor &> /dev/null
+    /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
+fi
 %systemd_postun %{name}-agent.service
 %systemd_postun %{name}-storage.service
 
+%posttrans
+# Required for icon cache (i.e. Thermostat icon)
+/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
+
 %files -f .mfiles
 %doc COPYING
 %doc LICENSE
 %doc README
 %config(noreplace) %{_sysconfdir}/%{name}
 %config(noreplace) %{_sysconfdir}/sysconfig/%{name}
+# thermostat.desktop lives in /usr/share/applications
+%{_datarootdir}/applications/%{name}.desktop
+# thermostat icon
+%{_datarootdir}/icons/hicolor/scalable/apps/%{name}.svg
 %{_datarootdir}/%{name}
 %{_libdir}/%{name}
 %{_jnidir}/thermostat-*.jar
@@ -575,6 +605,10 @@ popd
 %{_datadir}/tomcat/webapps/%{name}
 
 %changelog
+* Fri May 31 2013 Severin Gehwolf <sgehwolf at redhat.com> 0.9.2-3
+- Add thermostat SVG icon.
+- Add systemd requires.
+
 * Wed May 29 2013 Severin Gehwolf <sgehwolf at redhat.com> 0.9.2-2
 - Fix warning on uninstall.
 
diff --git a/thermostat_icon_64px.svg b/thermostat_icon_64px.svg
new file mode 100644
index 0000000..2eadc18
--- /dev/null
+++ b/thermostat_icon_64px.svg
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+	 width="64px" height="59.667px" viewBox="0 0 64 59.667" enable-background="new 0 0 64 59.667" xml:space="preserve">
+<g>
+	<path fill="#27426E" d="M42.784,15.393l-2.005-1.643c-0.867-1.703-1.208-4.423-1.255-4.839l0.019-0.051c0,0-0.01,0.008-0.023,0.021
+		c-0.002-0.018-0.003-0.032-0.003-0.032l-0.022,0.048c-0.327,0.264-2.485,1.951-4.301,2.548l-2.343-0.224
+		C22.383,9.409,11.607,14.769,6.992,24.883C1.501,36.919,6.805,51.126,18.838,56.616c12.035,5.491,26.24,0.186,31.732-11.848
+		C55.398,34.188,51.88,21.933,42.784,15.393z"/>
+	<circle fill="#3970AF" cx="31.146" cy="29.642" r="15.494"/>
+	<circle fill="#FFFFFF" cx="31.464" cy="28.886" r="13.944"/>
+	<path fill="#3970AF" d="M38.798,16.854l1.98,0.656l-1.593-1.315c-0.653-1.292-0.909-3.343-0.946-3.661l0.014-0.037
+		c0,0-0.008,0.009-0.017,0.016c-0.002-0.016-0.003-0.024-0.003-0.024l-0.017,0.038c-0.248,0.197-1.889,1.479-3.268,1.934
+		l-2.042-0.196l1.872,0.904l-3.314,13.718L38.798,16.854z"/>
+</g>
+<g>
+	<path fill="#27426E" d="M5.93,16.927l-3.868-2.781c-0.126-0.09-0.33-0.199-0.59-0.199c-0.312,0-0.59,0.152-0.789,0.43
+		c-0.206,0.287-0.258,0.611-0.144,0.914c0.086,0.23,0.247,0.381,0.364,0.467l3.87,2.785c0.176,0.124,0.376,0.189,0.579,0.189
+		c0.313,0,0.606-0.152,0.799-0.421C6.484,17.846,6.393,17.265,5.93,16.927z"/>
+	<path fill="#27426E" d="M10.119,12.554l-3.2-3.534C6.722,8.801,6.463,8.681,6.191,8.681c-0.167,0-0.42,0.049-0.67,0.273
+		c-0.428,0.387-0.459,0.977-0.076,1.396l3.202,3.535c0.194,0.215,0.451,0.333,0.724,0.333c0.243,0,0.482-0.095,0.673-0.269
+		c0.263-0.238,0.384-0.558,0.331-0.879C10.337,12.834,10.214,12.658,10.119,12.554z"/>
+	<path fill="#27426E" d="M12.765,5.015c-0.276-0.479-0.861-0.643-1.355-0.355c-0.495,0.286-0.648,0.854-0.366,1.35l2.39,4.128
+		c0.18,0.313,0.494,0.499,0.839,0.499c0.175,0,0.354-0.05,0.514-0.143c0.308-0.179,0.493-0.465,0.508-0.789
+		c0.013-0.24-0.07-0.438-0.141-0.561L12.765,5.015z"/>
+	<path fill="#27426E" d="M19.29,2.329c-0.171-0.529-0.704-0.811-1.251-0.63c-0.342,0.11-0.51,0.326-0.591,0.484
+		c-0.117,0.229-0.131,0.501-0.046,0.759l1.478,4.535c0.135,0.414,0.497,0.684,0.922,0.684c0.11,0,0.221-0.018,0.33-0.055
+		c0.545-0.178,0.813-0.701,0.637-1.244L19.29,2.329z"/>
+	<path fill="#27426E" d="M26.239,1.054c-0.056-0.519-0.453-0.881-0.965-0.881L25.147,0.18c-0.571,0.062-0.942,0.517-0.883,1.085
+		l0.503,4.742c0.056,0.519,0.457,0.881,0.975,0.881L25.86,6.88c0.352-0.036,0.639-0.225,0.785-0.514
+		c0.109-0.215,0.113-0.43,0.098-0.57L26.239,1.054z"/>
+	<path fill="#27426E" d="M32.428,0.177l-0.124-0.006c-0.515,0-0.912,0.364-0.966,0.883l-0.504,4.74
+		c-0.06,0.561,0.32,1.024,0.885,1.086l0.125,0.008c0.513,0,0.91-0.364,0.966-0.883l0.501-4.742
+		C33.372,0.696,33.001,0.239,32.428,0.177z"/>
+	<path fill="#27426E" d="M39.531,1.702c-0.542-0.177-1.076,0.1-1.25,0.627l-1.486,4.529c-0.174,0.533,0.098,1.07,0.637,1.248
+		c0.117,0.037,0.23,0.055,0.343,0.055c0.42,0,0.767-0.262,0.907-0.684l1.485-4.528c0.045-0.134,0.085-0.346,0.024-0.579
+		C40.108,2.058,39.869,1.814,39.531,1.702z"/>
+	<path fill="#27426E" d="M46.157,4.663c-0.494-0.287-1.079-0.121-1.353,0.355l-2.39,4.129c-0.28,0.487-0.121,1.066,0.369,1.352
+		c0.169,0.098,0.344,0.145,0.52,0.145c0.339,0,0.65-0.188,0.831-0.502l2.389-4.128c0.139-0.24,0.179-0.507,0.114-0.755
+		C46.589,5.085,46.469,4.841,46.157,4.663z"/>
+	<path fill="#27426E" d="M52.38,9.64c-0.009-0.18-0.076-0.444-0.343-0.686c-0.249-0.229-0.501-0.276-0.67-0.276
+		c-0.271,0-0.527,0.121-0.728,0.338l-3.201,3.536c-0.182,0.199-0.275,0.452-0.262,0.708c0.013,0.261,0.132,0.505,0.337,0.69
+		c0.25,0.226,0.503,0.273,0.671,0.273c0.272,0,0.531-0.123,0.726-0.34l3.2-3.531C52.296,10.148,52.392,9.896,52.38,9.64z"/>
+	<path fill="#27426E" d="M57.086,15.132c0.031-0.178,0.021-0.45-0.189-0.741c-0.199-0.278-0.48-0.429-0.79-0.429
+		c-0.26,0-0.462,0.105-0.59,0.197l-3.874,2.783c-0.22,0.156-0.363,0.382-0.406,0.637c-0.042,0.256,0.023,0.52,0.183,0.744
+		c0.201,0.276,0.48,0.43,0.792,0.43c0.258,0,0.463-0.107,0.589-0.199l3.874-2.781C56.9,15.612,57.046,15.385,57.086,15.132z"/>
+	<path fill="#27426E" d="M60.428,21.624c0.178-0.271,0.2-0.61,0.058-0.936c-0.166-0.379-0.496-0.603-0.881-0.603
+		c-0.179,0-0.327,0.046-0.422,0.088l-4.366,1.918c-0.248,0.107-0.435,0.299-0.527,0.539c-0.095,0.242-0.085,0.515,0.024,0.766
+		c0.166,0.377,0.496,0.605,0.879,0.605c0.141,0,0.286-0.03,0.423-0.093l4.365-1.917C60.112,21.935,60.296,21.826,60.428,21.624z"/>
+	<path fill="#27426E" d="M57.268,29.762l4.668-0.97c0.272-0.057,0.496-0.204,0.636-0.418c0.101-0.149,0.201-0.4,0.129-0.758
+		c-0.101-0.48-0.472-0.792-0.945-0.792c-0.076,0-0.152,0.008-0.222,0.021l-4.671,0.971c-0.549,0.115-0.876,0.62-0.761,1.174
+		c0.101,0.482,0.471,0.793,0.944,0.793C57.119,29.783,57.193,29.776,57.268,29.762z"/>
+	<path fill="#27426E" d="M63.146,34.131c-0.179-0.181-0.431-0.281-0.707-0.285l-4.773-0.028c-0.557,0-0.98,0.424-0.985,0.985
+		c-0.002,0.359,0.147,0.587,0.273,0.716c0.181,0.181,0.43,0.282,0.707,0.282l4.773,0.03c0.566,0,0.979-0.415,0.983-0.985
+		C63.421,34.485,63.271,34.259,63.146,34.131z"/>
+</g>
+</svg>


More information about the scm-commits mailing list