libgphoto2-vl.spec 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
  1. Summary: Library for accessing digital cameras
  2. Summary(ja): デジタルカメラにアクセスするためのライブラリ
  3. Name: libgphoto2
  4. Version: 2.4.11
  5. Release: 2%{?_dist_release}
  6. # GPLV2+ for the main lib (due to exif.c) and most plugins, some plugins GPLv2
  7. License: GPLv2+ and GPLv2
  8. Group: System Environment/Libraries
  9. URL: http://www.gphoto.org/
  10. Source0: http://downloads.sourceforge.net/gphoto/libgphoto2-%{version}.tar.bz2
  11. Patch1: gphoto2-pkgcfg.patch
  12. Patch2: gphoto2-storage.patch
  13. Patch3: gphoto2-ixany.patch
  14. Patch4: gphoto2-maxentries.patch
  15. Patch5: gphoto2-device-return.patch
  16. BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
  17. BuildRequires: libusb-devel >= 0.1.5
  18. BuildRequires: libexif-devel
  19. BuildRequires: libjpeg-devel
  20. BuildRequires: pkgconfig, sharutils
  21. BuildRequires: libtool-ltdl-devel >= 2.2.6a
  22. BuildRequires: popt-devel
  23. BuildRequires: dbus-devel
  24. BuildRequires: gd-devel
  25. # we run autoreconf:
  26. BuildRequires: autoconf, automake, libtool, gettext, cvs
  27. Obsoletes: gphoto2 < 2.4.0
  28. Obsoletes: gphoto2-devel < 2.4.0
  29. %description
  30. libgphoto2 is a library that can be used by applications to access
  31. various digital cameras. libgphoto2 itself is not a GUI application,
  32. opposed to gphoto. There are GUI frontends for the gphoto2 library,
  33. however, such as gtkam for example.
  34. %package devel
  35. Summary: Headers and links to compile against the libgphoto2 library
  36. Group: Development/Libraries
  37. Requires: %{name} = %{version}-%{release}
  38. Requires: pkgconfig, libusb-devel >= 0.1.5, libexif-devel
  39. Obsoletes: gphoto2 < 2.4.0-11
  40. Obsoletes: gphoto2-devel < 2.4.0-11
  41. Provides: gphoto2-devel = %{version}-%{release}
  42. %description devel
  43. libgphoto2 is a library that can be used by applications to access
  44. various digital cameras. libgphoto2 itself is not a GUI application,
  45. opposed to gphoto. There are GUI frontends for the gphoto2 library,
  46. however, such as gtkam for example.
  47. This package contains files needed to compile applications that
  48. use libgphoto2.
  49. %prep
  50. %setup -q
  51. %patch1 -p1 -b .pkgcfg
  52. %patch2 -p1 -b .storage
  53. %patch3 -p1 -b .ixany
  54. %patch4 -p1 -b .maxentries
  55. %patch5 -p1 -b .device-return
  56. for i in AUTHORS COPYING libgphoto2_port/AUTHORS libgphoto2_port/COPYING.LIB $(find -name 'README.*'); do
  57. mv ${i} ${i}.old
  58. iconv -f ISO-8859-1 -t UTF-8 < ${i}.old > ${i}
  59. touch -r ${i}.old ${i} || :
  60. rm -f ${i}.old
  61. done
  62. # FIXME: These .pc.in files aren't actually being installed?
  63. cat > gphoto2.pc.in << \EOF
  64. prefix=@prefix@
  65. exec_prefix=@exec_prefix@
  66. libdir=@libdir@
  67. includedir=@includedir@
  68. VERSION=@VERSION@
  69. Name: gphoto2
  70. Description: Library for easy access to digital cameras
  71. Requires:
  72. Version: @VERSION@
  73. Libs: -L${libdir} -lgphoto2 -lgphoto2_port -lm
  74. Cflags: -I${includedir} -I${includedir}/gphoto2
  75. EOF
  76. sed 's/Name: gphoto2/Name: gphoto2-port/' < gphoto2.pc.in > gphoto2-port.pc.in
  77. %build
  78. export CFLAGS=$RPM_OPT_FLAGS
  79. %configure \
  80. udevscriptdir='/lib/udev' \
  81. --with-drivers=all \
  82. --with-doc-dir=%{_docdir}/%{name} \
  83. --disable-static \
  84. --disable-rpath \
  85. --without-aalib \
  86. --without-hal
  87. make %{?_smp_mflags}
  88. %install
  89. rm -rf "${RPM_BUILD_ROOT}"
  90. make mandir=%{_mandir} DESTDIR=$RPM_BUILD_ROOT install
  91. pushd packaging/linux-hotplug/
  92. install -d -m755 %{buildroot}/usr/share/hal/fdi/information/20thirdparty/
  93. export LIBDIR=$RPM_BUILD_ROOT%{_libdir}
  94. export CAMLIBS=$RPM_BUILD_ROOT%{_libdir}/%{name}/%{version}
  95. export LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir}
  96. $RPM_BUILD_ROOT%{_libdir}/%{name}/print-camera-list hal-fdi | \
  97. grep -v "<!-- This file was generated" > $RPM_BUILD_ROOT/%{_datadir}/hal/fdi/information/20thirdparty/10-camera-libgphoto2.fdi
  98. # Output udev rules for device identification; this is used by GVfs gphoto2
  99. # backend and others.
  100. #
  101. # Btw, since it's /lib/udev, never e.g. /lib64/udev, we hardcode the path
  102. #
  103. mkdir -p $RPM_BUILD_ROOT/lib/udev/rules.d
  104. $RPM_BUILD_ROOT%{_libdir}/%{name}/print-camera-list udev-rules version 136 > $RPM_BUILD_ROOT/lib/udev/rules.d/40-libgphoto2.rules
  105. popd
  106. rm -rf %{buildroot}%{_libdir}/libgphoto2/*/*a
  107. rm -rf %{buildroot}%{_libdir}/libgphoto2_port/*/*a
  108. rm -rf %{buildroot}%{_libdir}/*.a
  109. rm -rf %{buildroot}%{_libdir}/*.la
  110. %find_lang %{name}-2
  111. %find_lang %{name}_port-0
  112. cat libgphoto2*.lang >> %{name}.lang
  113. %clean
  114. rm -rf "${RPM_BUILD_ROOT}"
  115. %files -f %{name}.lang
  116. %defattr(-,root,root)
  117. %doc AUTHORS COPYING README NEWS
  118. %dir %{_libdir}/libgphoto2_port
  119. %dir %{_libdir}/libgphoto2_port/*
  120. %dir %{_libdir}/libgphoto2
  121. %dir %{_libdir}/libgphoto2/*
  122. %{_libdir}/libgphoto2_port/*/*.so
  123. %{_libdir}/libgphoto2/*/*.so
  124. %{_libdir}/*.so.*
  125. %{_datadir}/hal/fdi/information/20thirdparty/10-camera-libgphoto2.fdi
  126. /lib/udev/rules.d/40-libgphoto2.rules
  127. /lib/udev/check-ptp-camera
  128. %post -p /sbin/ldconfig
  129. %postun -p /sbin/ldconfig
  130. %files devel
  131. %defattr(-,root,root)
  132. %doc %{_docdir}/%{name}
  133. %{_datadir}/libgphoto2
  134. %{_bindir}/gphoto2-config*
  135. %{_bindir}/gphoto2-port-config
  136. %{_includedir}/gphoto2
  137. %{_libdir}/*.so
  138. %{_libdir}/pkgconfig/*
  139. %{_mandir}/man3/*
  140. %changelog
  141. * Fri Jun 10 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 2.4.11-2
  142. - add BR: dbus-devel, gd-devel
  143. - add --without-hal
  144. * Fri Jun 10 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 2.4.11-1
  145. - update to 2.4.11
  146. - install udev script to /lib/udev
  147. - add udev rules
  148. * Thu Sep 23 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.4.5-2
  149. - rebuild with rpm-4.8.1 for pkg-config file
  150. * Wed Apr 15 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 2.4.5-1
  151. - new upstream release
  152. - build with libtool-2.2.6a
  153. * Sat Mar 7 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.4.4-1
  154. - new upstream release
  155. - dropped Patch6
  156. - changed Group to System Environment/Libraries
  157. - added BuildRequires: popt-devel instead of popt
  158. - added BuildRequires: cvs
  159. * Thu Jul 03 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 2.4.1-1
  160. - initial build for Vine Linux
  161. * Fri Jun 20 2008 Kevin Kofler <Kevin@tigcc.ticalc.org> 2.4.1-5
  162. - fix pkgcfg patch to match actual .pc file names (fixes kdegraphics build)
  163. * Thu Jun 12 2008 Jindrich Novy <jnovy@redhat.com> 2.4.1-3
  164. - libgphoto2-devel requires libusb-devel and libexif-devel for
  165. pkgconfig
  166. * Wed Jun 04 2008 Jindrich Novy <jnovy@redhat.com> 2.4.1-2
  167. - fix obsoletes
  168. - workaround problem with coreutils-6.12 and RHEL5-xen kernels
  169. what prevents libgphoto2 koji build
  170. * Mon Jun 02 2008 Jindrich Novy <jnovy@redhat.com> 2.4.1-1
  171. - update to 2.4.1 (#443515, #436138)
  172. * Thu May 29 2008 Stepan Kasal <skasal@redhat.com> 2.4.0-3
  173. - drop gphoto2-norpath.patch
  174. - use quoted here-document in %%prep
  175. - fix some typos in m4 sources
  176. - run autoreconf to get autotools right
  177. * Mon Apr 21 2008 Jindrich Novy <jnovy@redhat.com> 2.4.0-2
  178. - apply patch to fix build with libusb
  179. * Fri Apr 18 2008 Jindrich Novy <jnovy@redhat.com> 2.4.0-1
  180. - backport patch from upstream to avoid segfault when
  181. data phase is skipped for certain devices (#435413)
  182. - initial build
  183. * Mon Apr 14 2008 Jindrich Novy <jnovy@redhat.com> 2.4.0-0.2
  184. - review fixes, thanks to Hans de Goede: (#437285)
  185. - remove unused macro
  186. - don't exclude s390/s390x
  187. - preserve timestamps
  188. - fix license
  189. * Thu Mar 13 2008 Jindrich Novy <jnovy@redhat.com> 2.4.0-0.1
  190. - initial libgphoto2 packaging