libgphoto2-vl.spec 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262
  1. Summary: Library for accessing digital cameras
  2. Summary(ja): デジタルカメラにアクセスするためのライブラリ
  3. Name: libgphoto2
  4. Version: 2.5.27
  5. Release: 1%{?_dist_release}
  6. Group: system
  7. Vendor: Project Vine
  8. Distribution: Vine Linux
  9. # GPLV2+ for the main lib (due to exif.c) and most plugins, some plugins GPLv2
  10. License: GPLv2+ and GPLv2
  11. URL: https://github.com/gphoto/libgphoto2
  12. Source0: https://github.com/gphoto/libgphoto2/releases/download/v%{version}/libgphoto2-%{version}.tar.bz2
  13. Patch1: gphoto2-pkgcfg.patch
  14. Patch2: 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. %description
  30. libgphoto2 is a library that can be used by applications to access
  31. various digital cameras. libgphoto2 itself is not a GUI application,
  32. opposed to gphoto. There are GUI frontends for the gphoto2 library,
  33. however, such as gtkam for example.
  34. %package devel
  35. Summary: Headers and links to compile against the libgphoto2 library
  36. Group: programming
  37. Requires: %{name} = %{version}-%{release}
  38. Requires: pkgconfig
  39. #Requires: libusb-devel >= 0.1.6a
  40. #Requires: libusb1-devel
  41. Requires: libexif-devel
  42. Obsoletes: gphoto2 < 2.4.0-11
  43. Obsoletes: gphoto2-devel < 2.4.0-11
  44. Provides: gphoto2-devel = %{version}-%{release}
  45. %description devel
  46. libgphoto2 is a library that can be used by applications to access
  47. various digital cameras. libgphoto2 itself is not a GUI application,
  48. opposed to gphoto. There are GUI frontends for the gphoto2 library,
  49. however, such as gtkam for example.
  50. This package contains files needed to compile applications that
  51. use libgphoto2.
  52. %debug_package
  53. %prep
  54. %autosetup -p1
  55. for i in AUTHORS ChangeLog COPYING libgphoto2_port/AUTHORS libgphoto2_port/COPYING.LIB `find -name 'README.*'`; do
  56. mv ${i} ${i}.old
  57. iconv -f ISO-8859-1 -t UTF-8 < ${i}.old > ${i}
  58. touch -r ${i}.old ${i} || :
  59. rm -f ${i}.old
  60. done
  61. %build
  62. export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
  63. %configure \
  64. udevscriptdir='/lib/udev' \
  65. --with-drivers=all \
  66. --with-doc-dir=%{_docdir}/%{name} \
  67. --disable-static \
  68. --disable-rpath \
  69. --without-aalib \
  70. --without-hal
  71. # Don't use rpath!
  72. sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
  73. sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
  74. sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libgphoto2_port/libtool
  75. sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libgphoto2_port/libtool
  76. make %{?_smp_mflags}
  77. %install
  78. rm -rf "${RPM_BUILD_ROOT}"
  79. make mandir=%{_mandir} DESTDIR=$RPM_BUILD_ROOT install
  80. pushd packaging/linux-hotplug/
  81. install -d -m755 %{buildroot}/usr/share/hal/fdi/information/20thirdparty/
  82. export LIBDIR=$RPM_BUILD_ROOT%{_libdir}
  83. export CAMLIBS=$RPM_BUILD_ROOT%{_libdir}/%{name}/%{version}
  84. export LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir}
  85. #$RPM_BUILD_ROOT%{_libdir}/%{name}/print-camera-list hal-fdi | \
  86. #grep -v "<!-- This file was generated" > $RPM_BUILD_ROOT/%{_datadir}/hal/fdi/information/20thirdparty/10-camera-libgphoto2.fdi
  87. # Output udev rules for device identification; this is used by GVfs gphoto2
  88. # backend and others.
  89. #
  90. # Btw, since it's /lib/udev, never e.g. /lib64/udev, we hardcode the path
  91. #
  92. mkdir -p $RPM_BUILD_ROOT/lib/udev/rules.d
  93. $RPM_BUILD_ROOT%{_libdir}/%{name}/print-camera-list udev-rules version 136 > $RPM_BUILD_ROOT/lib/udev/rules.d/40-libgphoto2.rules
  94. popd
  95. # remove circular symlink in /usr/include/gphoto2 (#460807)
  96. rm -f $RPM_BUILD_ROOT%{_includedir}/gphoto2/gphoto2
  97. # remove unneeded print-camera-list from libdir (#745081)
  98. rm -f $RPM_BUILD_ROOT%{_libdir}/libgphoto2/print-camera-list
  99. rm -rf $RPM_BUILD_ROOT%{_libdir}/libgphoto2/*/*a
  100. rm -rf $RPM_BUILD_ROOT%{_libdir}/libgphoto2_port/*/*a
  101. rm -rf $RPM_BUILD_ROOT%{_libdir}/*.a
  102. rm -rf $RPM_BUILD_ROOT%{_libdir}/*.la
  103. rm -f libgphoto.lang
  104. %find_lang %{name}-6
  105. %find_lang %{name}_port-12
  106. cat %{name}*.lang >> libgphoto.lang
  107. # https://fedoraproject.org/wiki/Packaging_tricks#With_.25doc
  108. rm -rf __doc
  109. mkdir -p __doc
  110. mv $RPM_BUILD_ROOT%{_defaultdocdir}/%{name}/* __doc
  111. rm -rf $RPM_BUILD_ROOT%{_defaultdocdir}/%{name}
  112. %clean
  113. rm -rf "${RPM_BUILD_ROOT}"
  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. * Sat Apr 03 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.5.27-1
  141. - new upstream release.
  142. - dropped ldconfig scriptlets.
  143. * Mon Aug 03 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.5.25-1
  144. - new upstream release.
  145. - dropped Patch3: fixed in upstream.
  146. * Sat Dec 29 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.5.21-1
  147. - updated to 2.5.21.
  148. * Sun Feb 8 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 2.5.7-1
  149. - updated to 2.5.7
  150. * Wed Oct 02 2013 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.5.0-2
  151. - rebuilt with gd-2.1.0.
  152. * Fri Jan 11 2013 IWAI, Masaharu <iwai@alib.jp> 2.5.0-1
  153. - update to 2.5.0
  154. - drop MAX_ENTRIES patch (Patch4): obsolete
  155. - update libusb version: 0.1.5 -> 0.1.6a
  156. - add BuildRequires: libusb1-devel
  157. - add Requires: libusb1
  158. - add Vendor and Distribution tags
  159. * Fri Jun 10 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 2.4.11-2
  160. - add BR: dbus-devel, gd-devel
  161. - add --without-hal
  162. * Fri Jun 10 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 2.4.11-1
  163. - update to 2.4.11
  164. - install udev script to /lib/udev
  165. - add udev rules
  166. * Thu Sep 23 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.4.5-2
  167. - rebuild with rpm-4.8.1 for pkg-config file
  168. * Wed Apr 15 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 2.4.5-1
  169. - new upstream release
  170. - build with libtool-2.2.6a
  171. * Sat Mar 7 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.4.4-1
  172. - new upstream release
  173. - dropped Patch6
  174. - changed Group to System Environment/Libraries
  175. - added BuildRequires: popt-devel instead of popt
  176. - added BuildRequires: cvs
  177. * Thu Jul 03 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 2.4.1-1
  178. - initial build for Vine Linux
  179. * Fri Jun 20 2008 Kevin Kofler <Kevin@tigcc.ticalc.org> 2.4.1-5
  180. - fix pkgcfg patch to match actual .pc file names (fixes kdegraphics build)
  181. * Thu Jun 12 2008 Jindrich Novy <jnovy@redhat.com> 2.4.1-3
  182. - libgphoto2-devel requires libusb-devel and libexif-devel for
  183. pkgconfig
  184. * Wed Jun 04 2008 Jindrich Novy <jnovy@redhat.com> 2.4.1-2
  185. - fix obsoletes
  186. - workaround problem with coreutils-6.12 and RHEL5-xen kernels
  187. what prevents libgphoto2 koji build
  188. * Mon Jun 02 2008 Jindrich Novy <jnovy@redhat.com> 2.4.1-1
  189. - update to 2.4.1 (#443515, #436138)
  190. * Thu May 29 2008 Stepan Kasal <skasal@redhat.com> 2.4.0-3
  191. - drop gphoto2-norpath.patch
  192. - use quoted here-document in %%prep
  193. - fix some typos in m4 sources
  194. - run autoreconf to get autotools right
  195. * Mon Apr 21 2008 Jindrich Novy <jnovy@redhat.com> 2.4.0-2
  196. - apply patch to fix build with libusb
  197. * Fri Apr 18 2008 Jindrich Novy <jnovy@redhat.com> 2.4.0-1
  198. - backport patch from upstream to avoid segfault when
  199. data phase is skipped for certain devices (#435413)
  200. - initial build
  201. * Mon Apr 14 2008 Jindrich Novy <jnovy@redhat.com> 2.4.0-0.2
  202. - review fixes, thanks to Hans de Goede: (#437285)
  203. - remove unused macro
  204. - don't exclude s390/s390x
  205. - preserve timestamps
  206. - fix license
  207. * Thu Mar 13 2008 Jindrich Novy <jnovy@redhat.com> 2.4.0-0.1
  208. - initial libgphoto2 packaging