[libgphoto2/f18] fix camera detection - thanks to Panu Matilainen (#912040)

Jindrich Novy jnovy at fedoraproject.org
Mon Feb 18 16:13:57 UTC 2013


commit 3440623539e9a90d4b60f700e0178a51e191db8b
Author: Jindrich Novy <jnovy at redhat.com>
Date:   Mon Feb 18 17:13:45 2013 +0100

    fix camera detection - thanks to Panu Matilainen (#912040)

 libgphoto2.spec |   17 +++++++++++------
 1 files changed, 11 insertions(+), 6 deletions(-)
---
diff --git a/libgphoto2.spec b/libgphoto2.spec
index cd4ec4a..7c4c259 100644
--- a/libgphoto2.spec
+++ b/libgphoto2.spec
@@ -1,7 +1,9 @@
+%global udevdir %(pkg-config --variable=udevdir udev)
+
 Summary: Library for accessing digital cameras
 Name: libgphoto2
 Version: 2.5.0
-Release: 7%{?dist}
+Release: 8%{?dist}
 # GPLV2+ for the main lib (due to exif.c) and most plugins, some plugins GPLv2
 License: GPLv2+ and GPLv2
 Group: Development/Libraries
@@ -86,7 +88,7 @@ export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
 #libusb and libusb have shoved their .pc files into /lib[64]/pkgconfig
 export PKG_CONFIG_PATH=/%{_lib}/pkgconfig
 %configure \
-	udevscriptdir='%{_libdir}/udev' \
+	udevscriptdir=%{udevdir} \
 	--with-drivers=all \
 	--with-doc-dir=%{_docdir}/%{name} \
 	--disable-static \
@@ -115,8 +117,8 @@ export LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir}
 #
 # Btw, since it's /lib/udev, never e.g. /lib64/udev, we hardcode the path
 #
-mkdir -p $RPM_BUILD_ROOT%{_libdir}/udev/rules.d
-$RPM_BUILD_ROOT%{_libdir}/%{name}/print-camera-list udev-rules version 136 > $RPM_BUILD_ROOT%{_libdir}/udev/rules.d/40-libgphoto2.rules
+mkdir -p $RPM_BUILD_ROOT%{udevdir}/rules.d
+$RPM_BUILD_ROOT%{_libdir}/%{name}/print-camera-list udev-rules version 136 > $RPM_BUILD_ROOT%{udevdir}/rules.d/40-libgphoto2.rules
 popd
 
 # remove circular symlink in /usr/include/gphoto2 (#460807)
@@ -147,8 +149,8 @@ rm -rf "${RPM_BUILD_ROOT}"
 %{_libdir}/libgphoto2_port/*/*.so
 %{_libdir}/libgphoto2/*/*.so
 %{_libdir}/*.so.*
-%{_libdir}/udev/rules.d/40-libgphoto2.rules
-%{_libdir}/udev/check-ptp-camera
+%{udevdir}/rules.d/40-libgphoto2.rules
+%{udevdir}/check-ptp-camera
 
 %post -p /sbin/ldconfig
 
@@ -166,6 +168,9 @@ rm -rf "${RPM_BUILD_ROOT}"
 %{_mandir}/man3/*
 
 %changelog
+* Sun Feb 17 2013 Jindrich Novy <jnovy at redhat.com> 2.5.0-8
+- fix camera detection - thanks to Panu Matilainen (#912040)
+
 * Wed Jan 30 2013 Jindrich Novy <jnovy at redhat.com> 2.5.0-7
 - move /lib files to /usr/lib
 - fix changelog


More information about the scm-commits mailing list