Summary: Library for accessing digital cameras Summary(ja): デジタルカメラにアクセスするためのライブラリ Name: libgphoto2 Version: 2.4.5 Release: 1%{?_dist_release} # GPLV2+ for the main lib (due to exif.c) and most plugins, some plugins GPLv2 License: GPLv2+ and GPLv2 Group: System Environment/Libraries Source0: http://downloads.sourceforge.net/gphoto/libgphoto2-%{version}.tar.bz2 Patch1: gphoto2-pkgcfg.patch Patch2: gphoto2-storage.patch Patch3: gphoto2-ixany.patch URL: http://www.gphoto.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: libusb-devel >= 0.1.5 BuildRequires: libexif-devel BuildRequires: libjpeg-devel BuildRequires: pkgconfig, sharutils BuildRequires: libtool-ltdl-devel >= 2.2.6a BuildRequires: popt-devel # we run autoreconf: BuildRequires: autoconf, automake, libtool, gettext, cvs Obsoletes: gphoto2 < 2.4.0 Obsoletes: gphoto2-devel < 2.4.0 %description libgphoto2 is a library that can be used by applications to access various digital cameras. libgphoto2 itself is not a GUI application, opposed to gphoto. There are GUI frontends for the gphoto2 library, however, such as gtkam for example. %package devel Summary: Headers and links to compile against the libgphoto2 library Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: pkgconfig, libusb-devel >= 0.1.5, libexif-devel Obsoletes: gphoto2 < 2.4.0-11 Obsoletes: gphoto2-devel < 2.4.0-11 Provides: gphoto2-devel = %{version}-%{release} %description devel libgphoto2 is a library that can be used by applications to access various digital cameras. libgphoto2 itself is not a GUI application, opposed to gphoto. There are GUI frontends for the gphoto2 library, however, such as gtkam for example. This package contains files needed to compile applications that use libgphoto2. %prep %setup -q %patch1 -p1 -b .pkgcfg %patch2 -p1 -b .storage %patch3 -p1 -b .ixany #patch6 -p1 -b .libusb-build # FIXME: These .pc.in files aren't actually being installed? 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 # Patch6 changes configure.ac, so we run autoreconf. # This also installs our patched libtool.m4, avoiding the rpath problem. # But fix a typo first: sed -i 's/\(AC_SUBST([^,]*\)}/\1/' {m4m,libgphoto2_port/m4}/gp-documentation.m4 sed -i 's/\(m4_pattern_\)disallow/\1forbid/g' {m4m,libgphoto2_port/m4}/gp-check-library.m4 autoreconf -i --force export CFLAGS=$RPM_OPT_FLAGS %configure \ --with-drivers=all \ --with-doc-dir=%{_docdir}/%{name} \ --disable-static \ --disable-rpath \ --without-aalib make %{?_smp_mflags} %install rm -rf "${RPM_BUILD_ROOT}" 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}/%{name}/%{version} export LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir} $RPM_BUILD_ROOT%{_libdir}/%{name}/print-camera-list hal-fdi | \ grep -v "