Sophie

Sophie

distrib > Mandriva > 2006.0 > x86_64 > by-pkgid > 169cd1ee3b9c9cb963ee70ba937338f8 > files > 1

libgphoto-2.1.6-8mdk.src.rpm

##### GENERAL STUFF #####

%define major	2
%define libname	%mklibname gphoto %{major}

# Enable debug mode
%define debug 0

#define extraversion rc1
%define extraversion %nil

Summary:	Command line utilities to access digital cameras
Name:		libgphoto
Version:	2.1.6
Release:	8mdk
License:	LGPL
Group:		Graphics


##### SOURCE FILES #####

Source: http://heanet.dl.sourceforge.net/sourceforge/gphoto/%{name}%{major}-%{version}%{?extraversion:%extraversion}.tar.bz2
#Source: http://sourceforge.net/projects/gphoto/%{name}2-cvs20030829.tar.bz2

##### Patches #####

# Support for the Canon Powershot A5
#Patch1: Canon-Powershot_A5.patch.bz2

# Support for dynamic
Patch2: libgphoto2-2.1.1-dynamic.patch.bz2

# Parallel build fixes
#Patch3: libgphoto2-2.1.2rc4-buildfixes.patch.bz2

# Fix libtool
#Patch4: libgphoto2-2.1.2rc5-libtool.patch.bz2

# Fix endless loop occuring when doing PC-controlled capturing with
# Olympus cameras ("sierra" driver)
#Patch5: libgphoto2-2.1.2-endless-loop.patch.bz2

# Fix segfault when downloading thumbnails from a Canon camera where also
# sound annotations are on the camera's memory card
#Patch6: libgphoto2-2.1.2-canon-segfault.patch.bz2

# Fixed camera list, especially the Canon PowerShot S45 should work
# again now.
#Patch7: libgphoto2-2.1.2-canon-camlist.patch.bz2

# Allow downloading large videos from a Canon camera
#Patch8: libgphoto2-2.1.4-canon-maxsize.patch.bz2

# Add signatures for Canon IXUS 430
# (see http://www.gphoto.org/patches/?id=963229)
#Patch9: libgphoto-2.1.4-canon-ixus430.patch.bz2

# Remove signatures for Pentax Optio 450
Patch10: libgphoto2-2.1.6-pentax.patch.bz2

##### ADDITIONAL DEFINITIONS #####

Url: http://sourceforge.net/projects/gphoto/
BuildRoot: %{_tmppath}/%{name}-buildroot
Obsoletes:	hackgphoto2
Provides:	hackgphoto2
Conflicts:	gphoto2 <= 2.1.0
PreReq:		/sbin/ldconfig grep fileutils
BuildRequires:	glib-devel libusb-devel >= 0.1.6 zlib-devel findutils perl
BuildRequires:	libexif-devel
BuildRequires:   autoconf2.5 automake
BuildRequires:	udev-tools
##### SUB-PACKAGES #####

%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 the library that digital camera applications can use

Frontends (GUI and command line) are available separately.

%package -n %{libname}
Summary:	Library to access to digital cameras
Requires: 	libusb >= 0.1.5
Provides:	%{name} = %{version}-%{release}
Conflicts:	gphoto2 <= 2.1.0
Group:		Graphics

%description -n %{libname}
This library contains all the functionality to access to modern digital
cameras via USB or the serial port.

%package -n %{libname}-devel
Summary:	Headers and links to compile against the "%{libname}" library
Requires: 	%{libname} >= %{version}
Requires:	libexif-devel
Requires:	multiarch-utils
Provides:	%{name}-devel = %{version}-%{release}
Provides:	gphoto%{major}-devel = %{version}-%{release}
Conflicts:	gphoto2 <= 2.1.0
Group:		Graphics

%description -n %{libname}-devel
This package contains all files which one needs to compile programs using
the "%{libname}" library.

%package hotplug
Summary:	Hotplug support from libgphoto
Group:		System/Configuration/Hardware
Requires:	udev
#PreReq:		%{libname}

%description hotplug
This package contains the scripts necessary for hotplug support.


##### PREP #####

%prep

export WANT_AUTOCONF_2_5=1

%setup -q -n %{name}%{major}-%{version}%{?extraversion:%extraversion}
#setup -q -n %{name}%{major}

# Support for the Canon Powershot A5
#patch1 -p1 -R

%patch2 -p1 -b .dynamic
#patch3 -p1 -b .buildfixes
#patch4 -p1 -b .libtool
cd camlibs/sierra
#patch5 -p0 -b .sierra
cd ../..
#patch6 -p0 -b .canon-thumbnails
#patch7 -p0 -b .canon-camlist

#patch8 -p1 -b .canon-maxsize

#patch9 -p1 -b .ixus430

%patch10 -p1 -b .pentax

# Needed for CVS version
#./autogen.sh

autoconf
cd libgphoto2_port
autoconf
cd ..

# Support for Mustek gsmart mini 2
#cd camlibs
#bunzip2 -dc %{SOURCE1} | tar -xf -
#cd ..

##### BUILD #####

%build

export WANT_AUTOCONF_2_5=1

# update config.{sub,guess}, ltmain.sh scripts
cd libgphoto2_port
libtoolize --copy --force
cd ..

#configure --enable-docs --with-docs-dir=%{buildroot}%{_docdir}/%{name} --with-doc-formats="man html"
%if %debug
export DONT_STRIP=1
CFLAGS="`echo %optflags |sed -e 's/-O3/-g/'`" CXXFLAGS="`echo %optflags |sed -e 's/-O3/-g/'`" \
%endif
%configure2_5x --with-docs-dir=%{buildroot}%{_docdir}/%{name}-%{version} --with-doc-formats="man html" --without-ltdl --disable-rpath
#configure --without-fig2dev --with-docs-dir=%{buildroot}%{_docdir}/%{name}

%make

##### INSTALL #####

%install
rm -rf ${RPM_BUILD_ROOT}

%if %debug
export DONT_STRIP=1
%endif

# Let all documentation go into /usr/share/doc/libgphoto2-%{version}/
mkdir -p %{buildroot}/usr/share/doc/libgphoto2-%{version}/
ln -s %{buildroot}/usr/share/doc/libgphoto2-%{version}/ %{buildroot}/usr/share/doc/libgphoto2
mkdir -p %{buildroot}/usr/share/doc/libgphoto2_port-%{version}/
ln -s %{buildroot}/usr/share/doc/libgphoto2_port-%{version}/ %{buildroot}/usr/share/doc/libgphoto2_port

%if 0
# Convince gphoto2 to be packaged.
perl -p -i -e "s|^libdir.*|libdir='$RPM_BUILD_ROOT%{_libdir}'|g" \
        libgphoto2_port/libgphoto2_port/libgphoto2_port.la
%endif

%makeinstall_std

# Delete empty doc files
rm -f %{buildroot}/usr/share/doc/libgphoto2_port-%{version}/README
rm -f %{buildroot}/usr/share/doc/libgphoto2_port-%{version}/NEWS

# Remove the links, we don't need them any more.
rm -f %{buildroot}/usr/share/doc/libgphoto2
rm -f %{buildroot}/usr/share/doc/libgphoto2_port

# Fix up libtool libraries.
find $RPM_BUILD_ROOT -name '*.la' | \
	xargs perl -p -i -e "s|$RPM_BUILD_ROOT||g"

# we should move that into the proper Makefile.am eventually
install -d -m755 %{buildroot}/etc/udev/agents.d/usb
install -m755 packaging/linux-hotplug/usbcam.console %{buildroot}/etc/udev/agents.d/usb/usbcam

# convert usermaps to udev rules
mkdir -p $RPM_BUILD_ROOT/etc/udev/rules.d
/usr/sbin/udev_import_usermap --no-modprobe usb %{buildroot}%{_libdir}/libgphoto2/print-usb-usermap > $RPM_BUILD_ROOT/etc/udev/rules.d/70-libgphoto2.rules
rm -f %{buildroot}%{_libdir}/libgphoto2/print-usb-usermap

%find_lang libgphoto2-2
%find_lang libgphoto2_port-0
cat libgphoto2-2.lang libgphoto2_port-0.lang > %{name}.lang

# Install documentation
cp -a AUTHORS README COPYING packaging/linux-hotplug/usbcam.[ug]* %{buildroot}/usr/share/doc/libgphoto2-%{version}/

# Multiarch setup
%multiarch_binaries %buildroot%{_bindir}/gphoto2-config
%multiarch_binaries %buildroot%{_bindir}/gphoto2-port-config



##### PRE/POST INSTALL SCRIPTS #####

%post -n %{libname}
# register libraries
/sbin/ldconfig

%postun -n %{libname}
# unregister libraries
/sbin/ldconfig

##### CLEAN UP #####

%clean
rm -rf $RPM_BUILD_ROOT


##### FILE LISTS FOR ALL BINARY PACKAGES #####

##### libgphoto-hotplug
%files hotplug
%defattr(-,root,root)
%{_sysconfdir}/udev/rules.d/70-libgphoto2.rules
%{_sysconfdir}/udev/agents.d/usb/usbcam

##### libgphoto2
%files -n %{libname} -f %{name}.lang
%defattr(-,root,root)
%{_libdir}/*.so.*
# Here are only ".so" and no ".so.XXX" packages, so the ".so" have to be in
# the main package
%dir %{_libdir}/gphoto2
%dir %{_libdir}/gphoto2/*
%dir %{_libdir}/gphoto2_port
%dir %{_libdir}/gphoto2_port/*
%{_libdir}/gphoto2/*/*.so
%{_libdir}/gphoto2_port/*/*.so

%docdir %{_docdir}/libgphoto2-%{version}
%{_docdir}/libgphoto2-%{version}
%docdir %{_docdir}/libgphoto2_port-%{version}
%{_docdir}/libgphoto2_port-%{version}
%{_datadir}/libgphoto2

##### libgphoto2-devel
%files -n %{libname}-devel
%defattr(-,root,root)
%{_bindir}/*
%{_includedir}/gphoto2
%{_libdir}/*.a
%{_libdir}/*.la
%{_libdir}/*.so
%{_libdir}/gphoto2/*/*.a
%{_libdir}/gphoto2/*/*.la
%{_libdir}/gphoto2_port/*/*.a
%{_libdir}/gphoto2_port/*/*.la

%{_libdir}/pkgconfig/*
%{_mandir}/man3/*


##### CHANGELOG #####

%changelog
* Wed Sep  7 2005 Gwenole Beauchesne <gbeauchesne@mandriva.com> 2.1.6-8mdk
- lib64 fixes

* Sun Sep  4 2005 Olivier Blin <oblin@mandriva.com> 2.1.6-7mdk
- rebuild for new udev_import_usermap

* Fri Sep  2 2005 Olivier Blin <oblin@mandriva.com> 2.1.6-6mdk
- libgphoto-hotplug: require udev instead of hotplug

* Fri Sep  2 2005 Olivier Blin <oblin@mandriva.com> 2.1.6-5mdk
- fix BuildRequires: udev_import_usermap is now in udev-tools

* Sat Aug 27 2005 Olivier Blin <oblin@mandriva.com> 2.1.6-4mdk
- don't try to load the inexistent "usbcam" module in udev
- move usbcam script to /etc/udev/agents.d/usb/usbcam
- remove hotplug usermaps

* Thu Aug 25 2005 Olivier Blin <oblin@mandriva.com> 2.1.6-3mdk
- convert usermaps to udev rules

* Wed Aug 17 2005 Frederic Lepied <flepied@mandriva.com> 2.1.6-2mdk
- remove signature of Pentax Optio 450

* Mon Jun 27 2005 Till Kamppeter <till@mandrakesoft.com> 2.1.6-1mdk
- Updated to GPhoto2 2.1.6 (Bug fixes, support for newest camera models).
- Removed patch 1 (fixed upstream).

* Wed Mar 16 2005 Till Kamppeter <till@mandrakesoft.com> 2.1.5-2mdk
- Removed "Requires: libgphoto-hotplug" from the libgphoto2 package
  (bug 14416).
- Let libgphoto2 package own the /usr/lib/gphoto2_port and
  /usr/lib/gphoto2_port/0.5.1 directories (bug 14422).
- Let libgphoto2 package also own the /usr/lib/gphoto2 and
  /usr/lib/gphoto2/2.1.5 directories.
- Added multiarch stuff

* Thu Dec 16 2004 Till Kamppeter <till@mandrakesoft.com> 2.1.5-1mdk
- Updated to GPhoto2 2.1.5.

* Sat Nov 27 2004 Till Kamppeter <till@mandrakesoft.com> 2.1.5-0.rc1.1mdk
- Updated to GPhoto2 2.1.5rc1.

* Thu Sep 30 2004 Giuseppe Ghibò <ghibo@mandrakesoft.com> 2.1.4-3mdk
- Added signature so to recognize Canon IXUS 430.

* Tue Feb 10 2004 Pascal Terjan <pterjan@mandrake.org> 2.1.4-2mdk
- Patch from CVS to fix large file transfers from Canon cameras

* Fri Jan 23 2004 Till Kamppeter <till@mandrakesoft.com> 2.1.4-1mdk
- Updated to GPhoto2 2.1.4.

* Wed Jan 14 2004 Till Kamppeter <till@mandrakesoft.com> 2.1.4-0.pre1.1mdk
- Updated to GPhoto2 2.1.4pre1.

* Mon Dec 15 2003 Till Kamppeter <till@mandrakesoft.com> 2.1.3-1mdk
- Updated to GPhoto2 2.1.3.

* Thu Sep 18 2003 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 2.1.2-6mdk
- provides plain libgphoto for versioned requires
- move hotplug stuff to libgphoto-hotplug so that proper libs
  packages are parallel installable on biarch platforms without any
  conflict

* Fri Aug 29 2003 Till Kamppeter <till@mandrakesoft.com> 2.1.2-5mdk
- Fixed camera list, especially the Canon PowerShot S45 should work
  again now.

* Fri Aug 29 2003 Till Kamppeter <till@mandrakesoft.com> 2.1.2-4mdk
- Fixed segfault when downloading thumbnails from a Canon camera where also
  sound annotations are on the camera's memory card
- Introduced and enabled debug mode (macro "%%debug").

* Wed Aug 27 2003 Till Kamppeter <till@mandrakesoft.com> 2.1.2-3mdk
- Fixed endless loop occuring when doing PC-controlled capturing with
  Olympus cameras ("sierra" driver).

* Tue Aug 26 2003 Götz Waschk <waschk@linux-mandrake.com> 2.1.2-2mdk
- buildrequires autoconf2.5 

* Mon Aug 18 2003 Till Kamppeter <till@mandrakesoft.com> 2.1.2-1mdk
- Final release of GPhoto2 2.1.2.

* Fri Aug 15 2003 Till Kamppeter <till@mandrakesoft.com> 2.1.2-0.rc6.1mdk
- GPhoto2 2.1.2 RC6.
- Removed Patch3 (camlibs/ptp2/Makefile.am was restructured).

* Tue Aug 12 2003 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 2.1.2-0.rc5.3mdk
- libtool fixes

* Tue Aug  5 2003 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 2.1.2-0.rc5.2mdk
- lib64 fixes
- Patch3: Parallel build fixes

* Tue Aug  5 2003 Till Kamppeter <till@mandrakesoft.com> 2.1.2-0.rc5.1mdk
- GPhoto2 2.1.2 RC5.
- Used the mklibname macro.

* Sun Jul 27 2003 Till Kamppeter <till@mandrakesoft.com> 2.1.2-0.rc4.1mdk
- GPhoto2 2.1.2 RC4.
- Rebuilt for libexif 0.5.10.

* Thu Jul 17 2003 Till Kamppeter <till@mandrakesoft.com> 2.1.2-0.rc3.3mdk
- Corrected path to re-introduce port libraries excluded by Laurent. Without
  them GPhoto2 does not work at all.

* Thu Jul 10 2003 Laurent MONTEL <lmontel@mandrakesoft.com> 2.1.2-0.rc3.2mdk
- Rebuild

* Thu Jun 12 2003 Till Kamppeter <till@mandrakesoft.com> 2.1.2-0.rc3.1mdk
- GPhoto2 2.1.2 RC3.
- libgphoto2-devel package requires glibc-devel and libexif-devel.

* Fri Jan 17 2003 Till Kamppeter <till@mandrakesoft.com> 2.1.1-2mdk
- Rebuilt for new glibc and new libexif.
- Rebuilt without libgpio.
- Made package build possible without the previous version being installed.

* Thu Dec  5 2002 Till Kamppeter <till@mandrakesoft.com> 2.1.1-1mdk
- Release of GPhoto2 2.1.1.

* Tue Aug 13 2002 Frederic Lepied <flepied@mandrakesoft.com> 2.1.1-0.7mdk
- added support for dynamic

* Tue Aug 13 2002 Frederic Lepied <flepied@mandrakesoft.com> 2.1.1-0.6mdk
- use update-usb.usermap in %post instead of doing it by hand

* Thu Aug  8 2002 Till Kamppeter <till@mandrakesoft.com> 2.1.1-0.5mdk
- Updated to CVS of Aug 8. 2002 (Mustek gSmart driver included now).

* Wed Aug  7 2002 Till Kamppeter <till@mandrakesoft.com> 2.1.1-0.4mdk
- Fixed "Conflicts:"/"Obsoletes:"/"Provides:" for 8.2 -> 9.0 update.
- Added support for Mustek gSmart mini 2 and the Canon Powershot A5.

* Tue Aug  6 2002 Till Kamppeter <till@mandrakesoft.com> 2.1.1-0.3mdk
- Added post-install script to set up hotplug.
- Useed "./configure --without-ltdl" due to possible libtool/libltdl
  bugs.

* Mon Aug  5 2002 Till Kamppeter <till@mandrakesoft.com> 2.1.1-0.2mdk
- Updated to CVS of Aug 5, 2002.
- Spec file clean-ups.

* Fri Aug  2 2002 Till Kamppeter <till@mandrakesoft.com> 2.1.1-0.1mdk
- Initial release of separate gphoto2 and libgphoto2 packages.