libgphoto2-vl.spec 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252
  1. Summary: Library for accessing digital cameras
  2. Summary(ja): デジタルカメラにアクセスするためのライブラリ
  3. Name: libgphoto2
  4. Version: 2.5.7
  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. 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-devel
  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 ChangeLog 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. %build
  67. export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
  68. %configure \
  69. udevscriptdir='/lib/udev' \
  70. --with-drivers=all \
  71. --with-doc-dir=%{_docdir}/%{name} \
  72. --disable-static \
  73. --disable-rpath \
  74. --without-aalib \
  75. --without-hal
  76. # Don't use rpath!
  77. sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
  78. sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
  79. sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libgphoto2_port/libtool
  80. sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libgphoto2_port/libtool
  81. make %{?_smp_mflags}
  82. %install
  83. rm -rf "${RPM_BUILD_ROOT}"
  84. make mandir=%{_mandir} DESTDIR=$RPM_BUILD_ROOT install
  85. pushd packaging/linux-hotplug/
  86. install -d -m755 %{buildroot}/usr/share/hal/fdi/information/20thirdparty/
  87. export LIBDIR=$RPM_BUILD_ROOT%{_libdir}
  88. export CAMLIBS=$RPM_BUILD_ROOT%{_libdir}/%{name}/%{version}
  89. export LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir}
  90. #$RPM_BUILD_ROOT%{_libdir}/%{name}/print-camera-list hal-fdi | \
  91. #grep -v "<!-- This file was generated" > $RPM_BUILD_ROOT/%{_datadir}/hal/fdi/information/20thirdparty/10-camera-libgphoto2.fdi
  92. # Output udev rules for device identification; this is used by GVfs gphoto2
  93. # backend and others.
  94. #
  95. # Btw, since it's /lib/udev, never e.g. /lib64/udev, we hardcode the path
  96. #
  97. mkdir -p $RPM_BUILD_ROOT/lib/udev/rules.d
  98. $RPM_BUILD_ROOT%{_libdir}/%{name}/print-camera-list udev-rules version 136 > $RPM_BUILD_ROOT/lib/udev/rules.d/40-libgphoto2.rules
  99. popd
  100. # remove circular symlink in /usr/include/gphoto2 (#460807)
  101. rm -f $RPM_BUILD_ROOT%{_includedir}/gphoto2/gphoto2
  102. # remove unneeded print-camera-list from libdir (#745081)
  103. rm -f $RPM_BUILD_ROOT%{_libdir}/libgphoto2/print-camera-list
  104. rm -rf $RPM_BUILD_ROOT%{_libdir}/libgphoto2/*/*a
  105. rm -rf $RPM_BUILD_ROOT%{_libdir}/libgphoto2_port/*/*a
  106. rm -rf $RPM_BUILD_ROOT%{_libdir}/*.a
  107. rm -rf $RPM_BUILD_ROOT%{_libdir}/*.la
  108. rm -f libgphoto.lang
  109. %find_lang %{name}-6
  110. %find_lang %{name}_port-12
  111. cat %{name}*.lang >> libgphoto.lang
  112. # https://fedoraproject.org/wiki/Packaging_tricks#With_.25doc
  113. rm -rf __doc
  114. mkdir -p __doc
  115. mv $RPM_BUILD_ROOT%{_defaultdocdir}/%{name}/* __doc
  116. rm -rf $RPM_BUILD_ROOT%{_defaultdocdir}/%{name}
  117. %clean
  118. rm -rf "${RPM_BUILD_ROOT}"
  119. %post -p /sbin/ldconfig
  120. %postun -p /sbin/ldconfig
  121. %files -f libgphoto.lang
  122. %defattr(-,root,root)
  123. %doc AUTHORS COPYING README NEWS
  124. %dir %{_libdir}/libgphoto2_port
  125. %dir %{_libdir}/libgphoto2_port/*
  126. %dir %{_libdir}/libgphoto2
  127. %dir %{_libdir}/libgphoto2/*
  128. %{_libdir}/libgphoto2_port/*/*.so
  129. %{_libdir}/libgphoto2/*/*.so
  130. %{_libdir}/*.so.*
  131. #{_datadir}/hal/fdi/information/20thirdparty/10-camera-libgphoto2.fdi
  132. /lib/udev/rules.d/40-libgphoto2.rules
  133. /lib/udev/check-ptp-camera
  134. %files devel
  135. %defattr(-,root,root)
  136. %doc __doc/*
  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. * Sun Feb 8 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 2.5.7-1
  146. - updated to 2.5.7
  147. * Wed Oct 02 2013 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.5.0-2
  148. - rebuilt with gd-2.1.0.
  149. * Fri Jan 11 2013 IWAI, Masaharu <iwai@alib.jp> 2.5.0-1
  150. - update to 2.5.0
  151. - drop MAX_ENTRIES patch (Patch4): obsolete
  152. - update libusb version: 0.1.5 -> 0.1.6a
  153. - add BuildRequires: libusb1-devel
  154. - add Requires: libusb1
  155. - add Vendor and Distribution tags
  156. * Fri Jun 10 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 2.4.11-2
  157. - add BR: dbus-devel, gd-devel
  158. - add --without-hal
  159. * Fri Jun 10 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 2.4.11-1
  160. - update to 2.4.11
  161. - install udev script to /lib/udev
  162. - add udev rules
  163. * Thu Sep 23 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.4.5-2
  164. - rebuild with rpm-4.8.1 for pkg-config file
  165. * Wed Apr 15 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 2.4.5-1
  166. - new upstream release
  167. - build with libtool-2.2.6a
  168. * Sat Mar 7 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.4.4-1
  169. - new upstream release
  170. - dropped Patch6
  171. - changed Group to System Environment/Libraries
  172. - added BuildRequires: popt-devel instead of popt
  173. - added BuildRequires: cvs
  174. * Thu Jul 03 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 2.4.1-1
  175. - initial build for Vine Linux
  176. * Fri Jun 20 2008 Kevin Kofler <Kevin@tigcc.ticalc.org> 2.4.1-5
  177. - fix pkgcfg patch to match actual .pc file names (fixes kdegraphics build)
  178. * Thu Jun 12 2008 Jindrich Novy <jnovy@redhat.com> 2.4.1-3
  179. - libgphoto2-devel requires libusb-devel and libexif-devel for
  180. pkgconfig
  181. * Wed Jun 04 2008 Jindrich Novy <jnovy@redhat.com> 2.4.1-2
  182. - fix obsoletes
  183. - workaround problem with coreutils-6.12 and RHEL5-xen kernels
  184. what prevents libgphoto2 koji build
  185. * Mon Jun 02 2008 Jindrich Novy <jnovy@redhat.com> 2.4.1-1
  186. - update to 2.4.1 (#443515, #436138)
  187. * Thu May 29 2008 Stepan Kasal <skasal@redhat.com> 2.4.0-3
  188. - drop gphoto2-norpath.patch
  189. - use quoted here-document in %%prep
  190. - fix some typos in m4 sources
  191. - run autoreconf to get autotools right
  192. * Mon Apr 21 2008 Jindrich Novy <jnovy@redhat.com> 2.4.0-2
  193. - apply patch to fix build with libusb
  194. * Fri Apr 18 2008 Jindrich Novy <jnovy@redhat.com> 2.4.0-1
  195. - backport patch from upstream to avoid segfault when
  196. data phase is skipped for certain devices (#435413)
  197. - initial build
  198. * Mon Apr 14 2008 Jindrich Novy <jnovy@redhat.com> 2.4.0-0.2
  199. - review fixes, thanks to Hans de Goede: (#437285)
  200. - remove unused macro
  201. - don't exclude s390/s390x
  202. - preserve timestamps
  203. - fix license
  204. * Thu Mar 13 2008 Jindrich Novy <jnovy@redhat.com> 2.4.0-0.1
  205. - initial libgphoto2 packaging