# 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.2.0 %define libpkg libgphoto2 %define libver 2.2.1 Version: %{pkgver} Release: 1 License: LGPL Group: Applications/Multimedia BuildRoot: %{_tmppath}/%{name}-%{version}-root Source0: http://prdownloads.sourceforge.net/gphoto/%{pkg}-%{pkgver}.tar.bz2 Source1: http://prdownloads.sourceforge.net/gphoto/%{libpkg}-%{libver}.tar.bz2 Source2: gphoto2-2.1.99-installed-doc.tar.bz2 Source3: 90-gphoto-camera-policy.fdi Source4: gphoto-set-procperm Source5: gphoto2-config Patch2: gphoto2-2.2.0-gcc4.patch Patch5: gphoto2-2.1.99-config.patch Url: http://www.gphoto.org/ ExcludeArch: s390 s390x PreReq: /sbin/ldconfig, grep, fileutils Provides: libgphoto2 Requires: lockdev BuildRequires: libusb-devel >= 0.1.5 BuildRequires: gtk-doc BuildRequires: findutils perl BuildRequires: transfig 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 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 -a 2 %patch2 -p1 -b .gcc4 %patch5 -p1 -b .config #################################### %build pushd %{libpkg}-%{libver} export CFLAGS=$RPM_OPT_FLAGS %configure \ --mandir=%{_mandir} \ --libdir=%{_libdir} \ --with-drivers=all \ --with-doc-dir=%{_docdir}/%{name} \ --disable-static export tagname=CC make ln -s . libgphoto2/gphoto2 ln -s . libgphoto2_port/libgphoto2_port/gphoto2 popd gp_path=../libgphoto2_port/libgphoto2_port cat $(pwd)/libgphoto2-%{libver}/libgphoto2/libgphoto2.pc | sed \ -e "s,^libdir=.*$,libdir=$(pwd)/libgphoto2-%{libver}/libgphoto2," \ -e "s,^includedir=.*$,includedir=$(pwd)/libgphoto2-%{libver}/libgphoto2," \ -e "s,^Libs:.*},Libs: -L\${libdir}/.libs -L\${libdir}/$gp_path/.libs/," \ -e "s,^Cflags:.*$,Cflags: -I\${includedir}/$gp_path -I\${includedir}," \ > libgphoto2.pc export PKG_CONFIG_PATH=. %configure \ --mandir=%{_mandir} \ --libdir=%{_libdir} \ --enable-docs \ --with-doc-dir=%{_docdir}/%{name} export tagname=CC make #################################### %install rm -rf "${RPM_BUILD_ROOT}" pushd %{libpkg}-%{libver} export tagname=CC 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} $RPM_BUILD_ROOT%{_libdir}/%{libpkg}/print-camera-list hal-fdi | grep -v "