03b646
%bcond_with gp2ddb
03b646
03b646
%global udevdir %(pkg-config --variable=udevdir udev)
03b646
%global port_version 0.12.0
03b646
03b646
Name:           libgphoto2
03b646
Version:        2.5.16
03b646
Release:        3%{?dist}
03b646
Summary:        Library for accessing digital cameras
03b646
# GPLV2+ for the main lib (due to exif.c) and most plugins, some plugins GPLv2
03b646
License:        GPLv2+ and GPLv2
03b646
URL:            http://www.gphoto.org/
03b646
03b646
Source0:        http://downloads.sourceforge.net/gphoto/%{name}-%{version}.tar.bz2
03b646
Patch1:         gphoto2-pkgcfg.patch
03b646
Patch2:         gphoto2-storage.patch
03b646
Patch3:         gphoto2-device-return.patch
03b646
03b646
BuildRequires:  gcc
03b646
BuildRequires:  gcc-c++
03b646
BuildRequires:  make
03b646
BuildRequires:  systemd
03b646
%if %{with gp2ddb}
03b646
BuildRequires:  flex
03b646
BuildRequires:  bison
03b646
%endif
03b646
BuildRequires:  libtool-ltdl-devel
03b646
BuildRequires:  libjpeg-devel
03b646
BuildRequires:  pkgconfig(libxml-2.0)
03b646
BuildRequires:  gd-devel
03b646
BuildRequires:  pkgconfig(libexif)
03b646
# -----------------------------------
03b646
# libgphoto2_port
03b646
# -----------------------------------
03b646
BuildRequires:  lockdev-devel
03b646
BuildRequires:  pkgconfig(libusb-1.0)
03b646
Requires:       lockdev
03b646
# -----------------------------------
03b646
03b646
%description
03b646
libgphoto2 is a library that can be used by applications to access
03b646
various digital cameras. libgphoto2 itself is not a GUI application,
03b646
opposed to gphoto. There are GUI frontends for the gphoto2 library,
03b646
however, such as gtkam for example.
03b646
03b646
%package devel
03b646
Summary:        Headers and links to compile against the libgphoto2 library
03b646
Requires:       %{name}%{?_isa} = %{version}-%{release}
03b646
Obsoletes:      gphoto2-devel < 2.4.0-11
03b646
Provides:       gphoto2-devel = %{version}-%{release}
03b646
03b646
%description devel
03b646
libgphoto2 is a library that can be used by applications to access
03b646
various digital cameras. libgphoto2 itself is not a GUI application,
03b646
opposed to gphoto. There are GUI frontends for the gphoto2 library,
03b646
however, such as gtkam for example.
03b646
03b646
This package contains files needed to compile applications that
03b646
use libgphoto2.
03b646
03b646
%prep
03b646
%autosetup -p1
03b646
for f in AUTHORS ChangeLog COPYING libgphoto2_port/AUTHORS libgphoto2_port/COPYING.LIB `find -name 'README.*'`; do
03b646
    iconv -f ISO-8859-1 -t UTF-8 $f > $f.conv && mv -f $f.conv $f
03b646
done
03b646
03b646
%build
03b646
%configure \
03b646
    udevscriptdir='%{udevdir}'   \
03b646
    --with-drivers=all           \
03b646
    --with-doc-dir=%{_pkgdocdir} \
03b646
%if %{with gp2ddb}
03b646
    --enable-gp2ddb              \
03b646
%endif
03b646
    --disable-static             \
03b646
    --disable-rpath              \
03b646
    %{nil}
03b646
03b646
# Don't use rpath!
03b646
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool libgphoto2_port/libtool
03b646
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool libgphoto2_port/libtool
03b646
03b646
03b646
%make_build
03b646
03b646
%install
03b646
%make_install INSTALL="install -p" mandir=%{_mandir}
03b646
03b646
pushd packaging/linux-hotplug/
03b646
  export LIBDIR=%{buildroot}%{_libdir}
03b646
  export CAMLIBS=%{buildroot}%{_libdir}/%{name}/%{version}
03b646
  export LD_LIBRARY_PATH=%{buildroot}%{_libdir}
03b646
03b646
  # Output udev rules for device identification; this is used by GVfs gphoto2
03b646
  # backend and others.
03b646
  mkdir -p %{buildroot}%{_udevrulesdir}
03b646
  %{buildroot}%{_libdir}/%{name}/print-camera-list udev-rules version 136 > %{buildroot}%{_udevrulesdir}/40-libgphoto2.rules
03b646
popd
03b646
03b646
# remove circular symlink in /usr/include/gphoto2 (#460807)
03b646
rm -f %{buildroot}%{_includedir}/gphoto2/gphoto2
03b646
03b646
# remove unneeded print-camera-list from libdir (#745081)
03b646
rm -f %{buildroot}%{_libdir}/libgphoto2/print-camera-list
03b646
03b646
find %{buildroot} -type f -name "*.la" -print -delete
03b646
03b646
%find_lang %{name}-6
03b646
%find_lang %{name}_port-12
03b646
cat libgphoto2*.lang >> %{name}.lang
03b646
03b646
# https://fedoraproject.org/wiki/Packaging_tricks#With_.25doc
03b646
mkdir __doc
03b646
mv %{buildroot}%{_pkgdocdir}/* __doc
03b646
rm -rf %{buildroot}%{_pkgdocdir}
03b646
rm -rf %{buildroot}%{_datadir}/libgphoto2_port/*/vcamera/
03b646
03b646
%ldconfig_scriptlets
03b646
03b646
%files -f %{name}.lang
03b646
%license COPYING
03b646
%doc AUTHORS README NEWS
03b646
%{_libdir}/%{name}.so.*
03b646
%{_libdir}/%{name}_port.so.*
03b646
%dir %{_libdir}/%{name}/
03b646
%dir %{_libdir}/%{name}/%{version}/
03b646
%dir %{_libdir}/%{name}_port/
03b646
%dir %{_libdir}/%{name}_port/%{port_version}/
03b646
%{_libdir}/%{name}/%{version}/*.so
03b646
%{_libdir}/%{name}_port/%{port_version}/*.so
03b646
%{_udevrulesdir}/40-libgphoto2.rules
03b646
%{udevdir}/check-ptp-camera
03b646
%{_datadir}/libgphoto2/
03b646
03b646
%files devel
03b646
%doc __doc/*
03b646
%{_bindir}/gphoto2-config
03b646
%{_bindir}/gphoto2-port-config
03b646
%{_includedir}/gphoto2/
03b646
%{_libdir}/%{name}.so
03b646
%{_libdir}/%{name}_port.so
03b646
%{_libdir}/pkgconfig/%{name}.pc
03b646
%{_libdir}/pkgconfig/%{name}_port.pc
03b646
%{_mandir}/man3/%{name}.3*
03b646
%{_mandir}/man3/%{name}_port.3*
03b646
03b646
%changelog
03b646
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.5.16-3
03b646
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
03b646
03b646
* Wed Jan 31 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 2.5.16-2
03b646
- Switch to %%ldconfig_scriptlets
03b646
03b646
* Wed Nov 01 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 2.5.16-1
03b646
- Update to 2.5.16
03b646
03b646
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.5.14-3
03b646
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
03b646
03b646
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.5.14-2
03b646
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
03b646
03b646
* Wed Jun 14 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 2.5.14-1
03b646
- Update to 2.5.14
03b646
03b646
* Sat Apr 29 2017 Jon Disnard <parasense@fedoraproject.org> - 2.5.23-1
03b646
- Update to 2.5.13
03b646
03b646
* Sun Feb 12 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 2.5.12-1
03b646
- Update to 2.5.12
03b646
03b646
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.5.11-2
03b646
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
03b646
03b646
* Mon Nov 21 2016 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 2.5.11-1
03b646
- Update to 2.5.11
03b646
03b646
* Sun Jul 10 2016 Peter Robinson <pbrobinson@fedoraproject.org> 2.5.10-1
03b646
- Update to 2.5.10 for new device support
03b646
- Use %%license
03b646
- minor cleanup
03b646
03b646
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.5.8-2
03b646
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
03b646
03b646
* Wed Oct 28 2015 Jon Disnard <parasense@fedoraproject.org> 2.5.8-1
03b646
- Update to 2.5.8 for new device support
03b646
- Drop USB result patch that went upstream (formerly patch#5)
03b646
- Drop IXANY patch that went upstream (formerly patch#3)
03b646
03b646
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5.7-4
03b646
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
03b646
03b646
* Mon Apr  6 2015 Tom Callaway <spot@fedoraproject.org> - 2.5.7-3
03b646
- rebuild against libvpx 1.4.0
03b646
03b646
* Thu Mar 12 2015 Tim Waugh <twaugh@redhat.com> 2.5.7-2
03b646
- Apply upstream patch to correctly report errors when performing
03b646
  USB control transfers (bug #1201048).
03b646
03b646
* Tue Jan 20 2015 Peter Robinson <pbrobinson@fedoraproject.org> 2.5.7-1
03b646
- Update to 2.5.7 for new device support
03b646
03b646
* Sun Sep 07 2014 Jindrich Novy <novyjindrich@gmail.com> 2.5.5.1-1
03b646
- update to 2.5.5.1 - regression fix release of 2.5.5
03b646
03b646
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5.3-9
03b646
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
03b646
03b646
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5.3-8
03b646
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
03b646
03b646
* Fri Apr 11 2014 Tim Waugh <twaugh@redhat.com> - 2.5.3-7
03b646
- Moved runtime-required files to main package (bug #1086411).
03b646
03b646
* Wed Feb 12 2014 Jon Disnard <jdisnard@gmail.com> - 2.5.3-6
03b646
- Bump to latest upstream version.
03b646
03b646
* Wed Aug 28 2013 Tim Waugh <twaugh@redhat.com> - 2.5.2-5
03b646
- Fixed documentation issue due to unversioned doc dirs (bug #1001263).
03b646
03b646
* Fri Aug 16 2013 Tim Waugh <twaugh@redhat.com> - 2.5.2-4
03b646
- Build against libusbx instead of libusb (bug #997880).
03b646
03b646
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5.2-3
03b646
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
03b646
03b646
* Tue Jun 11 2013 Remi Collet <rcollet@redhat.com> - 2.5.2-2
03b646
- rebuild for new GD 2.1.0
03b646
03b646
* Mon May  6 2013 Hans de Goede <hdegoede@redhat.com> - 2.5.2-1
03b646
- New upstream release bugfix 2.5.2
03b646
- Drop bugfix patches (merged upstream)
03b646
03b646
* Sat May  4 2013 Hans de Goede <hdegoede@redhat.com> - 2.5.1.1-4
03b646
- Fix crash when dealing with PTP devices without a memory card (rhbz#915688)
03b646
03b646
* Thu May  2 2013 Hans de Goede <hdegoede@redhat.com> - 2.5.1.1-3
03b646
- Fix PTP devices not working in USB-3 ports (rhbz#819918)
03b646
- Cleanup spec-file
03b646
03b646
* Tue Apr 23 2013 Tim Waugh <twaugh@redhat.com> 2.5.1.1-2
03b646
- Use _udevrulesdir macro.
03b646
03b646
* Tue Feb 19 2013 Jindrich Novy <jnovy@redhat.com> 2.5.1.1-1
03b646
- update to 2.5.1.1
03b646
03b646
* Sun Feb 17 2013 Jindrich Novy <jnovy@redhat.com> 2.5.0-8
03b646
- fix camera detection - thanks to Panu Matilainen (#912040)
03b646
03b646
* Wed Jan 30 2013 Jindrich Novy <jnovy@redhat.com> 2.5.0-7
03b646
- move /lib files to /usr/lib
03b646
- fix changelog
03b646
03b646
* Fri Jan 18 2013 Adam Tkac <atkac redhat com> - 2.5.0-6
03b646
- rebuild due to "jpeg8-ABI" feature drop
03b646
03b646
* Sun Jan 13 2013 Jindrich Novy <jnovy@redhat.com> 2.5.0-5
03b646
- remove deprecated HAL file (#894527)
03b646
03b646
* Sat Dec 01 2012 Jindrich Novy <jnovy@redhat.com> 2.5.0-4
03b646
- compile with -fno-strict-aliasing (because of ptp.c)
03b646
03b646
* Wed Sep 19 2012 Hans de Goede <hdegoede@redhat.com> 2.5.0-3
03b646
- Fix the usbscsi port driver not working, this fixes many miniature
03b646
  (keychain) photo frames no longer being accessible
03b646
03b646
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5.0-2
03b646
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
03b646
03b646
* Wed Jul 11 2012 Jindrich Novy <jnovy@redhat.com> 2.5.0-1
03b646
- update to 2.5.0
03b646
03b646
* Mon Apr 16 2012 Jindrich Novy <jnovy@redhat.com> 2.4.14-1
03b646
- update to 2.4.14
03b646
03b646
* Wed Mar 21 2012 Jindrich Novy <jnovy@redhat.com> 2.4.13-1
03b646
- update to 2.4.13
03b646
03b646
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4.11-3
03b646
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
03b646
03b646
* Wed Oct 12 2011 Jindrich Novy <jnovy@redhat.com> 2.4.11-2
03b646
- remove unneeded print-camera-list from libdir (#745081)
03b646
03b646
* Mon Apr 18 2011 Jindrich Novy <jnovy@redhat.com> 2.4.11-1
03b646
- update to 2.4.11
03b646
03b646
* Wed Feb 09 2011 Jindrich Novy <jnovy@redhat.com> 2.4.10.1-1
03b646
- update to 2.4.10.1
03b646
03b646
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4.10-5
03b646
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
03b646
03b646
* Wed Jan 26 2011 Caolán McNamara <caolanm@redhat.com> 2.4.10-4
03b646
- rebuild for dependencies
03b646
03b646
* Wed Oct 20 2010 Jindrich Novy <jnovy@redhat.com> 2.4.10-3
03b646
- move udev helper scripts to /lib/udev (#644552)
03b646
03b646
* Mon Sep 06 2010 Jindrich Novy <jnovy@redhat.com> 2.4.10-2
03b646
- BR: gd-devel because of ax203 and st2205 camlibs (#630570)
03b646
03b646
* Tue Aug 17 2010 Jindrich Novy <jnovy@redhat.com> 2.4.10-1
03b646
- update to 2.4.10
03b646
03b646
* Mon Jul 12 2010 Dan Horák <dan[at]danny.cz> 2.4.9-2
03b646
- remove the need to call autoreconf
03b646
03b646
* Mon Apr 12 2010 Jindrich Novy <jnovy@redhat.com> 2.4.9-1
03b646
- update to 2.4.9
03b646
03b646
* Mon Jan 25 2010 Jindrich Novy <jnovy@redhat.com> 2.4.8-1
03b646
- update to 2.4.8
03b646
03b646
* Fri Dec 18 2009 Jindrich Novy <jnovy@redhat.com> 2.4.7-3
03b646
- remove circular symlink in /usr/include/gphoto2 (#460807)
03b646
03b646
* Fri Oct 23 2009 Jindrich Novy <jnovy@redhat.com> 2.4.7-2
03b646
- return the dual-mode device to kernel once we don't use it (#530545)
03b646
03b646
* Tue Aug 18 2009 Jindrich Novy <jnovy@redhat.com> 2.4.7-1
03b646
- update to 2.4.7
03b646
- drop udev patch, applied upstream
03b646
- update storage patch
03b646
03b646
* Sun Aug 09 2009 David Zeuthen <davidz@redhat.com> 2.4.6-3
03b646
- Add patch from http://sourceforge.net/tracker/?func=detail&aid=2801117&group_id=8874&atid=308874
03b646
  and generate generic udev rules for device identification (ID_GPHOTO2* properties)
03b646
03b646
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4.6-2
03b646
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
03b646
03b646
* Mon May 18 2009 Jindrich Novy <jnovy@redhat.com> 2.4.6-1
03b646
- update to 2.4.6
03b646
- new IDs for Kodak V803, M1063, Canon PowerShot A650IS, SD990 (aka IXUS 980IS),
03b646
  SD880IS, A480, Canon EOS 50D, Fuji FinePix S1000fd
03b646
- many Canon related fixes
03b646
03b646
* Wed Apr 08 2009 Jindrich Novy <jnovy@redhat.com> 2.4.5-1
03b646
- update to 2.4.5
03b646
- remove .canontimeout patch, applied upstream
03b646
03b646
* Wed Apr 01 2009 Jindrich Novy <jnovy@redhat.com> 2.4.4-4
03b646
- increase timeouts for Canon cameras (#476355), thanks to
03b646
  Andrzej Nowak and Russell Harrison
03b646
03b646
* Thu Mar 05 2009 Caolán McNamara <caolanm@redhat.com> - 2.4.4-3
03b646
- tweak BR to get to build
03b646
03b646
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4.4-2
03b646
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
03b646
03b646
* Thu Jan 22 2009 Jindrich Novy <jnovy@redhat.com> 2.4.4-1
03b646
- update to 2.4.4
03b646
- many fixes and improvements to Nikon and Canon cameras
03b646
- translation updates
03b646
03b646
* Thu Nov 13 2008 Rex Dieter <rdieter@fedoraproject.org> 2.4.3-2
03b646
- respin (libtool)
03b646
03b646
* Mon Oct 20 2008 Jindrich Novy <jnovy@redhat.com> 2.4.3-1
03b646
- update to libgphoto2-2.4.3
03b646
03b646
* Tue Sep 23 2008 Jindrich Novy <jnovy@redhat.com> 2.4.2-2
03b646
- convert all shipped docs to UTF-8
03b646
03b646
* Fri Aug 01 2008 Jindrich Novy <jnovy@redhat.com> 2.4.2-1
03b646
- update to 2.4.2
03b646
- contains many fixes in the Canon camera communication interface
03b646
- drop build patch, no more needed
03b646
03b646
* Mon Jul 07 2008 Jindrich Novy <jnovy@redhat.com> 2.4.1-6
03b646
- increase maximal number of entries in the camera list (#454245)
03b646
03b646
* Fri Jun 20 2008 Kevin Kofler <Kevin@tigcc.ticalc.org> 2.4.1-5
03b646
- fix pkgcfg patch to match actual .pc file names (fixes kdegraphics build)
03b646
03b646
* Thu Jun 12 2008 Jindrich Novy <jnovy@redhat.com> 2.4.1-3
03b646
- libgphoto2-devel requires libusb-devel and libexif-devel for
03b646
  pkgconfig
03b646
03b646
* Wed Jun 04 2008 Jindrich Novy <jnovy@redhat.com> 2.4.1-2
03b646
- fix obsoletes
03b646
- workaround problem with coreutils-6.12 and RHEL5-xen kernels
03b646
  what prevents libgphoto2 koji build
03b646
03b646
* Mon Jun 02 2008 Jindrich Novy <jnovy@redhat.com> 2.4.1-1
03b646
- update to 2.4.1 (#443515, #436138)
03b646
03b646
* Thu May 29 2008 Stepan Kasal <skasal@redhat.com> 2.4.0-3
03b646
- drop gphoto2-norpath.patch
03b646
- use quoted here-document in %%prep
03b646
- fix some typos in m4 sources
03b646
- run autoreconf to get autotools right
03b646
03b646
* Mon Apr 21 2008 Jindrich Novy <jnovy@redhat.com> 2.4.0-2
03b646
- apply patch to fix build with libusb
03b646
03b646
* Fri Apr 18 2008 Jindrich Novy <jnovy@redhat.com> 2.4.0-1
03b646
- backport patch from upstream to avoid segfault when
03b646
  data phase is skipped for certain devices (#435413)
03b646
- initial build
03b646
03b646
* Mon Apr 14 2008 Jindrich Novy <jnovy@redhat.com> 2.4.0-0.2
03b646
- review fixes, thanks to Hans de Goede: (#437285)
03b646
  - remove unused macro
03b646
  - don't exclude s390/s390x
03b646
  - preserve timestamps
03b646
  - fix license
03b646
03b646
* Thu Mar 13 2008 Jindrich Novy <jnovy@redhat.com> 2.4.0-0.1
03b646
- initial libgphoto2 packaging