[leafpad] Fix desktop vendor conditionals
Christoph Wickert
cwickert at fedoraproject.org
Tue May 14 11:22:35 UTC 2013
commit 4ae2084728af22813b0524f974bc685f4dec080b
Author: Christoph Wickert <cwickert at fedoraproject.org>
Date: Tue May 14 13:22:32 2013 +0200
Fix desktop vendor conditionals
- Spec file clean-up
leafpad.spec | 39 ++++++++++++++++++++++++---------------
1 files changed, 24 insertions(+), 15 deletions(-)
---
diff --git a/leafpad.spec b/leafpad.spec
index 38bd83a..bbe35d5 100644
--- a/leafpad.spec
+++ b/leafpad.spec
@@ -4,7 +4,7 @@
Name: leafpad
Version: 0.8.18.1
-Release: 8%{?dist}
+Release: 9%{?dist}
Summary: GTK+ based simple text editor
@@ -14,7 +14,8 @@ URL: http://tarot.freeshell.org/leafpad/
Source0: http://savannah.nongnu.org/download/leafpad/%{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-BuildRequires: gtk2-devel >= 2.4 desktop-file-utils
+BuildRequires: gtk2-devel >= 2.4
+BuildRequires: desktop-file-utils
BuildRequires: gettext
BuildRequires: intltool
@@ -23,37 +24,39 @@ Leafpad is a GTK+ based simple text editor. The user interface is similar to
Notepad. It aims to be lighter than GEdit and KWrite, and to be as useful as
them.
+
%prep
%setup -q
+
%build
%configure --enable-chooser
make %{?_smp_mflags}
-cat>>data/leafpad.desktop<<EOF
-StartupNotify=true
-GenericName=Text Editor
-GenericName[de]=Texteditor
-EOF
+
%install
-rm -rf $RPM_BUILD_ROOT
-make install DESTDIR=$RPM_BUILD_ROOT
-desktop-file-install \
- --dir $RPM_BUILD_ROOT%{_datadir}/applications \
-%if %{with_desktop_vendor_tag}
+rm -rf %{buildroot}
+make install DESTDIR=%{buildroot}
+
+desktop-file-install --delete-original \
+ --dir %{buildroot}%{_datadir}/applications \
+%if (0%{?fedora} && 0%{?fedora} < 19) || (0%{?rhel} && 0%{?rhel} < 7)
--vendor fedora \
%endif
- --delete-original \
- $RPM_BUILD_ROOT%{_datadir}/applications/leafpad.desktop
+ %{buildroot}%{_datadir}/applications/leafpad.desktop
+
%find_lang %{name}
+
%clean
-rm -rf $RPM_BUILD_ROOT
+rm -rf %{buildroot}
+
%post
update-desktop-database &> /dev/null || :
touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
+
%postun
update-desktop-database &> /dev/null || :
if [ $1 -eq 0 ] ; then
@@ -61,9 +64,11 @@ if [ $1 -eq 0 ] ; then
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
fi
+
%posttrans
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
+
%files -f %{name}.lang
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog COPYING README
@@ -73,6 +78,10 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%{_datadir}/pixmaps/leafpad.*
%changelog
+* Tue May 14 2013 Christoph Wickert <cwickert at fedoraproject.org> - 0.8.18.1-9
+- Fix desktop vendor conditionals
+- Spec file clean-up
+
* Wed Apr 24 2013 Jon Ciesla <limburgher at gmail.com> - 0.8.18.1-8
- Added conditionals.
More information about the scm-commits
mailing list