From c32df3ea9ed3188be0171235ea38465e122f5c34 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fran=C3=A7ois=20Andriot?= <albator78@libertysurf.fr>
Date: Wed, 31 Dec 2014 11:52:04 +0100
Subject: RPM packaging: update tdebase

---
 redhat/main/tdebase/tdebase-14.0.0.spec | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/redhat/main/tdebase/tdebase-14.0.0.spec b/redhat/main/tdebase/tdebase-14.0.0.spec
index 48875cae7..99e7baae5 100644
--- a/redhat/main/tdebase/tdebase-14.0.0.spec
+++ b/redhat/main/tdebase/tdebase-14.0.0.spec
@@ -947,9 +947,11 @@ Group:		System/GUI/Other
 Requires:	%{name}-data = %{version}-%{release}
 
 # Requires 'usb.ids'
-Requires:	usbutils
+Requires:		usbutils
+BuildRequires:	usbutils
 %if 0%{?suse_version} == 0
-Requires:	hwdata
+BuildRequires:	hwdata
+Requires:		hwdata
 %endif
 
 %description -n trinity-kcontrol
@@ -3668,13 +3670,13 @@ EOF
 %endif
 
 # Symlinks 'usb.ids' (Use system-provided version, not TDE provided version)
-%if 0%{?suse_version} == 1230 || 0%{?suse_version} == 1310 || 0%{?suse_version} == 1320 || 0%{?mgaversion} >= 4
-%__rm -f "%{?buildroot}%{tde_datadir}/apps/usb.ids"
-%__ln_s -f "/usr/share/usb.ids" "%{?buildroot}%{tde_datadir}/apps/usb.ids"
-%else
-%__rm -f "%{?buildroot}%{tde_datadir}/apps/usb.ids"
-%__ln_s -f "/usr/share/hwdata/usb.ids" "%{?buildroot}%{tde_datadir}/apps/usb.ids"
-%endif
+if [ -r "/usr/share/usb.ids" ]; then
+  %__rm -f "%{?buildroot}%{tde_datadir}/apps/usb.ids"
+  %__ln_s -f "/usr/share/usb.ids" "%{?buildroot}%{tde_datadir}/apps/usb.ids"
+elif [ -r "/usr/share/hwdata/usb.ids" ]; then
+  %__rm -f "%{?buildroot}%{tde_datadir}/apps/usb.ids"
+  %__ln_s -f "/usr/share/hwdata/usb.ids" "%{?buildroot}%{tde_datadir}/apps/usb.ids"
+fi
 
 # Makes 'media_safelyremove.desktop' an alternative.
 # This allows the use of 'tdeio-umountwrapper' package.
-- 
cgit v1.2.1