From be430ee5f73a6c5833d79856a56888b97f2a57889f1693473bef9ba7304bc260 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Wed, 17 Oct 2012 12:59:38 +0000 Subject: [PATCH] Accepting request 138502 from openSUSE:Factory:Staging:Systemd - fix build with new udev rules location OBS-URL: https://build.opensuse.org/request/show/138502 OBS-URL: https://build.opensuse.org/package/show/graphics/libgphoto2?expand=0&rev=89 --- libgphoto2.changes | 5 +++++ libgphoto2.spec | 14 ++++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/libgphoto2.changes b/libgphoto2.changes index a8f22f8..34ffb74 100644 --- a/libgphoto2.changes +++ b/libgphoto2.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Oct 17 12:44:36 UTC 2012 - fcrozat@suse.com + +- fix build with new udev rules location + ------------------------------------------------------------------- Wed Oct 3 16:23:37 UTC 2012 - coolo@suse.com diff --git a/libgphoto2.spec b/libgphoto2.spec index e081352..0db8c11 100644 --- a/libgphoto2.spec +++ b/libgphoto2.spec @@ -16,6 +16,12 @@ # +%if %( echo `rpm -q --queryformat %%{version} udev` ) > 190 +%define _udevrulesdir /usr/lib/udev/rules.d +%else +%define _udevrulesdir /lib/udev/rules.d +%endif + %define major 6 Name: libgphoto2 @@ -121,12 +127,12 @@ cat libgphoto2-%{major}.lang libgphoto2_port-10.lang > libgphoto2-all.lang pushd packaging/generic export CAMLIBS=$RPM_BUILD_ROOT/%_libdir/libgphoto2/%version/ # new style UDEV rules (gudev) which will obsolete HAL fdi files - if [ ! -d /lib/udev/rules.d/ ] ; then + if [ ! -d %{_udevrulesdir} ] ; then echo "*** The udev rules file location has changed. Fix the build." exit 1 fi - install -m 0755 -d $RPM_BUILD_ROOT/lib/udev/rules.d/ - ./print-camera-list udev-rules version 175 > $RPM_BUILD_ROOT/lib/udev/rules.d/40-libgphoto2.rules + install -m 0755 -d $RPM_BUILD_ROOT%{_udevrulesdir} + ./print-camera-list udev-rules version 175 > $RPM_BUILD_ROOT%{_udevrulesdir}/40-libgphoto2.rules popd # udev helpers not used here. rm $RPM_BUILD_ROOT/usr/%_lib/udev/check-ptp-camera @@ -149,7 +155,7 @@ find "%buildroot/%_libdir" -type f -name "*.la" -delete %{_libdir}/libgphoto2_port.so.* %{_mandir}/man3/libgphoto2.3* %{_mandir}/man3/libgphoto2_port.3* -/lib/udev/rules.d/40-libgphoto2.rules +%{_udevrulesdir}/40-libgphoto2.rules %files -n libgphoto2-%{major}-lang -f libgphoto2-all.lang