Blob Blame History Raw
# Arches on which we need to prevent arch conflicts in gphoto2-config
%define multilib_arches %{ix86} ia64 ppc ppc64 s390 s390x x86_64

Summary: Software for accessing digital cameras
Name: gphoto2
%define pkg gphoto2
%define pkgver 2.3.1
%define libpkg libgphoto2
%define libver 2.3.1
Version: %{pkgver}
Release: 5%{?dist}
License: LGPL
Group: Applications/Multimedia
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Source0: http://prdownloads.sourceforge.net/gphoto/%{pkg}-%{pkgver}.tar.bz2
Source1: http://prdownloads.sourceforge.net/gphoto/%{libpkg}-%{libver}.tar.bz2
Patch1: gphoto2-pkgcfg.patch
Url: http://www.gphoto.org/
ExcludeArch: s390 s390x
Provides: libgphoto2 = %{libver}
Requires: lockdev
BuildRequires: libusb-devel >= 0.1.5
BuildRequires: lockdev-devel
BuildRequires: libexif-devel
BuildRequires: libjpeg-devel, readline-devel
BuildRequires: libtool, pkgconfig, sharutils

####################################
%description
The gPhoto2 project is a universal, free application and library
framework that lets you download images from several different
digital camera models, including the newer models with USB
connections. Note that
a) for some older camera models you must use the old "gphoto" package.
b) for USB mass storage models you must use the driver in the kernel

This package contains
i) the library that digital camera applications can use
ii) the command-line utility gphoto2 

Other (GUI) frontends are available separately.

####################################
%package devel
Summary: Headers and links to compile against the libgphoto2 library.
Requires: %{name} = %{version}
Requires: pkgconfig
Requires: libexif-devel libusb-devel
Group: Development/Libraries

####################################
%description devel
The gPhoto2 project is a universal, free application and library
framework that lets you download images from several different
digital camera models, including the newer models with USB
connections. Note that for some older camera models you must use
the old "gphoto" package.

This package contains the files needed to compile applications that
use libgphoto2.

########################################################################
# Building and installing the beast into %{buildroot}
########################################################################

####################################
%prep
%setup -q -a 1
%patch1 -p1 -b .pkgcfg

# write pkg-config stuff 
cat > gphoto2.pc.in << EOF
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
VERSION=@VERSION@

Name: gphoto2
Description: Library for easy access to digital cameras
Requires:
Version: @VERSION@
Libs: -L\${libdir} -lgphoto2 -lgphoto2_port -lm
Cflags: -I\${includedir} -I\${includedir}/gphoto2
EOF
sed 's/Name: gphoto2/Name: gphoto2-port/' < gphoto2.pc.in > gphoto2-port.pc.in

####################################
%build

pushd %{libpkg}-%{libver}
export CFLAGS=$RPM_OPT_FLAGS
%configure \
	--with-drivers=all \
	--with-doc-dir=%{_docdir}/%{name} \
	--disable-static \
	--without-aalib

make
popd

export LIBGPHOTO2_LIBS="-L../%{libpkg}-%{libver}/%{libpkg}/.libs -L../%{libpkg}-%{libver}/%{libpkg}_port/%{libpkg}_port/.libs -lgphoto2 -lgphoto2_port"
export LIBGPHOTO2_CFLAGS="-I../%{libpkg}-%{libver} -I../%{libpkg}-%{libver}/%{libpkg}_port"
%configure \
	--enable-docs \
	--enable-lockdev \
	--with-doc-dir=%{_docdir}/%{name}

make


####################################
%install
rm -rf "${RPM_BUILD_ROOT}"

pushd %{libpkg}-%{libver}
	export LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir}
	make mandir=%{_mandir} DESTDIR=$RPM_BUILD_ROOT install

	pushd packaging/linux-hotplug/
	install -d -m755 %{buildroot}/usr/share/hal/fdi/information/20thirdparty/
	export LIBDIR=$RPM_BUILD_ROOT%{_libdir}
	export CAMLIBS=$RPM_BUILD_ROOT%{_libdir}/%{libpkg}/%{libver}
	export LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir}
	$RPM_BUILD_ROOT%{_libdir}/%{libpkg}/print-camera-list hal-fdi | \
	grep -v "<!-- This file was generated" > $RPM_BUILD_ROOT/%{_datadir}/hal/fdi/information/20thirdparty/10-camera-libgphoto2.fdi
	popd
popd

make mandir=%{_mandir} DESTDIR=$RPM_BUILD_ROOT install

install -m644 gphoto2.pc gphoto2-port.pc $RPM_BUILD_ROOT%{_libdir}/pkgconfig

rm -rf %{buildroot}%{_libdir}/libgphoto2/*/*a
rm -rf %{buildroot}%{_libdir}/libgphoto2_port/*/*a
rm -rf %{buildroot}%{_libdir}/*.a
rm -rf %{buildroot}%{_libdir}/*.la

%find_lang %{name}
%find_lang %{libpkg}-2
%find_lang %{libpkg}_port-0
cat libgphoto2*.lang >> %{name}.lang

####################################
%clean
rm -rf "${RPM_BUILD_ROOT}"

########################################################################
# file list and installation for main package
########################################################################

####################################
%files -f %{name}.lang
%defattr(-,root,root)
%doc AUTHORS README COPYING
%{_bindir}/gphoto2
%{_datadir}/libgphoto2
%dir %{_libdir}/libgphoto2_port
%dir %{_libdir}/libgphoto2_port/*
%{_libdir}/libgphoto2_port/*/*.so
%dir %{_libdir}/libgphoto2
%dir %{_libdir}/libgphoto2/*
%{_libdir}/libgphoto2/*/*.so
%{_libdir}/*.so.*
%{_mandir}/man1/gphoto2.1*
%{_datadir}/hal/fdi/information/20thirdparty/10-camera-libgphoto2.fdi
%{_libdir}/udev/check-ptp-camera

####################################
%post
# register libraries
/sbin/ldconfig

####################################
%postun
# unregister libraries
/sbin/ldconfig

########################################################################
# file list and installation for -devel subpackage
########################################################################

####################################
%files devel
%defattr(-,root,root)
%doc %{_docdir}/gphoto2
%{_bindir}/gphoto2-config*
%{_bindir}/gphoto2-port-config
%{_includedir}/gphoto2
%{_libdir}/*.so
%{_libdir}/pkgconfig/*
%{_mandir}/man3/*

########################################################################
# ChangeLog
########################################################################
%changelog
* Wed Feb 21 2007 Jindrich Novy <jnovy@redhat.com> 2.3.1-5
- include back the 10-camera-libgphoto2.fdi removed in
  the previous build (#229230)

* Mon Feb 19 2007 Jindrich Novy <jnovy@redhat.com> 2.3.1-4
- ACL handling is now moved into HAL (#229230)

* Thu Jan 18 2007 Jindrich Novy <jnovy@redhat.com> 2.3.1-3
- gphoto2-devel requires libusb-devel (#222015)

* Thu Jan 11 2007 Jindrich Novy <jnovy@redhat.com> 2.3.1-2
- really fix the gphoto2-devel multilib conflict (#205211)

* Mon Dec 25 2006 Jindrich Novy <jnovy@redhat.com> 2.3.1-1
- update to 2.3.1
- merry christmas!

* Mon Dec 11 2006 Jindrich Novy <jnovy@redhat.com> 2.3.0-2
- don't ship docs in separate tarball, use the internal one

* Tue Dec  5 2006 Jindrich Novy <jnovy@redhat.com> 2.3.0-1
- update to 2.3.0
- enable lockdev
- spec cleanup

* Fri Dec  1 2006 Jindrich Novy <jnovy@redhat.com> 2.2.0-4
- nuke useless PreReq and BuildRequires

* Fri Nov  3 2006 Jindrich Novy <jnovy@redhat.com> 2.2.0-3
- fix BuildRoot, use dist tag
- specify version of libgphoto2 in Provides

* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 2.2.0-2.1
- rebuild

* Fri Jun 23 2006 Radek Vokál <rvokal@redhat.com> 2.2.0-2
- fix print-camera-list to not require libgphoto2 at build time

* Thu Jun 22 2006 Radek Vokál <rvokal@redhat.com> 2.2.0-1
- update to gphoto2-2.2.0 and libgphoto2-2.2.1

* Wed Jun  7 2006 Radek Vokál <rvokal@redhat.com> 2.1.99-14
- fix policy file (#189936)

* Mon May 29 2006 Radek Vokal <rvokal@redhat.com> 2.1.99-13
- remove Canon IXUS 700 support (#167347)
- add new USB ids

* Thu May 25 2006 Radek Vokal <rvokal@redhat.com> 2.1.99-12
- fix multilib -devel conflicts (#192678)

* Thu May 18 2006 Radek Vokál <rvokal@redhat.com> 2.1.99-11
- include docs on side, disable compiling them (bug in gtk-doc!?)

* Tue Apr 04 2006 Radek Vokál <rvokal@redhat.com> 2.1.99-10
- fix crash in ptp2 module

* Tue Mar 14 2006 Than Ngo <than@redhat.com> 2.1.99-9
- fix gphoto2-config

* Wed Mar 08 2006 Bill Nottingham <notting@redhat.com> 2.1.99-8
- fix i386/x86_64 conflict on fdi files

* Fri Mar 03 2006 Radek Vokál <rvokal@redhat.com> 2.1.99-7
- remove .la files (#183367) 

* Wed Mar 02 2006 Ray Strode <rstrode@redhat.com> 2.1.99-6
- potentially work around bug 183371 by looping/checking for
  5 seconds.

* Wed Mar 01 2006 Radek Vokál <rvokal@redhat.com> 2.1.99-5.4
- spec file tweak, become self-building again

* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 2.1.99-5.2
- bump again for double-long bug on ppc(64)

* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 2.1.99-5.1
- rebuilt for new gcc4.1 snapshot and glibc changes

* Mon Jan 30 2006 Bill Nottingham <notting@redhat.com> 2.1.99-5
- set permissions on /dev/bus/usb/XXX as well - that's what new
  libusb uses by default

* Mon Jan 23 2006 Radek Vokal <rvokal@redhat.com> 2.1.99-4
- fixed gphoto2 --summary segfault with Canon cameras (#178572)

* Fri Jan 13 2006 Radek Vokal <rvokal@redhat.com> 2.1.99-3
- export LIBDIR before creating .fdi file

* Fri Jan 13 2006 Radek Vokal <rvokal@redhat.com> 2.1.99-2
- spec file clean-up
- use ./print-usb-map 
- docs are back in -devel package

* Thu Jan 05 2006 Radek Vokal <rvokal@redhat.com> 2.1.99-1
- upgrade to 2.1.99 + dbus patch

* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com> 2.1.6-7.1
- rebuilt

* Sun Nov 13 2005 John (J5) Palmieri <johnp@redhat.com> 2.1.6-7
- Add callout to cameras with ptp access methods

* Fri Nov 11 2005 John (J5) Palmieri <johnp@redhat.com> 2.1.6-6
- Fix typo in fdi file to point to the correct script
- Install the fdi file to the policy directory instead of information

* Fri Nov 11 2005 John (J5) Palmieri <johnp@redhat.com> 2.1.6-5
- Fix to not install scripts as directories

* Fri Nov 11 2005 John (J5) Palmieri <johnp@redhat.com> 2.1.6-4
- Add gphoto-set-procperm and 90-gphoto-camera-policy.fdi to
  have HAL set permissions on the usb cameras
- Remove hotplug support since we don't use it anymore (udev takes care
  of devices and HAL takes care of permissions)

* Mon Nov 07 2005 Radek Vokal <rvokal@redhat.com> 2.1.6-3
- become self-hosting, don't depend on installed libs (#106442,#172519)

* Wed Jul 27 2005 Tim Waugh <twaugh@redhat.com> 2.1.6-2
- Rebuilt.

* Thu Jun 23 2005 Tim Waugh <twaugh@redhat.com> 2.1.6-1
- 2.1.6.

* Wed Jun  1 2005 Bill Nottingham <notting@redhat.com> 2.1.5-10
- fix multilib conflict on fdi files, and their generation on x86_64
  in general

* Sat May 14 2005 Tim Waugh <twaugh@redhat.com> 2.1.5-9
- Fixed buffer overrun in ricoh/g3 (bug #157739).

* Mon May  2 2005 David Zeuthen <davidz@redhat.com> 2.1.5-8
- Build and install hal device information files

* Tue Mar 29 2005 Tim Waugh <twaugh@redhat.com>
- Re-enable docs.

* Mon Mar 28 2005 Matthias Clasen <mclasen@redhat.com> 2.1.5-7
- Rebuild against newer libexif

* Thu Mar 24 2005 Warren Togami <wtogami@redhat.com>
- BR libtool, pkgconfig

* Thu Mar 24 2005 Tim Waugh <twaugh@redhat.com>
- Disable docs again until gtk-doc is fixed (GNOME bug #169087).

* Thu Mar 24 2005 Michael Schwendt <mschwendt[AT]users.sf.net> 2.1.5-6
- Avoid creation of bad rpaths by removing libtool hacks from spec.

* Thu Mar 24 2005 Tim Waugh <twaugh@redhat.com>
- Disable docs again until gtk-doc is fixed (GNOME bug #169087).

* Mon Mar 21 2005 Tim Waugh <twaugh@redhat.com>
- Fixed memset() usage bug.

* Fri Mar 11 2005 Tim Waugh <twaugh@redhat.com>
- Re-enable docs.

* Fri Mar 11 2005 Tim Waugh <twaugh@redhat.com> 2.1.5-5
- Rebuild with GCC 4 fixes.
- Disable docs again until gtk-doc is fixed (GNOME bug #169087).

* Fri Mar  4 2005 Tim Waugh <twaugh@redhat.com>
- Re-enable docs.

* Fri Mar  4 2005 Tim Waugh <twaugh@redhat.com> 2.1.5-4
- Disable docs until gtk-doc is fixed (GNOME bug #169087).
- Rebuilt for new GCC.

* Wed Jan 12 2005 Tim Waugh <twaugh@redhat.com> 2.1.5-3
- Rebuilt for new readline.

* Mon Jan 10 2005 Tim Waugh <twaugh@redhat.com> 2.1.5-2
- 2.1.5 (bug #143141).

* Fri Oct  8 2004 Tim Waugh <twaugh@redhat.com> 2.1.4-7
- devel sub-package requires libexif-devel (bug #135058).

* Tue Aug 31 2004 Tim Waugh <twaugh@redhat.com> 2.1.4-6
- Fixed mis-applied patch (bug #130755).

* Thu Aug 26 2004 Tim Waugh <twaugh@redhat.com> 2.1.4-5
- Apply patch from David Zeuthen to fix hotplug script (bug #130755).

* Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com>
- rebuilt

* Mon Apr 19 2004 Tim Waugh <twaugh@redhat.com> 2.1.4-3
- BuildRequires libjpeg-devel, readline-devel (bug #121238).

* Wed Mar 10 2004 Tim Waugh <twaugh@redhat.com>
- Apply Jeff Law's cast-as-lvalue patch.

* Tue Mar 02 2004 Elliot Lee <sopwith@redhat.com>
- rebuilt

* Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com>
- rebuilt

* Thu Jan 29 2004 Tim Waugh <twaugh@redhat.com> 2.1.4-1
- 2.1.4.

* Tue Dec 23 2003 Tim Waugh <twaugh@redhat.com> 2.1.3-3
- Build with libexif support.

* Thu Dec  4 2003 Tim Waugh <twaugh@redhat.com> 2.1.3-2
- Rebuilt.

* Wed Dec  3 2003 Tim Waugh <twaugh@redhat.com> 2.1.3-1
- 2.1.3.

* Tue Sep 16 2003 Tim Waugh <twaugh@redhat.com> 2.1.2-1
- 2.1.2.

* Wed Aug  6 2003 Elliot Lee <sopwith@redhat.com> 2.1.1-4
- Fix libtool

* Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com>
- rebuilt

* Thu Mar 20 2003 Tim Waugh <twaugh@redhat.com> 2.1.1-2
- Ship print-usb-usermap, fix post scriptlet.

* Thu Mar 20 2003 Tim Waugh <twaugh@redhat.com> 2.1.1-1
- Use installed libtool.
- 2.1.1.

* Sat Feb 01 2003 Florian La Roche <Florian.LaRoche@redhat.de>
- only package man3 in devel rpm

* Wed Jan 22 2003 Tim Powers <timp@redhat.com>
- rebuilt

* Sun Dec 01 2002 Florian La Roche <Florian.LaRoche@redhat.de>
- remove some old mainframe ifdefs

* Tue Nov 19 2002 Tim Waugh <twaugh@redhat.com> 2.1.0-5
- Fix file lists.
- Don't install files not shipped.
- Rebuild in new environment.

* Wed Jul 24 2002 Tim Waugh <twaugh@redhat.com> 2.1.0-4
- Rebuild, just in case (readline).

* Thu Jul 18 2002 Tim Waugh <twaugh@redhat.com> 2.1.0-3
- Own some more directories.

* Fri Jun 28 2002 Tim Waugh <twaugh@redhat.com> 2.1.0-2
- Don't use -rpath (bug #65983).

* Tue Jun 25 2002 Tim Waugh <twaugh@redhat.com> 2.1.0-1
- 2.1.0.
- No longer need cvsfixes or consolelock patches.

* Fri Jun 21 2002 Tim Powers <timp@redhat.com> 2.0-9
- automated rebuild

* Thu May 23 2002 Tim Powers <timp@redhat.com> 2.0-8
- automated rebuild

* Thu May  9 2002 Tim Waugh <twaugh@redhat.com> 2.0-7
- Require lockdev (bug #64193).

* Mon Apr 29 2002 Tim Waugh <twaugh@redhat.com> 2.0-6
- In fact, don't even build for mainframe.

* Mon Apr 29 2002 Florian La Roche <Florian.LaRoche@redhat.de> 2.0-5
- do not require hotplug for mainframe

* Mon Apr 15 2002 Nalin Dahyabhai <nalin@redhat.com> 2.0-4
- Set the owner of the device to the console lock holder, not the owner
  of /dev/console, in the hotplug agent, fixing access for users who log
  in at VTs and use startx (#62976).

* Fri Apr 12 2002 Tim Waugh <twaugh@redhat.com> 2.0-3
- Rebuild (fixed bug #63355).

* Wed Feb 27 2002 Tim Waugh <twaugh@redhat.com> 2.0-2
- Fix from CVS: close port unconditionally in gp_camera_exit().

* Mon Feb 25 2002 Tim Waugh <twaugh@redhat.com> 2.0-1
- 2.0 is released.
- Ship the .so symlinks in the devel package.

* Mon Feb 25 2002 Tim Waugh <twaugh@redhat.com> 2.0-0.rc4.1
- 2.0rc4.

* Fri Feb 22 2002 Tim Waugh <twaugh@redhat.com> 2.0-0.rc3.1
- 2.0rc3.  No longer need CVS patch.
- Build no longer requires xmlto.

* Thu Feb 21 2002 Tim Waugh <twaugh@redhat.com> 2.0-0.rc2.2
- Fix DC240 hangs (patch from CVS).
- Rebuild in new environment.

* Tue Feb 19 2002 Tim Waugh <twaugh@redhat.com> 2.0-0.rc2.1
- 2.0rc2 (bug #59993).  No longer need docs patch or man page.
- Really fix up libtool libraries (bug #60002).

* Fri Feb 15 2002 Tim Waugh <twaugh@redhat.com> 2.0-0.beta5.2
- PreReq /sbin/ldconfig, grep, and fileutils (bug #59941).

* Tue Feb 12 2002 Tim Waugh <twaugh@redhat.com> 2.0-0.beta5.1
- 2.0beta5.
- Fix Makefiles so that documentation can be built.
- Ship pkgconfig file.
- Add man page.

* Thu Feb  7 2002 Tim Waugh <twaugh@redhat.com> 2.0-0.beta4.1
- 2.0beta4.
- Build requires transfig, and at least version 0.1.5 of libusb.
- Clean up file lists.
- Build documentation.

* Fri Jan 25 2002 Tim Waugh <twaugh@redhat.com> 2.0-0.beta3.2
- Rebuild in new environment.
- Dump docbook-dtd30-sgml requirement; gtk-doc is sufficient.

* Sun Nov 18 2001 Tim Waugh <twaugh@redhat.com> 2.0-0.beta3.1
- Adapted for Red Hat Linux.

* Sat Oct 27 2001 Hans Ulrich Niedermann <gp@n-dimensional.de>
- fixed update behaviour for hotplug list (do not erase it when updating)

* Thu Oct 25 2001 Tim Waugh <twaugh@redhat.com>
- hotplug dependency is a prereq not a requires (the package scripts
  need it).

* Sun Oct 14 2001 Hans Ulrich Niedermann <gp@n-dimensional.de>
- integrated spec file into source package

* Sun Oct 14 2001 Hans Ulrich Niedermann <gp@n-dimensional.de>
- 2.0beta3

* Tue Oct  2 2001 Tim Waugh <twaugh@redhat.com> 2.0beta2-0.1
- Adapted for Red Hat Linux.
- 2.0beta2.

* Mon Aug  6 2001 Till Kamppeter <till@mandrakesoft.com> 2.0-0.beta1.2mdk
- Corrected "Requires:"

* Mon Aug  6 2001 Till Kamppeter <till@mandrakesoft.com> 2.0-0.beta1.1mdk
- Initial release