libgphoto2-vl.spec 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254
  1. Summary: Library for accessing digital cameras
  2. Summary(ja): デジタルカメラにアクセスするためのライブラリ
  3. Name: libgphoto2
  4. Version: 2.5.25
  5. Release: 1%{?_dist_release}
  6. Vendor: Project Vine
  7. Distribution: Vine Linux
  8. # GPLV2+ for the main lib (due to exif.c) and most plugins, some plugins GPLv2
  9. License: GPLv2+ and GPLv2
  10. URL: https://github.com/gphoto/libgphoto2
  11. Source0: https://github.com/gphoto/libgphoto2/releases/download/v%{version}/libgphoto2-%{version}.tar.bz2
  12. Patch1: gphoto2-pkgcfg.patch
  13. Patch2: gphoto2-device-return.patch
  14. BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
  15. #BuildRequires: libusb-devel >= 0.1.6a
  16. BuildRequires: libusb1-devel
  17. BuildRequires: libexif-devel
  18. BuildRequires: libjpeg-devel
  19. BuildRequires: pkgconfig, sharutils
  20. BuildRequires: libtool-ltdl-devel >= 2.2.6a
  21. BuildRequires: popt-devel
  22. BuildRequires: dbus-devel
  23. BuildRequires: gd-devel
  24. # we run autoreconf:
  25. #BuildRequires: autoconf, automake, libtool, gettext, cvs
  26. Obsoletes: gphoto2 < 2.4.0
  27. Obsoletes: gphoto2-devel < 2.4.0
  28. %description
  29. libgphoto2 is a library that can be used by applications to access
  30. various digital cameras. libgphoto2 itself is not a GUI application,
  31. opposed to gphoto. There are GUI frontends for the gphoto2 library,
  32. however, such as gtkam for example.
  33. %package devel
  34. Summary: Headers and links to compile against the libgphoto2 library
  35. Group: Development/Libraries
  36. Requires: %{name} = %{version}-%{release}
  37. Requires: pkgconfig
  38. #Requires: libusb-devel >= 0.1.6a
  39. #Requires: libusb1-devel
  40. Requires: libexif-devel
  41. Obsoletes: gphoto2 < 2.4.0-11
  42. Obsoletes: gphoto2-devel < 2.4.0-11
  43. Provides: gphoto2-devel = %{version}-%{release}
  44. %description devel
  45. libgphoto2 is a library that can be used by applications to access
  46. various digital cameras. libgphoto2 itself is not a GUI application,
  47. opposed to gphoto. There are GUI frontends for the gphoto2 library,
  48. however, such as gtkam for example.
  49. This package contains files needed to compile applications that
  50. use libgphoto2.
  51. %prep
  52. %autosetup -p1
  53. for i in AUTHORS ChangeLog COPYING libgphoto2_port/AUTHORS libgphoto2_port/COPYING.LIB `find -name 'README.*'`; do
  54. mv ${i} ${i}.old
  55. iconv -f ISO-8859-1 -t UTF-8 < ${i}.old > ${i}
  56. touch -r ${i}.old ${i} || :
  57. rm -f ${i}.old
  58. done
  59. %build
  60. export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
  61. %configure \
  62. udevscriptdir='/lib/udev' \
  63. --with-drivers=all \
  64. --with-doc-dir=%{_docdir}/%{name} \
  65. --disable-static \
  66. --disable-rpath \
  67. --without-aalib \
  68. --without-hal
  69. # Don't use rpath!
  70. sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
  71. sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
  72. sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libgphoto2_port/libtool
  73. sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libgphoto2_port/libtool
  74. make %{?_smp_mflags}
  75. %install
  76. rm -rf "${RPM_BUILD_ROOT}"
  77. make mandir=%{_mandir} DESTDIR=$RPM_BUILD_ROOT install
  78. pushd packaging/linux-hotplug/
  79. install -d -m755 %{buildroot}/usr/share/hal/fdi/information/20thirdparty/
  80. export LIBDIR=$RPM_BUILD_ROOT%{_libdir}
  81. export CAMLIBS=$RPM_BUILD_ROOT%{_libdir}/%{name}/%{version}
  82. export LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir}
  83. #$RPM_BUILD_ROOT%{_libdir}/%{name}/print-camera-list hal-fdi | \
  84. #grep -v "<!-- This file was generated" > $RPM_BUILD_ROOT/%{_datadir}/hal/fdi/information/20thirdparty/10-camera-libgphoto2.fdi
  85. # Output udev rules for device identification; this is used by GVfs gphoto2
  86. # backend and others.
  87. #
  88. # Btw, since it's /lib/udev, never e.g. /lib64/udev, we hardcode the path
  89. #
  90. mkdir -p $RPM_BUILD_ROOT/lib/udev/rules.d
  91. $RPM_BUILD_ROOT%{_libdir}/%{name}/print-camera-list udev-rules version 136 > $RPM_BUILD_ROOT/lib/udev/rules.d/40-libgphoto2.rules
  92. popd
  93. # remove circular symlink in /usr/include/gphoto2 (#460807)
  94. rm -f $RPM_BUILD_ROOT%{_includedir}/gphoto2/gphoto2
  95. # remove unneeded print-camera-list from libdir (#745081)
  96. rm -f $RPM_BUILD_ROOT%{_libdir}/libgphoto2/print-camera-list
  97. rm -rf $RPM_BUILD_ROOT%{_libdir}/libgphoto2/*/*a
  98. rm -rf $RPM_BUILD_ROOT%{_libdir}/libgphoto2_port/*/*a
  99. rm -rf $RPM_BUILD_ROOT%{_libdir}/*.a
  100. rm -rf $RPM_BUILD_ROOT%{_libdir}/*.la
  101. rm -f libgphoto.lang
  102. %find_lang %{name}-6
  103. %find_lang %{name}_port-12
  104. cat %{name}*.lang >> libgphoto.lang
  105. # https://fedoraproject.org/wiki/Packaging_tricks#With_.25doc
  106. rm -rf __doc
  107. mkdir -p __doc
  108. mv $RPM_BUILD_ROOT%{_defaultdocdir}/%{name}/* __doc
  109. rm -rf $RPM_BUILD_ROOT%{_defaultdocdir}/%{name}
  110. %clean
  111. rm -rf "${RPM_BUILD_ROOT}"
  112. %post -p /sbin/ldconfig
  113. %postun -p /sbin/ldconfig
  114. %files -f libgphoto.lang
  115. %defattr(-,root,root)
  116. %license COPYING
  117. %doc AUTHORS README.md 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. %{_datadir}/libgphoto2
  127. %{_datadir}/libgphoto2_port
  128. /lib/udev/rules.d/40-libgphoto2.rules
  129. /lib/udev/check-ptp-camera
  130. %files devel
  131. %defattr(-,root,root)
  132. %doc __doc/*
  133. %{_bindir}/gphoto2-config*
  134. %{_bindir}/gphoto2-port-config
  135. %{_includedir}/gphoto2
  136. %{_libdir}/*.so
  137. %{_libdir}/pkgconfig/*
  138. %{_mandir}/man3/*
  139. %changelog
  140. * Mon Aug 03 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.5.25-1
  141. - new upstream release.
  142. - dropped Patch3: fixed in upstream.
  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