Browse Source

libgphoto2: update to 2.4.11, add udev rules, move udev script to correct place.

git-svn-id: http://trac.vinelinux.org/repos/projects/specs@4100 ec354946-7b23-47d6-9f5a-488ba84defc7
daisuke 13 years ago
parent
commit
60686476dc
1 changed files with 33 additions and 20 deletions
  1. 33 20
      lib/libg/libgphoto2/libgphoto2-vl.spec

+ 33 - 20
lib/libg/libgphoto2/libgphoto2-vl.spec

@@ -1,16 +1,20 @@
 Summary: Library for accessing digital cameras
 Summary(ja): デジタルカメラにアクセスするためのライブラリ
 Name: libgphoto2
-Version: 2.4.5
-Release: 2%{?_dist_release}
+Version: 2.4.11
+Release: 1%{?_dist_release}
+
 # GPLV2+ for the main lib (due to exif.c) and most plugins, some plugins GPLv2
 License: GPLv2+ and GPLv2
 Group: System Environment/Libraries
+URL: http://www.gphoto.org/
+
 Source0: http://downloads.sourceforge.net/gphoto/libgphoto2-%{version}.tar.bz2
 Patch1: gphoto2-pkgcfg.patch
 Patch2: gphoto2-storage.patch
 Patch3: gphoto2-ixany.patch
-URL: http://www.gphoto.org/
+Patch4: gphoto2-maxentries.patch
+Patch5: gphoto2-device-return.patch
 
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
 BuildRequires: libusb-devel >= 0.1.5
@@ -53,8 +57,16 @@ use libgphoto2.
 %patch1 -p1 -b .pkgcfg
 %patch2 -p1 -b .storage
 %patch3 -p1 -b .ixany
-#patch6 -p1 -b .libusb-build
-
+%patch4 -p1 -b .maxentries
+%patch5 -p1 -b .device-return
+
+for i in AUTHORS COPYING libgphoto2_port/AUTHORS libgphoto2_port/COPYING.LIB $(find -name 'README.*'); do
+        mv ${i} ${i}.old
+        iconv -f ISO-8859-1 -t UTF-8 < ${i}.old > ${i}
+        touch -r ${i}.old ${i} || :
+        rm -f ${i}.old
+done
+				
 # FIXME: These .pc.in files aren't actually being installed?
 cat > gphoto2.pc.in << \EOF
 prefix=@prefix@
@@ -73,14 +85,9 @@ EOF
 sed 's/Name: gphoto2/Name: gphoto2-port/' < gphoto2.pc.in > gphoto2-port.pc.in
 
 %build
-# Patch6 changes configure.ac, so we run autoreconf.
-# This also installs our patched libtool.m4, avoiding the rpath problem.
-# But fix a typo first:
-sed -i 's/\(AC_SUBST([^,]*\)}/\1/' {m4m,libgphoto2_port/m4}/gp-documentation.m4
-sed -i 's/\(m4_pattern_\)disallow/\1forbid/g' {m4m,libgphoto2_port/m4}/gp-check-library.m4
-autoreconf -i --force
 export CFLAGS=$RPM_OPT_FLAGS
 %configure \
+	udevscriptdir='/lib/udev' \
 	--with-drivers=all \
 	--with-doc-dir=%{_docdir}/%{name} \
 	--disable-static \
@@ -100,14 +107,15 @@ export CAMLIBS=$RPM_BUILD_ROOT%{_libdir}/%{name}/%{version}
 export LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir}
 $RPM_BUILD_ROOT%{_libdir}/%{name}/print-camera-list hal-fdi | \
 grep -v "<!-- This file was generated" > $RPM_BUILD_ROOT/%{_datadir}/hal/fdi/information/20thirdparty/10-camera-libgphoto2.fdi
-popd
 
-for i in AUTHORS COPYING; do
-	mv ${i} ${i}.old
-	iconv -f cp1250 -t utf-8 < ${i}.old > ${i}
-	touch -r ${i}.old ${i} || :
-	rm -f ${i}.old
-done
+# Output udev rules for device identification; this is used by GVfs gphoto2
+# backend and others.
+#
+# Btw, since it's /lib/udev, never e.g. /lib64/udev, we hardcode the path
+#
+mkdir -p $RPM_BUILD_ROOT/lib/udev/rules.d
+$RPM_BUILD_ROOT%{_libdir}/%{name}/print-camera-list udev-rules version 136 > $RPM_BUILD_ROOT/lib/udev/rules.d/40-libgphoto2.rules
+popd
 
 rm -rf %{buildroot}%{_libdir}/libgphoto2/*/*a
 rm -rf %{buildroot}%{_libdir}/libgphoto2_port/*/*a
@@ -132,8 +140,8 @@ rm -rf "${RPM_BUILD_ROOT}"
 %{_libdir}/libgphoto2/*/*.so
 %{_libdir}/*.so.*
 %{_datadir}/hal/fdi/information/20thirdparty/10-camera-libgphoto2.fdi
-%{_libdir}/udev/check-ptp-camera
-%{_libdir}/udev/check-mtp-device
+/lib/udev/rules.d/40-libgphoto2.rules
+/lib/udev/check-ptp-camera
 
 %post -p /sbin/ldconfig
 
@@ -152,6 +160,11 @@ rm -rf "${RPM_BUILD_ROOT}"
 
 
 %changelog
+* Fri Jun 10 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 2.4.11-1
+- update to 2.4.11
+- install udev script to /lib/udev
+- add udev rules
+
 * Thu Sep 23 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.4.5-2
 - rebuild with rpm-4.8.1 for pkg-config file