2007-01-08 17:45:38 +01:00
|
|
|
#
|
2010-01-27 17:36:52 +01:00
|
|
|
# spec file for package libgphoto2 (Version 2.4.8)
|
2007-01-08 17:45:38 +01:00
|
|
|
#
|
2010-01-27 17:36:52 +01:00
|
|
|
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2007-01-08 17:45:38 +01:00
|
|
|
#
|
2008-08-21 21:18:47 +02:00
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2007-01-08 17:45:38 +01:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
# norootforbuild
|
|
|
|
|
2008-02-29 15:51:51 +01:00
|
|
|
|
2007-01-08 17:45:38 +01:00
|
|
|
Name: libgphoto2
|
2010-03-26 01:14:15 +01:00
|
|
|
BuildRequires: doxygen fdupes gcc-c++ hal-devel libexif-devel libjpeg-devel libusb-devel udev
|
2008-02-29 15:51:51 +01:00
|
|
|
Url: http://gphoto.org/
|
2008-11-02 15:43:02 +01:00
|
|
|
# bug437293
|
|
|
|
%ifarch ppc64
|
|
|
|
Obsoletes: libgphoto2-64bit
|
|
|
|
%endif
|
|
|
|
#
|
2007-01-08 17:45:38 +01:00
|
|
|
%define prefix /usr
|
2010-01-27 17:36:52 +01:00
|
|
|
License: LGPLv2.1+
|
2007-06-25 17:48:12 +02:00
|
|
|
Group: Hardware/Camera
|
2007-01-08 17:45:38 +01:00
|
|
|
Summary: A Digital Camera Library
|
2010-03-26 01:14:15 +01:00
|
|
|
Version: 2.4.8
|
2010-01-27 17:36:52 +01:00
|
|
|
Release: 1
|
2007-01-08 17:45:38 +01:00
|
|
|
Source0: libgphoto2-%{version}.tar.bz2
|
2010-01-27 17:36:52 +01:00
|
|
|
Source1: baselibs.conf
|
2007-01-08 17:45:38 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2008-03-21 03:10:38 +01:00
|
|
|
Requires: %{name}-lang = %{version}
|
2008-02-29 15:51:51 +01:00
|
|
|
|
2007-01-08 17:45:38 +01:00
|
|
|
%package devel
|
|
|
|
Summary: Development headers for libgphoto2
|
2010-01-27 17:36:52 +01:00
|
|
|
License: LGPLv2.1+
|
2007-06-25 17:48:12 +02:00
|
|
|
Group: Hardware/Camera
|
2007-05-17 18:23:34 +02:00
|
|
|
Requires: libgphoto2 = %version libusb-devel
|
2007-03-01 20:50:08 +01:00
|
|
|
Requires: libexif-devel
|
2007-01-08 17:45:38 +01:00
|
|
|
|
|
|
|
%description
|
|
|
|
gPhoto (GNU Photo) is a set of libraries for previewing, retrieving,
|
|
|
|
and capturing images from a range of supported digital cameras to your
|
|
|
|
local hard drive. It does not support digital cameras based on the USB
|
|
|
|
storage protocol. Those can be mounted by Linux directly.
|
|
|
|
|
2010-01-25 11:33:12 +01:00
|
|
|
As of this time, gPhoto supports around 1200 cameras, listed on:
|
2007-01-08 17:45:38 +01:00
|
|
|
|
2010-01-25 11:33:12 +01:00
|
|
|
http://gphoto.org/proj/libgphoto2/support.php
|
2007-01-08 17:45:38 +01:00
|
|
|
|
|
|
|
or by running
|
|
|
|
|
|
|
|
gphoto2 --list-cameras
|
|
|
|
|
|
|
|
%description devel
|
|
|
|
gPhoto (GNU Photo) is a set of libraries for previewing, retrieving,
|
|
|
|
and capturing images from a range of supported digital cameras to your
|
|
|
|
local hard drive.
|
|
|
|
|
|
|
|
These are its development libraries and headers.
|
|
|
|
|
2007-08-09 15:49:26 +02:00
|
|
|
%lang_package
|
2007-01-08 17:45:38 +01:00
|
|
|
%prep
|
|
|
|
%setup -q
|
|
|
|
|
|
|
|
%build
|
|
|
|
%{?suse_update_config:%{suse_update_config -f . libgphoto2_port}}
|
2008-03-12 11:47:52 +01:00
|
|
|
AUTOPOINT=true autoreconf -fi
|
2007-01-08 17:45:38 +01:00
|
|
|
PATH="/usr/X11R6/bin:$PATH" \
|
2007-02-23 12:49:40 +01:00
|
|
|
%configure \
|
|
|
|
--with-doc-dir=%{_defaultdocdir}/%{name} \
|
|
|
|
--with-drivers=all
|
2007-01-08 17:45:38 +01:00
|
|
|
make %{?jobs:-j%jobs}
|
2007-06-14 00:39:31 +02:00
|
|
|
|
|
|
|
%check
|
2007-01-14 00:54:51 +01:00
|
|
|
make check
|
2007-01-08 17:45:38 +01:00
|
|
|
|
|
|
|
%install
|
|
|
|
# skip-check-libtool-deps
|
|
|
|
export LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir}
|
2007-02-23 12:49:40 +01:00
|
|
|
%makeinstall
|
2007-01-08 17:45:38 +01:00
|
|
|
%{find_lang} libgphoto2-2
|
|
|
|
%{find_lang} libgphoto2_port-0
|
|
|
|
cat libgphoto2-2.lang libgphoto2_port-0.lang > libgphoto2-all.lang
|
|
|
|
pushd packaging/generic
|
|
|
|
export CAMLIBS=$RPM_BUILD_ROOT/%_libdir/libgphoto2/%version/
|
|
|
|
# Check the installed hal (in neededforbuild) if the directory
|
|
|
|
# is still at the place we expect to avoid surprises.
|
|
|
|
if [ ! -d /usr/share/hal/fdi/information/20thirdparty/ ] ; then
|
|
|
|
echo "*** The hal FDI file location has changed. Fix the build."
|
|
|
|
exit 1
|
|
|
|
fi
|
2009-08-13 18:10:39 +02:00
|
|
|
install -m 0755 -d $RPM_BUILD_ROOT/usr/share/hal/fdi/information/20thirdparty/
|
2007-01-08 17:45:38 +01:00
|
|
|
./print-camera-list hal-fdi > $RPM_BUILD_ROOT/usr/share/hal/fdi/information/20thirdparty/10-camera-libgphoto2.fdi
|
|
|
|
# ./print-camera-list hal-fdi-dev > $RPM_BUILD_ROOT/usr/share/hal/fdi/information/20thirdparty/10-camera-libgphoto2-device.fdi
|
|
|
|
if [ ! -s $RPM_BUILD_ROOT/usr/share/hal/fdi/information/20thirdparty/10-camera-libgphoto2.fdi ]; then
|
|
|
|
echo "*** Did not generate a fdi map. Check the build."
|
|
|
|
exit 1
|
|
|
|
fi
|
2009-08-13 18:10:39 +02:00
|
|
|
%if 0%{?suse_version} >= 1120
|
|
|
|
# new style UDEV rules (gudev) which will obsolete HAL fdi files
|
|
|
|
if [ ! -d /lib/udev/rules.d/ ] ; then
|
|
|
|
echo "*** The udev rules file location has changed. Fix the build."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
install -m 0755 -d $RPM_BUILD_ROOT/lib/udev/rules.d/
|
|
|
|
./print-camera-list udev-rules version 136 > $RPM_BUILD_ROOT/lib/udev/rules.d/40-libgphoto2.rules
|
|
|
|
%endif
|
2007-01-08 17:45:38 +01:00
|
|
|
popd
|
|
|
|
# udev helpers not used here.
|
2007-01-08 22:53:33 +01:00
|
|
|
rm $RPM_BUILD_ROOT/usr/%_lib/udev/check-mtp-device
|
|
|
|
rm $RPM_BUILD_ROOT/usr/%_lib/udev/check-ptp-camera
|
2007-01-08 17:45:38 +01:00
|
|
|
mv doc/doxygen-output/libgphoto2-api.html apidocs
|
2008-02-29 23:25:38 +01:00
|
|
|
fn=$RPM_BUILD_ROOT/%{_libdir}/pkgconfig/libgphoto2_port.pc
|
|
|
|
grep -v driverdir= $fn > $fn.new
|
|
|
|
mv $fn.new $fn
|
2007-08-09 15:49:26 +02:00
|
|
|
%fdupes $RPM_BUILD_ROOT
|
|
|
|
|
2007-01-08 17:45:38 +01:00
|
|
|
%clean
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
2007-08-09 15:49:26 +02:00
|
|
|
%files
|
2007-01-08 17:45:38 +01:00
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_libdir}/libgphoto2
|
|
|
|
%{_libdir}/libgphoto2_port
|
|
|
|
%dir %{_defaultdocdir}/%{name}
|
2007-09-13 18:48:17 +02:00
|
|
|
%exclude %{_defaultdocdir}/%{name}/apidocs.html
|
2007-01-08 17:45:38 +01:00
|
|
|
%{_defaultdocdir}/%{name}/*
|
|
|
|
%{prefix}/share/%{name}
|
|
|
|
%{_libdir}/libgphoto2.so.*
|
|
|
|
%{_libdir}/libgphoto2_port.so.*
|
|
|
|
%{_mandir}/man3/libgphoto2.3*
|
|
|
|
%{_mandir}/man3/libgphoto2_port.3*
|
|
|
|
/usr/share/hal/fdi/information/20thirdparty/10-camera-libgphoto2.fdi
|
2009-08-21 16:43:13 +02:00
|
|
|
%if 0%{?suse_version} >= 1120
|
2009-08-13 18:10:39 +02:00
|
|
|
/lib/udev/rules.d/40-libgphoto2.rules
|
2009-08-21 16:43:13 +02:00
|
|
|
%endif
|
2007-01-08 17:45:38 +01:00
|
|
|
# /usr/share/hal/fdi/information/20thirdparty/10-camera-libgphoto2-device.fdi
|
|
|
|
|
2007-08-09 15:49:26 +02:00
|
|
|
%files lang -f libgphoto2-all.lang
|
|
|
|
|
2007-01-08 17:45:38 +01:00
|
|
|
%files devel
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%doc apidocs
|
|
|
|
%{prefix}/include/gphoto2
|
|
|
|
%{prefix}/bin/gphoto2-config
|
|
|
|
%{prefix}/bin/gphoto2-port-config
|
|
|
|
%{_libdir}/libgphoto2.so
|
|
|
|
%{_libdir}/libgphoto2.la
|
|
|
|
%{_libdir}/libgphoto2_port.so
|
|
|
|
%{_libdir}/libgphoto2_port.la
|
|
|
|
%{_libdir}/pkgconfig/libgphoto2.pc
|
|
|
|
%{_libdir}/pkgconfig/libgphoto2_port.pc
|
|
|
|
|
|
|
|
%post
|
2007-08-09 15:49:26 +02:00
|
|
|
/sbin/ldconfig
|
2007-01-08 17:45:38 +01:00
|
|
|
|
2007-06-14 00:39:31 +02:00
|
|
|
%postun
|
2007-08-09 15:49:26 +02:00
|
|
|
/sbin/ldconfig
|
2007-06-14 00:39:31 +02:00
|
|
|
|
2007-02-23 12:49:40 +01:00
|
|
|
%changelog
|