libgphoto2-vl.spec 6.2 KB

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