libgphoto2-vl.spec 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253
  1. Summary: Library for accessing digital cameras
  2. Summary(ja): デジタルカメラにアクセスするためのライブラリ
  3. Name: libgphoto2
  4. Version: 2.5.21
  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-device-return.patch
  13. # https://github.com/gphoto/libgphoto2/pull/332
  14. Patch3: 0001-print-camera-list-Fix-udev-rules-for-linux-4.14.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. %autosetup -p1
  56. for i in AUTHORS ChangeLog 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. %build
  63. export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
  64. %configure \
  65. udevscriptdir='/lib/udev' \
  66. --with-drivers=all \
  67. --with-doc-dir=%{_docdir}/%{name} \
  68. --disable-static \
  69. --disable-rpath \
  70. --without-aalib \
  71. --without-hal
  72. # Don't use rpath!
  73. sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
  74. sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
  75. sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libgphoto2_port/libtool
  76. sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libgphoto2_port/libtool
  77. make %{?_smp_mflags}
  78. %install
  79. rm -rf "${RPM_BUILD_ROOT}"
  80. make mandir=%{_mandir} DESTDIR=$RPM_BUILD_ROOT install
  81. pushd packaging/linux-hotplug/
  82. install -d -m755 %{buildroot}/usr/share/hal/fdi/information/20thirdparty/
  83. export LIBDIR=$RPM_BUILD_ROOT%{_libdir}
  84. export CAMLIBS=$RPM_BUILD_ROOT%{_libdir}/%{name}/%{version}
  85. export LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir}
  86. #$RPM_BUILD_ROOT%{_libdir}/%{name}/print-camera-list hal-fdi | \
  87. #grep -v "<!-- This file was generated" > $RPM_BUILD_ROOT/%{_datadir}/hal/fdi/information/20thirdparty/10-camera-libgphoto2.fdi
  88. # Output udev rules for device identification; this is used by GVfs gphoto2
  89. # backend and others.
  90. #
  91. # Btw, since it's /lib/udev, never e.g. /lib64/udev, we hardcode the path
  92. #
  93. mkdir -p $RPM_BUILD_ROOT/lib/udev/rules.d
  94. $RPM_BUILD_ROOT%{_libdir}/%{name}/print-camera-list udev-rules version 136 > $RPM_BUILD_ROOT/lib/udev/rules.d/40-libgphoto2.rules
  95. popd
  96. # remove circular symlink in /usr/include/gphoto2 (#460807)
  97. rm -f $RPM_BUILD_ROOT%{_includedir}/gphoto2/gphoto2
  98. # remove unneeded print-camera-list from libdir (#745081)
  99. rm -f $RPM_BUILD_ROOT%{_libdir}/libgphoto2/print-camera-list
  100. rm -rf $RPM_BUILD_ROOT%{_libdir}/libgphoto2/*/*a
  101. rm -rf $RPM_BUILD_ROOT%{_libdir}/libgphoto2_port/*/*a
  102. rm -rf $RPM_BUILD_ROOT%{_libdir}/*.a
  103. rm -rf $RPM_BUILD_ROOT%{_libdir}/*.la
  104. rm -f libgphoto.lang
  105. %find_lang %{name}-6
  106. %find_lang %{name}_port-12
  107. cat %{name}*.lang >> libgphoto.lang
  108. # https://fedoraproject.org/wiki/Packaging_tricks#With_.25doc
  109. rm -rf __doc
  110. mkdir -p __doc
  111. mv $RPM_BUILD_ROOT%{_defaultdocdir}/%{name}/* __doc
  112. rm -rf $RPM_BUILD_ROOT%{_defaultdocdir}/%{name}
  113. %clean
  114. rm -rf "${RPM_BUILD_ROOT}"
  115. %post -p /sbin/ldconfig
  116. %postun -p /sbin/ldconfig
  117. %files -f libgphoto.lang
  118. %defattr(-,root,root)
  119. %license COPYING
  120. %doc AUTHORS README.md NEWS
  121. %dir %{_libdir}/libgphoto2_port
  122. %dir %{_libdir}/libgphoto2_port/*
  123. %dir %{_libdir}/libgphoto2
  124. %dir %{_libdir}/libgphoto2/*
  125. %{_libdir}/libgphoto2_port/*/*.so
  126. %{_libdir}/libgphoto2/*/*.so
  127. %{_libdir}/*.so.*
  128. #{_datadir}/hal/fdi/information/20thirdparty/10-camera-libgphoto2.fdi
  129. %{_datadir}/libgphoto2
  130. %{_datadir}/libgphoto2_port
  131. /lib/udev/rules.d/40-libgphoto2.rules
  132. /lib/udev/check-ptp-camera
  133. %files devel
  134. %defattr(-,root,root)
  135. %doc __doc/*
  136. %{_bindir}/gphoto2-config*
  137. %{_bindir}/gphoto2-port-config
  138. %{_includedir}/gphoto2
  139. %{_libdir}/*.so
  140. %{_libdir}/pkgconfig/*
  141. %{_mandir}/man3/*
  142. %changelog
  143. * Sat Dec 29 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.5.21-1
  144. - updated to 2.5.21.
  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