libgphoto2-vl.spec 7.3 KB

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