From ee7e7435e2cfec3158c87fdb4c2716e751a57772e81aeb9c3b943c806c262755 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cristian=20Rodr=C3=ADguez?= Date: Wed, 24 Oct 2012 16:13:34 +0000 Subject: [PATCH] Accepting request 138922 from openSUSE:Factory:Staging:Systemd Fix build with new udev directory location OBS-URL: https://build.opensuse.org/request/show/138922 OBS-URL: https://build.opensuse.org/package/show/hardware/usb_modeswitch?expand=0&rev=36 --- usb_modeswitch.changes | 5 +++++ usb_modeswitch.spec | 28 ++++++++++++++++------------ 2 files changed, 21 insertions(+), 12 deletions(-) diff --git a/usb_modeswitch.changes b/usb_modeswitch.changes index b6656fb..207a8e0 100644 --- a/usb_modeswitch.changes +++ b/usb_modeswitch.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Oct 17 13:31:34 UTC 2012 - fcrozat@suse.com + +- Fix build with new udev directory location + ------------------------------------------------------------------- Fri Sep 28 12:59:57 UTC 2012 - gschlotter@suse.com diff --git a/usb_modeswitch.spec b/usb_modeswitch.spec index 8ebbc18..73afad0 100644 --- a/usb_modeswitch.spec +++ b/usb_modeswitch.spec @@ -1,7 +1,7 @@ # -# spec file for package usb_modeswitch (Version 1.1.6) +# spec file for package usb_modeswitch # -# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,26 +16,31 @@ # +%if %( echo `rpm -q --queryformat %%{version} udev` ) > 190 +%define _udevdir /usr/lib/udev/ +%else +%define _udevdir /lib/udev/ +%endif Name: usb_modeswitch Version: 1.2.3 Release: 0 Summary: A mode switching tool for controlling multiple-device USB gear +License: GPL-2.0+ Group: Hardware/Mobile Url: http://www.draisberghof.de/usb_modeswitch %define source_name usb-modeswitch %define date 20120531 -License: GPL-2.0+ Source0: http://www.draisberghof.de/usb_modeswitch/%{source_name}-%{version}.tar.bz2 Source1: %{source_name}-data-%{date}.tar.bz2 Source2: %{name}-data.rpmlintrc -Source3: 1bbb:f017 -Patch0: add_alcatel_ot_x220d.patch +Source3: 1bbb:f017 +Patch0: add_alcatel_ot_x220d.patch Patch1: huawei-timing.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build -BuildRequires: libusb-devel -BuildRequires: tcl BuildRequires: fdupes +BuildRequires: libusb-devel +BuildRequires: tcl BuildRequires: udev Requires: /bin/eject Requires: tcl >= 8.4 @@ -54,7 +59,6 @@ Authors: Josua Dietze and others %package data -License: GPL-2.0+ Summary: Data Files for USB Modeswitch Group: Hardware/Mobile Requires: %{name} = %{version} @@ -72,10 +76,10 @@ Data files for usb_modeswitch package. CFLAGS="%{optflags}" make %install -%makeinstall +%makeinstall UDEVDIR=$RPM_BUILD_ROOT%{_udevdir} cd %{source_name}-data-%{date} cp %{SOURCE3} . -%makeinstall +%makeinstall RULESDIR=$RPM_BUILD_ROOT%{_udevdir}/rules.d %fdupes -s $RPM_BUILD_ROOT %files @@ -83,7 +87,7 @@ cp %{SOURCE3} . %doc README COPYING ChangeLog %{_sbindir}/usb_modeswitch %{_sbindir}/usb_modeswitch_dispatcher -/lib/udev/usb_modeswitch +%{_udevdir}/usb_modeswitch /var/lib/usb_modeswitch %config %{_sysconfdir}/usb_modeswitch.conf %{_mandir}/man1/usb_modeswitch.1.gz @@ -91,6 +95,6 @@ cp %{SOURCE3} . %files data %defattr(-,root,root,-) %_datadir/usb_modeswitch/ -/lib/udev/rules.d/40-usb_modeswitch.rules +%{_udevdir}/rules.d/40-usb_modeswitch.rules %changelog