[d-feet] Modernize the spec file
Kalev Lember
kalev at fedoraproject.org
Fri Nov 9 20:12:39 UTC 2012
commit 92bca03bf8dd9b63b2cb70b7b1f8312e3d0b92d8
Author: Kalev Lember <kalevlember at gmail.com>
Date: Fri Nov 9 21:07:24 2012 +0100
Modernize the spec file
d-feet.spec | 44 ++++++++++++++------------------------------
1 files changed, 14 insertions(+), 30 deletions(-)
---
diff --git a/d-feet.spec b/d-feet.spec
index bbbdd79..d924ae9 100644
--- a/d-feet.spec
+++ b/d-feet.spec
@@ -1,5 +1,3 @@
-%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
-
Name: d-feet
Version: 0.3.1
Release: 1%{?dist}
@@ -8,15 +6,12 @@ Group: Development/Tools
License: GPLv2+
URL: https://live.gnome.org/DFeet/
Source0: http://download.gnome.org/sources/d-feet/0.3/d-feet-%{version}.tar.xz
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: desktop-file-utils
-BuildRequires: python-setuptools-devel
+BuildRequires: python-setuptools
BuildRequires: gettext
Requires: pygobject3
-Requires: python-setuptools
-Requires: python >= 2.5
%description
D-Feet is an easy to use D-Bus debugger.
@@ -31,41 +26,29 @@ D-Bus objects of running programs and invoke methods on those objects.
%{__python} setup.py build
%install
-rm -rf %{buildroot}
%{__python} setup.py install --skip-build --root %{buildroot}
-desktop-file-install --vendor="" \
- --delete-original \
- --dir=%{buildroot}%{_datadir}/applications \
- %{buildroot}%{_datadir}/applications/dfeet.desktop
-
-%clean
-rm -rf %{buildroot}
+desktop-file-validate %{buildroot}%{_datadir}/applications/dfeet.desktop
%post
-touch --no-create %{_datadir}/icons/hicolor
-if [ -x %{_bindir}/gtk-update-icon-cache ]; then
- %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
-fi
+touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
%postun
-touch --no-create %{_datadir}/icons/hicolor
-if [ -x %{_bindir}/gtk-update-icon-cache ]; then
- %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
+if [ $1 -eq 0 ] ; then
+ touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
+ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
fi
+%posttrans
+gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
+
%files
-%defattr(-,root,root,-)
%doc AUTHORS COPYING README NEWS
-
-%{python_sitelib}/*
-%{_bindir}/%{name}
+%{python_sitelib}/dfeet/
+%{python_sitelib}/d_feet*.egg-info
+%{_bindir}/d-feet
%{_datadir}/dfeet/
-%{_datadir}/icons/hicolor/256x256/apps/*.png
-%{_datadir}/icons/hicolor/48x48/apps/*.png
-%{_datadir}/icons/hicolor/32x32/apps/*.png
-%{_datadir}/icons/hicolor/24x24/apps/*.png
-%{_datadir}/icons/hicolor/16x16/apps/*.png
+%{_datadir}/icons/hicolor/*/apps/*.png
%{_datadir}/icons/hicolor/scalable/apps/d-feet.svg
%{_datadir}/applications/dfeet.desktop
@@ -73,6 +56,7 @@ fi
* Fri Nov 09 2012 Kalev Lember <kalevlember at gmail.com> - 0.3.1-1
- Update to 0.3.1
- Adjust deps for the switch to gobject-introspection
+- Modernize the spec file
* Wed Oct 17 2012 Kalev Lember <kalevlember at gmail.com> - 0.1.15-1
- Update to 0.1.15
More information about the scm-commits
mailing list