cvsdist c4ed31b
Summary: Software for accessing digital cameras
cvsdist c4ed31b
Name: gphoto2
cvsdist c4ed31b
%define pkg gphoto2
cvsdist edd2fd0
%define pkgver 2.1.0
cvsdist edd2fd0
Version: %{pkgver}
cvsdist 903313d
Release: 4
cvsdist c4ed31b
License: LGPL
cvsdist c4ed31b
Group: Applications/Multimedia
cvsdist c4ed31b
BuildRoot: %{_tmppath}/%{name}-%{version}-root
cvsdist 362fbf5
#Source: http://www.gphoto.org/dist/%{pkg}-%{pkgver}.tar.gz
cvsdist 362fbf5
Source: ftp://ufies.org/pub/people/christophe/gphoto2/%{pkg}-%{pkgver}.tar.gz
cvsdist edd2fd0
Patch0: gphoto2-2.1.0-no-rpath.patch
cvsdist c4ed31b
Url: http://www.gphoto.org/
cvsdist edd2fd0
ExcludeArch: s390 s390x
cvsdist c4ed31b
# For /etc/hotplug/usb..
cvsdist c4ed31b
PreReq: hotplug >= 2001_04_24-13
cvsdist 362fbf5
PreReq: /sbin/ldconfig, grep, fileutils
cvsdist c4ed31b
Provides: libgphoto2
cvsdist edd2fd0
Requires: lockdev
cvsdist c4ed31b
BuildRequires: libusb-devel >= 0.1.5
cvsdist 362fbf5
BuildRequires: gtk-doc
cvsdist c4ed31b
BuildRequires: findutils perl
cvsdist c4ed31b
BuildRequires: transfig
cvsdist edd2fd0
BuildRequires: lockdev-devel
cvsdist c4ed31b
cvsdist c4ed31b
####################################
cvsdist c4ed31b
%description
cvsdist c4ed31b
The gPhoto2 project is a universal, free application and library
cvsdist c4ed31b
framework that lets you download images from several different
cvsdist c4ed31b
digital camera models, including the newer models with USB
cvsdist c4ed31b
connections. Note that
cvsdist c4ed31b
a) for some older camera models you must use the old "gphoto" package.
cvsdist c4ed31b
b) for USB mass storage models you must use the driver in the kernel
cvsdist c4ed31b
cvsdist c4ed31b
This package contains
cvsdist c4ed31b
i) the library that digital camera applications can use
cvsdist 362fbf5
ii) the command-line utility gphoto2 
cvsdist c4ed31b
cvsdist c4ed31b
Other (GUI) frontends are available separately.
cvsdist c4ed31b
cvsdist 362fbf5
####################################
cvsdist c4ed31b
%package devel
cvsdist c4ed31b
Summary: Headers and links to compile against the libgphoto2 library.
cvsdist c4ed31b
Requires: %{name} = %{version}
cvsdist c4ed31b
Requires: pkgconfig
cvsdist c4ed31b
Group: Development/Libraries
cvsdist c4ed31b
cvsdist c4ed31b
####################################
cvsdist c4ed31b
%description devel
cvsdist c4ed31b
The gPhoto2 project is a universal, free application and library
cvsdist c4ed31b
framework that lets you download images from several different
cvsdist c4ed31b
digital camera models, including the newer models with USB
cvsdist c4ed31b
connections. Note that for some older camera models you must use
cvsdist c4ed31b
the old "gphoto" package.
cvsdist c4ed31b
cvsdist c4ed31b
This package contains the files needed to compile applications that
cvsdist c4ed31b
use libgphoto2.
cvsdist c4ed31b
cvsdist 362fbf5
########################################################################
cvsdist 362fbf5
# Building and installing the beast into %{buildroot}
cvsdist 362fbf5
########################################################################
cvsdist 362fbf5
cvsdist 362fbf5
####################################
cvsdist c4ed31b
%prep
cvsdist c4ed31b
rm -rf "${RPM_BUILD_DIR}/%{name}-%{version}"
cvsdist c4ed31b
%setup -q -n %{pkg}-%{pkgver}
cvsdist edd2fd0
%patch0 -p1 -b .no-rpath
cvsdist c4ed31b
cvsdist c4ed31b
####################################
cvsdist c4ed31b
%build
cvsdist c4ed31b
%define __libtoolize :
cvsdist c4ed31b
%configure --enable-docs --with-doc-dir=%{buildroot}%{_docdir}/%{name}
cvsdist c4ed31b
make
cvsdist c4ed31b
cvsdist c4ed31b
####################################
cvsdist c4ed31b
%install
cvsdist c4ed31b
rm -rf "${RPM_BUILD_ROOT}"
cvsdist c4ed31b
cvsdist c4ed31b
# Convince gphoto2 to be packaged.
cvsdist c4ed31b
perl -p -i -e "s|^libdir.*|libdir='$RPM_BUILD_ROOT%{_libdir}'|g" \
cvsdist c4ed31b
	libgphoto2_port/libgphoto2_port/libgphoto2_port.la
cvsdist c4ed31b
cvsdist c4ed31b
%makeinstall
cvsdist c4ed31b
cvsdist c4ed31b
# Fix up libtool libraries.
cvsdist c4ed31b
find $RPM_BUILD_ROOT -name '*.la' | \
cvsdist 362fbf5
  xargs perl -p -i -e "s|$RPM_BUILD_ROOT||g"
cvsdist c4ed31b
cvsdist edd2fd0
%ifnarch s390 s390x
cvsdist c4ed31b
install -d -m755 %{buildroot}/etc/hotplug/usb/
cvsdist edd2fd0
install -m755 packaging/linux-hotplug/usbcam.console %{buildroot}/etc/hotplug/usb/usbcam
cvsdist edd2fd0
%endif
cvsdist c4ed31b
cvsdist c4ed31b
cp -a %{buildroot}%{_docdir}/%{name} installed-doc
cvsdist c4ed31b
find installed-doc -name '*.sgml' | xargs rm
cvsdist c4ed31b
cvsdist c4ed31b
%find_lang %{name}
cvsdist c4ed31b
cvsdist c4ed31b
cvsdist c4ed31b
####################################
cvsdist c4ed31b
%clean
cvsdist c4ed31b
rm -rf "${RPM_BUILD_ROOT}"
cvsdist c4ed31b
cvsdist c4ed31b
########################################################################
cvsdist c4ed31b
# file list and installation for main package
cvsdist c4ed31b
########################################################################
cvsdist c4ed31b
cvsdist c4ed31b
####################################
cvsdist c4ed31b
%files -f %{name}.lang
cvsdist c4ed31b
%defattr(-,root,root)
cvsdist c4ed31b
%doc doc/gphoto2.txt doc/gphoto2-cli.txt
cvsdist c4ed31b
%doc AUTHORS README COPYING
cvsdist c4ed31b
%{_bindir}/gphoto2
cvsdist edd2fd0
%ifnarch s390 s390x
cvsdist c4ed31b
/etc/hotplug/usb/usbcam
cvsdist edd2fd0
%endif
cvsdist c4ed31b
%{_datadir}/gphoto2
cvsdist c4ed31b
%dir %{_libdir}/gphoto2_port
cvsdist c4ed31b
%dir %{_libdir}/gphoto2_port/*
cvsdist c4ed31b
%{_libdir}/gphoto2_port/*/*.so
cvsdist edd2fd0
%dir %{_libdir}/gphoto2
cvsdist edd2fd0
%dir %{_libdir}/gphoto2/*
cvsdist c4ed31b
%{_libdir}/gphoto2/*/*.so
cvsdist c4ed31b
%{_libdir}/*.so.*
cvsdist c4ed31b
%{_mandir}/man1/gphoto2.1*
cvsdist c4ed31b
cvsdist c4ed31b
cvsdist c4ed31b
####################################
cvsdist edd2fd0
%ifnarch s390 s390x
cvsdist c4ed31b
%post
cvsdist c4ed31b
# add supported cameras to /etc/hotplug/usb.usermap
cvsdist c4ed31b
grep -v '^usbcam' /etc/hotplug/usb.usermap > /etc/hotplug/usb.usermap.tmp
cvsdist c4ed31b
/usr/bin/gphoto2 --print-usb-usermap >> /etc/hotplug/usb.usermap.tmp
cvsdist c4ed31b
mv /etc/hotplug/usb.usermap.tmp /etc/hotplug/usb.usermap
cvsdist c4ed31b
# register libraries
cvsdist c4ed31b
/sbin/ldconfig
cvsdist c4ed31b
cvsdist c4ed31b
####################################
cvsdist c4ed31b
%postun
cvsdist c4ed31b
# unregister libraries
cvsdist c4ed31b
/sbin/ldconfig
cvsdist c4ed31b
if [ "$1" = 0 ]; then
cvsdist c4ed31b
    # remove supported cameras from /etc/hotplug/usb.usermap
cvsdist c4ed31b
    grep -v '^usbcam' /etc/hotplug/usb.usermap > /etc/hotplug/usb.usermap.new
cvsdist c4ed31b
    mv /etc/hotplug/usb.usermap.new /etc/hotplug/usb.usermap
cvsdist c4ed31b
fi
cvsdist edd2fd0
%endif
cvsdist c4ed31b
cvsdist c4ed31b
########################################################################
cvsdist c4ed31b
# file list and installation for -devel subpackage
cvsdist c4ed31b
########################################################################
cvsdist c4ed31b
cvsdist c4ed31b
####################################
cvsdist c4ed31b
%files devel
cvsdist c4ed31b
%defattr(-,root,root)
cvsdist c4ed31b
%doc installed-doc/html
cvsdist c4ed31b
%{_bindir}/gphoto2-config
cvsdist c4ed31b
%{_bindir}/gphoto2-port-config
cvsdist c4ed31b
%{_includedir}/gphoto2
cvsdist c4ed31b
%{_libdir}/*.la
cvsdist 362fbf5
%{_libdir}/*.so
cvsdist c4ed31b
%{_libdir}/pkgconfig/*
cvsdist c4ed31b
cvsdist c4ed31b
########################################################################
cvsdist c4ed31b
# ChangeLog
cvsdist c4ed31b
########################################################################
cvsdist c4ed31b
%changelog
cvsdist 903313d
* Wed Jul 24 2002 Tim Waugh <twaugh@redhat.com> 2.1.0-4
cvsdist 903313d
- Rebuild, just in case (readline).
cvsdist 903313d
cvsdist edd2fd0
* Thu Jul 18 2002 Tim Waugh <twaugh@redhat.com> 2.1.0-3
cvsdist edd2fd0
- Own some more directories.
cvsdist edd2fd0
cvsdist edd2fd0
* Fri Jun 28 2002 Tim Waugh <twaugh@redhat.com> 2.1.0-2
cvsdist edd2fd0
- Don't use -rpath (bug #65983).
cvsdist edd2fd0
cvsdist edd2fd0
* Tue Jun 25 2002 Tim Waugh <twaugh@redhat.com> 2.1.0-1
cvsdist edd2fd0
- 2.1.0.
cvsdist edd2fd0
- No longer need cvsfixes or consolelock patches.
cvsdist edd2fd0
cvsdist edd2fd0
* Fri Jun 21 2002 Tim Powers <timp@redhat.com> 2.0-9
cvsdist edd2fd0
- automated rebuild
cvsdist edd2fd0
cvsdist edd2fd0
* Thu May 23 2002 Tim Powers <timp@redhat.com> 2.0-8
cvsdist edd2fd0
- automated rebuild
cvsdist edd2fd0
cvsdist edd2fd0
* Thu May  9 2002 Tim Waugh <twaugh@redhat.com> 2.0-7
cvsdist edd2fd0
- Require lockdev (bug #64193).
cvsdist edd2fd0
cvsdist edd2fd0
* Mon Apr 29 2002 Tim Waugh <twaugh@redhat.com> 2.0-6
cvsdist edd2fd0
- In fact, don't even build for mainframe.
cvsdist edd2fd0
cvsdist edd2fd0
* Mon Apr 29 2002 Florian La Roche <Florian.LaRoche@redhat.de> 2.0-5
cvsdist edd2fd0
- do not require hotplug for mainframe
cvsdist edd2fd0
cvsdist 976de0a
* Mon Apr 15 2002 Nalin Dahyabhai <nalin@redhat.com> 2.0-4
cvsdist 976de0a
- Set the owner of the device to the console lock holder, not the owner
cvsdist 976de0a
  of /dev/console, in the hotplug agent, fixing access for users who log
cvsdist 976de0a
  in at VTs and use startx (#62976).
cvsdist 976de0a
cvsdist 362fbf5
* Fri Apr 12 2002 Tim Waugh <twaugh@redhat.com> 2.0-3
cvsdist 362fbf5
- Rebuild (fixed bug #63355).
cvsdist 362fbf5
cvsdist 362fbf5
* Wed Feb 27 2002 Tim Waugh <twaugh@redhat.com> 2.0-2
cvsdist 362fbf5
- Fix from CVS: close port unconditionally in gp_camera_exit().
cvsdist 362fbf5
cvsdist 362fbf5
* Mon Feb 25 2002 Tim Waugh <twaugh@redhat.com> 2.0-1
cvsdist 362fbf5
- 2.0 is released.
cvsdist 362fbf5
- Ship the .so symlinks in the devel package.
cvsdist 362fbf5
cvsdist 362fbf5
* Mon Feb 25 2002 Tim Waugh <twaugh@redhat.com> 2.0-0.rc4.1
cvsdist 362fbf5
- 2.0rc4.
cvsdist 362fbf5
cvsdist 362fbf5
* Fri Feb 22 2002 Tim Waugh <twaugh@redhat.com> 2.0-0.rc3.1
cvsdist 362fbf5
- 2.0rc3.  No longer need CVS patch.
cvsdist 362fbf5
- Build no longer requires xmlto.
cvsdist 362fbf5
cvsdist 362fbf5
* Thu Feb 21 2002 Tim Waugh <twaugh@redhat.com> 2.0-0.rc2.2
cvsdist 362fbf5
- Fix DC240 hangs (patch from CVS).
cvsdist 362fbf5
- Rebuild in new environment.
cvsdist 362fbf5
cvsdist 362fbf5
* Tue Feb 19 2002 Tim Waugh <twaugh@redhat.com> 2.0-0.rc2.1
cvsdist 362fbf5
- 2.0rc2 (bug #59993).  No longer need docs patch or man page.
cvsdist 362fbf5
- Really fix up libtool libraries (bug #60002).
cvsdist 362fbf5
cvsdist 362fbf5
* Fri Feb 15 2002 Tim Waugh <twaugh@redhat.com> 2.0-0.beta5.2
cvsdist 362fbf5
- PreReq /sbin/ldconfig, grep, and fileutils (bug #59941).
cvsdist 362fbf5
cvsdist c4ed31b
* Tue Feb 12 2002 Tim Waugh <twaugh@redhat.com> 2.0-0.beta5.1
cvsdist c4ed31b
- 2.0beta5.
cvsdist c4ed31b
- Fix Makefiles so that documentation can be built.
cvsdist c4ed31b
- Ship pkgconfig file.
cvsdist c4ed31b
- Add man page.
cvsdist c4ed31b
cvsdist c4ed31b
* Thu Feb  7 2002 Tim Waugh <twaugh@redhat.com> 2.0-0.beta4.1
cvsdist c4ed31b
- 2.0beta4.
cvsdist c4ed31b
- Build requires transfig, and at least version 0.1.5 of libusb.
cvsdist c4ed31b
- Clean up file lists.
cvsdist c4ed31b
- Build documentation.
cvsdist c4ed31b
cvsdist c4ed31b
* Fri Jan 25 2002 Tim Waugh <twaugh@redhat.com> 2.0-0.beta3.2
cvsdist c4ed31b
- Rebuild in new environment.
cvsdist c4ed31b
- Dump docbook-dtd30-sgml requirement; gtk-doc is sufficient.
cvsdist c4ed31b
cvsdist c4ed31b
* Sun Nov 18 2001 Tim Waugh <twaugh@redhat.com> 2.0-0.beta3.1
cvsdist c4ed31b
- Adapted for Red Hat Linux.
cvsdist c4ed31b
cvsdist c4ed31b
* Sat Oct 27 2001 Hans Ulrich Niedermann <gp@n-dimensional.de>
cvsdist c4ed31b
- fixed update behaviour for hotplug list (do not erase it when updating)
cvsdist c4ed31b
cvsdist c4ed31b
* Thu Oct 25 2001 Tim Waugh <twaugh@redhat.com>
cvsdist c4ed31b
- hotplug dependency is a prereq not a requires (the package scripts
cvsdist c4ed31b
  need it).
cvsdist c4ed31b
cvsdist c4ed31b
* Sun Oct 14 2001 Hans Ulrich Niedermann <gp@n-dimensional.de>
cvsdist c4ed31b
- integrated spec file into source package
cvsdist c4ed31b
cvsdist c4ed31b
* Sun Oct 14 2001 Hans Ulrich Niedermann <gp@n-dimensional.de>
cvsdist c4ed31b
- 2.0beta3
cvsdist c4ed31b
cvsdist c4ed31b
* Tue Oct  2 2001 Tim Waugh <twaugh@redhat.com> 2.0beta2-0.1
cvsdist c4ed31b
- Adapted for Red Hat Linux.
cvsdist c4ed31b
- 2.0beta2.
cvsdist c4ed31b
cvsdist c4ed31b
* Mon Aug  6 2001 Till Kamppeter <till@mandrakesoft.com> 2.0-0.beta1.2mdk
cvsdist c4ed31b
- Corrected "Requires:"
cvsdist c4ed31b
cvsdist c4ed31b
* Mon Aug  6 2001 Till Kamppeter <till@mandrakesoft.com> 2.0-0.beta1.1mdk
cvsdist c4ed31b
- Initial release
cvsdist c4ed31b
cvsdist c4ed31b
cvsdist c4ed31b