[xsane] use less obscure constructs to handle the vendor tag
Nils Philippsen
nphilipp at fedoraproject.org
Thu Mar 7 10:22:43 UTC 2013
commit a0dea1330e68831ab0792ea8863adc9d10e419e1
Author: Nils Philippsen <nils at redhat.com>
Date: Thu Mar 7 10:29:03 2013 +0100
use less obscure constructs to handle the vendor tag
xsane.spec | 20 +++++++++++++-------
1 files changed, 13 insertions(+), 7 deletions(-)
---
diff --git a/xsane.spec b/xsane.spec
index ee63f12..e631a52 100644
--- a/xsane.spec
+++ b/xsane.spec
@@ -1,10 +1,9 @@
# if you rebuild, please change bugtracker_url accordingly:
%global bugtracker_url http://bugzilla.redhat.com
-%if ! 0%{?fedora}%{?rhel} || 0%{?fedora} >= 19 || 0%{?rhel} >= 7
-%bcond_with desktop_vendor_tag
-%else
-%bcond_without desktop_vendor_tag
+# Drop the vendor tag from Fedora 19 on
+%if 0%{?fedora}%{?rhel} && (0%{?fedora} < 19 || 0%{?rhel} < 7)
+%global with_desktop_vendor_tag 1
%endif
%global gimpplugindir %(gimptool --gimpplugindir 2>/dev/null || echo INVALID)/plug-ins
@@ -170,7 +169,10 @@ install -m 0755 build-with-gimp/src/xsane %{buildroot}%{gimpplugindir}
# install customized desktop file
rm %{buildroot}%{_datadir}/applications/xsane.desktop
-desktop-file-install %{?with_desktop_vendor_tag:--vendor fedora} \
+desktop-file-install \
+%if %{with desktop_vendor_tag}
+ --vendor fedora \
+%endif
--dir %{buildroot}%{_datadir}/applications \
src/xsane.desktop
@@ -209,7 +211,11 @@ fi
%doc xsane.ACCELKEYS xsane.AUTHOR xsane.BEGINNERS-INFO xsane.BUGS xsane.CHANGES xsane.COPYING xsane.FAQ xsane.LANGUAGES xsane.LOGO xsane.NEWS xsane.ONLINEHELP xsane.PROBLEMS xsane.ROOT xsane.TODO
%{_bindir}/xsane
%{_mandir}/man1/*
-%{_datadir}/applications/%{?with_desktop_vendor_tag:fedora-}xsane.desktop
+%if %{with desktop_vendor_tag}
+%{_datadir}/applications/fedora-xsane.desktop
+%else
+%{_datadir}/applications/xsane.desktop
+%endif
%{_datadir}/pixmaps/xsane.xpm
%{iconrootdir}
@@ -224,7 +230,7 @@ fi
%{_datadir}/sane/xsane
%changelog
-* Wed Mar 06 2013 Nils Philippsen <nils at redhat.com>
+* Thu Mar 07 2013 Nils Philippsen <nils at redhat.com>
- retain vendor tag up to Fedora 18
* Mon Feb 12 2013 Parag Nemade <paragn AT fedoraproject DOT org> - 0.998-17
More information about the scm-commits
mailing list