# 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 "