[qtgpsc] fix spec file to build properly

Tom Callaway spot at fedoraproject.org
Tue Aug 23 14:21:06 UTC 2011


commit f193aa13dde356c8582593489a128b03e062c4fe
Author: Tom "spot" Callaway <tcallawa at redhat.com>
Date:   Tue Aug 23 10:20:50 2011 -0400

    fix spec file to build properly

 qtgpsc.spec |   25 +++++++++++++++++--------
 1 files changed, 17 insertions(+), 8 deletions(-)
---
diff --git a/qtgpsc.spec b/qtgpsc.spec
index 3cb9d18..dabbd04 100644
--- a/qtgpsc.spec
+++ b/qtgpsc.spec
@@ -4,16 +4,13 @@ Release:        1%{?dist}
 Summary:        A client for the gpsd GPS server
 
 Group:          Applications/Engineering
-License:        BSD
+License:        GPLv3
 URL:            http://code.google.com/p/qtgpsc/
 Source0:        http://qtgpsc.googlecode.com/files/%{name}-%{version}.tar.gz
 Source1:        %{name}.desktop
-Source2:        %{name}.png
 
 BuildRequires:  cmake
 BuildRequires:  desktop-file-utils
-# newer than the latest (stable) release or what's in fedora.
-# :(  -- Rex
 BuildRequires:  gpsd-devel >= 2.96
 BuildRequires:  qt4-devel
 
@@ -31,16 +28,28 @@ It can also show the raw GPS data in GPSD or NMEA format.
 make %{?_smp_mflags}
 
 %install
-install -Dp -m 0755 %{name} %{buildroot}%{_bindir}/%{name}
+make install DESTDIR=%{buildroot}
+# install -Dp -m 0755 %{name} %{buildroot}%{_bindir}/%{name}
 rm -rf .ui/ && rm -rf .obj/ && rm -rf .moc
 desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE1}
-install -Dp -m 0644 %{SOURCE2} %{buildroot}%{_datadir}/pixmaps/%{name}.png
+
+%post
+/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
+
+%postun
+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
+
+%posttrans
+/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
 
 %files
-%doc CHANGELOG LICEnSE README
+%doc CHANGELOG LICENSE README
 %{_bindir}/%{name}
 %{_datadir}/applications/%{name}.desktop
-%{_datadir}/pixmaps/%{name}.png
+%{_datadir}/icons/hicolor/48x48/apps/%{name}.png
 
 %changelog
 * Tue Aug 23 2011 Tom Callaway <spot at fedoraproject.org> - 0.3.1-1


More information about the scm-commits mailing list