File libfprint.spec of Package libfprint

#
# spec file for package libfprint
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# 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.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


BuildRequires:  automake
BuildRequires:  gcc-c++
BuildRequires:  glib2-devel
# Needed for patch21
BuildRequires:  libtool
BuildRequires:  libusb-devel
BuildRequires:  mozilla-nss-devel
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(gdk-pixbuf-2.0)

Name:           libfprint
Url:            http://www.freedesktop.org/wiki/Software/fprint
PreReq:         %fillup_prereq
Version:        0.4.0
Release:        0
Summary:        Library for fingerprint reader support
License:        LGPL-2.1+
Group:          Development/Libraries/C and C++
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Source0:        %{name}-%{version}.tar.bz2
Patch17:        libfprint-upeke2_6stage.diff
Patch21:        libfprint-install_examples.patch
Source99:       baselibs.conf

%description
The fprint project aims to plug a gap in the Linux desktop: support for
consumer fingerprint reader devices.



%package -n libfprint0
Summary:        Library for fingerprint reader support
Group:          Development/Libraries/C and C++
Provides:       %{name} = %{version}

%description -n libfprint0
The fprint project aims to plug a gap in the Linux desktop: support for
consumer fingerprint reader devices.



%package devel
Summary:        Library for fingerprint reader support (developer files)
Group:          Development/Libraries/C and C++
Requires:       %{name} = %{version}
Requires:       ImageMagick-devel
Requires:       glib2-devel
Requires:       glibc-devel
Requires:       libfprint = %{version}
Requires:       libfprint0 = %{version}
Requires:       libopenssl-devel
Requires:       libusb-devel
Requires:       zlib-devel

%description devel
This package contains the header files, static libraries and
development documentation for libfprint. If you like to develop
programs using libfprint, you will need to install this package.

%package examples
Summary:        Library for fingerprint reader support (example programs)
Group:          Development/Libraries/C and C++
Requires:       %{name} = %{version}

%description examples
This package contains the header files, static libraries and
development documentation for libfprint. If you like to develop
programs using libfprint, you will need to install this package.



%prep
%setup -q
%patch17
%patch21

%build
# Needed for patch21
autoreconf -fi
./configure CFLAGS="$RPM_OPT_FLAGS"                             \
            --enable-static=no                                  \
            --prefix=%{_prefix}                                 \
            --libdir=%{_libdir}                                 \
            --mandir=%{_mandir}                                 \
	    --sysconfdir=%{_sysconfdir}				\
            --includedir=%{_includedir}
make
make -C examples

%install
make install DESTDIR=$RPM_BUILD_ROOT
make -C examples install DESTDIR=$RPM_BUILD_ROOT

#remove unpackaged files
rm -f %{buildroot}%{_libdir}/*.la

%post -n libfprint0 -p /sbin/ldconfig

%postun -n libfprint0 -p /sbin/ldconfig

%files -n libfprint0
%defattr(-, root, root)
%{_libdir}/%{name}.so.*
%dir %{_sysconfdir}/udev
%dir %{_sysconfdir}/udev/rules.d
%config %{_sysconfdir}/udev/rules.d/60-fprint-autosuspend.rules

%files devel
%defattr(-, root, root)
%dir %{_includedir}/%{name}
%{_includedir}/%{name}/fprint.h
%{_libdir}/%{name}.so
%{_libdir}/pkgconfig/%{name}.pc

%files examples
%defattr(-, root, root)
%{_bindir}/enroll
%{_bindir}/img_capture
%{_bindir}/verify
%{_bindir}/verify_live

%changelog
openSUSE Build Service is sponsored by