b7fb5a5
%global udevdir %(pkg-config --variable=udevdir udev)
b7fb5a5
fbbe8e1
Name:           libgphoto2
b944ca8
Version:        2.5.3
b944ca8
Release:        6%{?dist}
fbbe8e1
Summary:        Library for accessing digital cameras
fbbe8e1
Group:          Development/Libraries
cbbdca8
# GPLV2+ for the main lib (due to exif.c) and most plugins, some plugins GPLv2
fbbe8e1
License:        GPLv2+ and GPLv2
fbbe8e1
URL:            http://www.gphoto.org/
b944ca8
Source0:        http://downloads.sourceforge.net/gphoto/%{name}-%{version}.tar.bz2
fbbe8e1
Patch1:         gphoto2-pkgcfg.patch
fbbe8e1
Patch2:         gphoto2-storage.patch
fbbe8e1
Patch3:         gphoto2-ixany.patch
fbbe8e1
Patch4:         gphoto2-device-return.patch
b944ca8
BuildRequires:  libusbx-devel
fbbe8e1
BuildRequires:  lockdev-devel
fbbe8e1
BuildRequires:  libexif-devel
fbbe8e1
BuildRequires:  libjpeg-devel
fbbe8e1
BuildRequires:  pkgconfig, sharutils
fbbe8e1
BuildRequires:  libtool-ltdl-devel, popt-devel
fbbe8e1
BuildRequires:  gd-devel
fbbe8e1
BuildRequires:  systemd
fbbe8e1
Requires:       lockdev
fbbe8e1
Obsoletes:      gphoto2 < 2.4.0-11
cbbdca8
cbbdca8
%description
cbbdca8
libgphoto2 is a library that can be used by applications to access
cbbdca8
various digital cameras. libgphoto2 itself is not a GUI application,
cbbdca8
opposed to gphoto. There are GUI frontends for the gphoto2 library,
cbbdca8
however, such as gtkam for example.
cbbdca8
fbbe8e1
cbbdca8
%package devel
fbbe8e1
Summary:        Headers and links to compile against the libgphoto2 library
fbbe8e1
Group:          Development/Libraries
fbbe8e1
Requires:       %{name}%{?_isa} = %{version}-%{release}
fbbe8e1
Obsoletes:      gphoto2-devel < 2.4.0-11
fbbe8e1
Provides:       gphoto2-devel = %{version}-%{release}
cbbdca8
cbbdca8
%description devel
cbbdca8
libgphoto2 is a library that can be used by applications to access
cbbdca8
various digital cameras. libgphoto2 itself is not a GUI application,
cbbdca8
opposed to gphoto. There are GUI frontends for the gphoto2 library,
cbbdca8
however, such as gtkam for example.
cbbdca8
cbbdca8
This package contains files needed to compile applications that
cbbdca8
use libgphoto2.
cbbdca8
fbbe8e1
cbbdca8
%prep
cbbdca8
%setup -q
cbbdca8
%patch1 -p1 -b .pkgcfg
cbbdca8
%patch2 -p1 -b .storage
cbbdca8
%patch3 -p1 -b .ixany
b5a4827
%patch4 -p1 -b .device-return
cbbdca8
fbbe8e1
for i in AUTHORS ChangeLog COPYING libgphoto2_port/AUTHORS libgphoto2_port/COPYING.LIB `find -name 'README.*'`; do
b944ca8
    mv ${i} ${i}.old
b944ca8
    iconv -f ISO-8859-1 -t UTF-8 < ${i}.old > ${i}
b944ca8
    touch -r ${i}.old ${i} || :
b944ca8
    rm -f ${i}.old
85968ae
done
85968ae
fbbe8e1
cbbdca8
%build
c2724bc
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
cbbdca8
%configure \
b944ca8
    udevscriptdir='%{udevdir}' \
b944ca8
    --with-drivers=all \
b944ca8
    --with-doc-dir=%{_docdir}/%{name} \
b944ca8
    --disable-static \
b944ca8
    --disable-rpath
5c234c0
5c234c0
# Don't use rpath!
5c234c0
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
5c234c0
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
5c234c0
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libgphoto2_port/libtool
5c234c0
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libgphoto2_port/libtool
5c234c0
cbbdca8
make %{?_smp_mflags}
cbbdca8
cbbdca8
fbbe8e1
%install
fbbe8e1
%make_install INSTALL="install -p" mandir=%{_mandir}
cbbdca8
cbbdca8
pushd packaging/linux-hotplug/
cbbdca8
export LIBDIR=$RPM_BUILD_ROOT%{_libdir}
cbbdca8
export CAMLIBS=$RPM_BUILD_ROOT%{_libdir}/%{name}/%{version}
cbbdca8
export LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir}
9338bed
9338bed
# Output udev rules for device identification; this is used by GVfs gphoto2
9338bed
# backend and others.
9338bed
#
fbe46a8
mkdir -p $RPM_BUILD_ROOT%{_udevrulesdir}
fbe46a8
$RPM_BUILD_ROOT%{_libdir}/%{name}/print-camera-list udev-rules version 136 > $RPM_BUILD_ROOT%{_udevrulesdir}/40-libgphoto2.rules
cbbdca8
popd
cbbdca8
22ca9a9
# remove circular symlink in /usr/include/gphoto2 (#460807)
22ca9a9
rm -f %{buildroot}%{_includedir}/gphoto2/gphoto2
22ca9a9
2047434
# remove unneeded print-camera-list from libdir (#745081)
2047434
rm -f %{buildroot}%{_libdir}/libgphoto2/print-camera-list
2047434
cbbdca8
rm -rf %{buildroot}%{_libdir}/libgphoto2/*/*a
cbbdca8
rm -rf %{buildroot}%{_libdir}/libgphoto2_port/*/*a
cbbdca8
rm -rf %{buildroot}%{_libdir}/*.a
cbbdca8
rm -rf %{buildroot}%{_libdir}/*.la
cbbdca8
b5a4827
%find_lang %{name}-6
b5a4827
%find_lang %{name}_port-10
cbbdca8
cat libgphoto2*.lang >> %{name}.lang
cbbdca8
b944ca8
# https://fedoraproject.org/wiki/Packaging_tricks#With_.25doc
b944ca8
mkdir __doc
b944ca8
mv %{buildroot}%{_defaultdocdir}/%{name}/* __doc
b944ca8
rm -rf %{buildroot}%{_defaultdocdir}/%{name}
fbbe8e1
fbbe8e1
%post -p /sbin/ldconfig
fbbe8e1
%postun -p /sbin/ldconfig
fbbe8e1
cbbdca8
cbbdca8
%files -f %{name}.lang
cbbdca8
%doc AUTHORS COPYING README NEWS
cbbdca8
%dir %{_libdir}/libgphoto2_port
cbbdca8
%dir %{_libdir}/libgphoto2_port/*
cbbdca8
%dir %{_libdir}/libgphoto2
cbbdca8
%dir %{_libdir}/libgphoto2/*
cbbdca8
%{_libdir}/libgphoto2_port/*/*.so
cbbdca8
%{_libdir}/libgphoto2/*/*.so
cbbdca8
%{_libdir}/*.so.*
fbe46a8
%{_udevrulesdir}/40-libgphoto2.rules
b7fb5a5
%{udevdir}/check-ptp-camera
cbbdca8
cbbdca8
%files devel
b944ca8
%doc __doc/*
cbbdca8
%{_datadir}/libgphoto2
cbbdca8
%{_bindir}/gphoto2-config*
cbbdca8
%{_bindir}/gphoto2-port-config
cbbdca8
%{_includedir}/gphoto2
cbbdca8
%{_libdir}/*.so
cbbdca8
%{_libdir}/pkgconfig/*
cbbdca8
%{_mandir}/man3/*
cbbdca8
cbbdca8
%changelog
b944ca8
* Wed Feb 12 2014 Jon Disnard <jdisnard@gmail.com> - 2.5.3-6
b944ca8
- Bump to latest upstream version.
b944ca8
b944ca8
* Wed Aug 28 2013 Tim Waugh <twaugh@redhat.com> - 2.5.2-5
b944ca8
- Fixed documentation issue due to unversioned doc dirs (bug #1001263).
b944ca8
b944ca8
* Fri Aug 16 2013 Tim Waugh <twaugh@redhat.com> - 2.5.2-4
b944ca8
- Build against libusbx instead of libusb (bug #997880).
b944ca8
b944ca8
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5.2-3
b944ca8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
b944ca8
b944ca8
* Tue Jun 11 2013 Remi Collet <rcollet@redhat.com> - 2.5.2-2
b944ca8
- rebuild for new GD 2.1.0
b944ca8
b8ff062
* Mon May  6 2013 Hans de Goede <hdegoede@redhat.com> - 2.5.2-1
b8ff062
- New upstream release bugfix 2.5.2
b8ff062
- Drop bugfix patches (merged upstream)
b8ff062
9f45899
* Sat May  4 2013 Hans de Goede <hdegoede@redhat.com> - 2.5.1.1-4
9f45899
- Fix crash when dealing with PTP devices without a memory card (rhbz#915688)
9f45899
fbbe8e1
* Thu May  2 2013 Hans de Goede <hdegoede@redhat.com> - 2.5.1.1-3
fbbe8e1
- Fix PTP devices not working in USB-3 ports (rhbz#819918)
fbbe8e1
- Cleanup spec-file
fbbe8e1
fbe46a8
* Tue Apr 23 2013 Tim Waugh <twaugh@redhat.com> 2.5.1.1-2
fbe46a8
- Use _udevrulesdir macro.
fbe46a8
0c53d81
* Tue Feb 19 2013 Jindrich Novy <jnovy@redhat.com> 2.5.1.1-1
0c53d81
- update to 2.5.1.1
0c53d81
cbf73ba
* Sun Feb 17 2013 Jindrich Novy <jnovy@redhat.com> 2.5.0-8
cbf73ba
- fix camera detection - thanks to Panu Matilainen (#912040)
cbf73ba
6de279e
* Wed Jan 30 2013 Jindrich Novy <jnovy@redhat.com> 2.5.0-7
6de279e
- move /lib files to /usr/lib
6de279e
- fix changelog
6de279e
Adam Tkac b0a9af5
* Fri Jan 18 2013 Adam Tkac <atkac redhat com> - 2.5.0-6
Adam Tkac b0a9af5
- rebuild due to "jpeg8-ABI" feature drop
Adam Tkac b0a9af5
b871ad8
* Sun Jan 13 2013 Jindrich Novy <jnovy@redhat.com> 2.5.0-5
b871ad8
- remove deprecated HAL file (#894527)
b871ad8
c2724bc
* Sat Dec 01 2012 Jindrich Novy <jnovy@redhat.com> 2.5.0-4
c2724bc
- compile with -fno-strict-aliasing (because of ptp.c)
c2724bc
2f74e09
* Wed Sep 19 2012 Hans de Goede <hdegoede@redhat.com> 2.5.0-3
2f74e09
- Fix the usbscsi port driver not working, this fixes many miniature
2f74e09
  (keychain) photo frames no longer being accessible
2f74e09
ee8518f
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5.0-2
ee8518f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
ee8518f
b5a4827
* Wed Jul 11 2012 Jindrich Novy <jnovy@redhat.com> 2.5.0-1
b5a4827
- update to 2.5.0
b5a4827
bd15ef7
* Mon Apr 16 2012 Jindrich Novy <jnovy@redhat.com> 2.4.14-1
bd15ef7
- update to 2.4.14
bd15ef7
6de279e
* Wed Mar 21 2012 Jindrich Novy <jnovy@redhat.com> 2.4.13-1
d402a29
- update to 2.4.13
d402a29
ac42d3e
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4.11-3
ac42d3e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
ac42d3e
2047434
* Wed Oct 12 2011 Jindrich Novy <jnovy@redhat.com> 2.4.11-2
2047434
- remove unneeded print-camera-list from libdir (#745081)
2047434
8f8fa87
* Mon Apr 18 2011 Jindrich Novy <jnovy@redhat.com> 2.4.11-1
8f8fa87
- update to 2.4.11
8f8fa87
e715002
* Wed Feb 09 2011 Jindrich Novy <jnovy@redhat.com> 2.4.10.1-1
e715002
- update to 2.4.10.1
e715002
0507bcc
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4.10-5
0507bcc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
0507bcc
d986c59
* Wed Jan 26 2011 Caolán McNamara <caolanm@redhat.com> 2.4.10-4
d986c59
- rebuild for dependencies
d986c59
94d0834
* Wed Oct 20 2010 Jindrich Novy <jnovy@redhat.com> 2.4.10-3
94d0834
- move udev helper scripts to /lib/udev (#644552)
94d0834
6de279e
* Mon Sep 06 2010 Jindrich Novy <jnovy@redhat.com> 2.4.10-2
15ca3be
- BR: gd-devel because of ax203 and st2205 camlibs (#630570)
15ca3be
c29f1bc
* Tue Aug 17 2010 Jindrich Novy <jnovy@redhat.com> 2.4.10-1
c29f1bc
- update to 2.4.10
c29f1bc
5c234c0
* Mon Jul 12 2010 Dan Horák <dan[at]danny.cz> 2.4.9-2
5c234c0
- remove the need to call autoreconf
5c234c0
d133ed0
* Mon Apr 12 2010 Jindrich Novy <jnovy@redhat.com> 2.4.9-1
d133ed0
- update to 2.4.9
d133ed0
7717e58
* Mon Jan 25 2010 Jindrich Novy <jnovy@redhat.com> 2.4.8-1
7717e58
- update to 2.4.8
7717e58
22ca9a9
* Fri Dec 18 2009 Jindrich Novy <jnovy@redhat.com> 2.4.7-3
22ca9a9
- remove circular symlink in /usr/include/gphoto2 (#460807)
22ca9a9
97eba8d
* Fri Oct 23 2009 Jindrich Novy <jnovy@redhat.com> 2.4.7-2
97eba8d
- return the dual-mode device to kernel once we don't use it (#530545)
97eba8d
923d1b3
* Tue Aug 18 2009 Jindrich Novy <jnovy@redhat.com> 2.4.7-1
923d1b3
- update to 2.4.7
923d1b3
- drop udev patch, applied upstream
923d1b3
- update storage patch
923d1b3
9338bed
* Sun Aug 09 2009 David Zeuthen <davidz@redhat.com> 2.4.6-3
9338bed
- Add patch from http://sourceforge.net/tracker/?func=detail&aid=2801117&group_id=8874&atid=308874
9338bed
  and generate generic udev rules for device identification (ID_GPHOTO2* properties)
9338bed
6d4203b
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4.6-2
6d4203b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
6d4203b
ce01518
* Mon May 18 2009 Jindrich Novy <jnovy@redhat.com> 2.4.6-1
ce01518
- update to 2.4.6
ce01518
- new IDs for Kodak V803, M1063, Canon PowerShot A650IS, SD990 (aka IXUS 980IS),
ce01518
  SD880IS, A480, Canon EOS 50D, Fuji FinePix S1000fd
ce01518
- many Canon related fixes
ce01518
cd86926
* Wed Apr 08 2009 Jindrich Novy <jnovy@redhat.com> 2.4.5-1
cd86926
- update to 2.4.5
cd86926
- remove .canontimeout patch, applied upstream
cd86926
fe7c2a6
* Wed Apr 01 2009 Jindrich Novy <jnovy@redhat.com> 2.4.4-4
fe7c2a6
- increase timeouts for Canon cameras (#476355), thanks to
fe7c2a6
  Andrzej Nowak and Russell Harrison
fe7c2a6
4b0763a
* Thu Mar 05 2009 Caolán McNamara <caolanm@redhat.com> - 2.4.4-3
4b0763a
- tweak BR to get to build
4b0763a
47f37a6
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4.4-2
47f37a6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
47f37a6
3099930
* Thu Jan 22 2009 Jindrich Novy <jnovy@redhat.com> 2.4.4-1
3099930
- update to 2.4.4
3099930
- many fixes and improvements to Nikon and Canon cameras
3099930
- translation updates
3099930
1258eb4
* Thu Nov 13 2008 Rex Dieter <rdieter@fedoraproject.org> 2.4.3-2
1258eb4
- respin (libtool)
1258eb4
69c7c8e
* Mon Oct 20 2008 Jindrich Novy <jnovy@redhat.com> 2.4.3-1
69c7c8e
- update to libgphoto2-2.4.3
69c7c8e
85968ae
* Tue Sep 23 2008 Jindrich Novy <jnovy@redhat.com> 2.4.2-2
85968ae
- convert all shipped docs to UTF-8
85968ae
117ae74
* Fri Aug 01 2008 Jindrich Novy <jnovy@redhat.com> 2.4.2-1
117ae74
- update to 2.4.2
117ae74
- contains many fixes in the Canon camera communication interface
117ae74
- drop build patch, no more needed
117ae74
05b56d8
* Mon Jul 07 2008 Jindrich Novy <jnovy@redhat.com> 2.4.1-6
05b56d8
- increase maximal number of entries in the camera list (#454245)
05b56d8
3608e43
* Fri Jun 20 2008 Kevin Kofler <Kevin@tigcc.ticalc.org> 2.4.1-5
e064eb3
- fix pkgcfg patch to match actual .pc file names (fixes kdegraphics build)
e064eb3
007158c
* Thu Jun 12 2008 Jindrich Novy <jnovy@redhat.com> 2.4.1-3
007158c
- libgphoto2-devel requires libusb-devel and libexif-devel for
007158c
  pkgconfig
007158c
a435e95
* Wed Jun 04 2008 Jindrich Novy <jnovy@redhat.com> 2.4.1-2
a435e95
- fix obsoletes
3cb7cc5
- workaround problem with coreutils-6.12 and RHEL5-xen kernels
3cb7cc5
  what prevents libgphoto2 koji build
a435e95
900c226
* Mon Jun 02 2008 Jindrich Novy <jnovy@redhat.com> 2.4.1-1
900c226
- update to 2.4.1 (#443515, #436138)
900c226
f5b85a1
* Thu May 29 2008 Stepan Kasal <skasal@redhat.com> 2.4.0-3
f5b85a1
- drop gphoto2-norpath.patch
f5b85a1
- use quoted here-document in %%prep
f5b85a1
- fix some typos in m4 sources
f5b85a1
- run autoreconf to get autotools right
f5b85a1
d05701f
* Mon Apr 21 2008 Jindrich Novy <jnovy@redhat.com> 2.4.0-2
d05701f
- apply patch to fix build with libusb
d05701f
e60acaf
* Fri Apr 18 2008 Jindrich Novy <jnovy@redhat.com> 2.4.0-1
e60acaf
- backport patch from upstream to avoid segfault when
e60acaf
  data phase is skipped for certain devices (#435413)
e60acaf
- initial build
e60acaf
cbbdca8
* Mon Apr 14 2008 Jindrich Novy <jnovy@redhat.com> 2.4.0-0.2
cbbdca8
- review fixes, thanks to Hans de Goede: (#437285)
cbbdca8
  - remove unused macro
cbbdca8
  - don't exclude s390/s390x
cbbdca8
  - preserve timestamps
cbbdca8
  - fix license
cbbdca8
cbbdca8
* Thu Mar 13 2008 Jindrich Novy <jnovy@redhat.com> 2.4.0-0.1
cbbdca8
- initial libgphoto2 packaging