Blame SPECS/libgphoto2.spec

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