File libfprint.spec of Package libfprint

#
# spec file for package libfprint (Version 0.3.0)
#
# Copyright (c) 2010 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:  gcc-c++ glib2-devel libusb-devel mozilla-nss-devel pkgconfig pkgconfig(gdk-pixbuf-2.0)

Name:           libfprint
Url:            http://reactivated.net/fprint
License:        LGPLv2.1
Group:          Development/Libraries/C and C++
PreReq:         %fillup_prereq
Version:        0.3.0
Release:        2
Summary:        Library for fingerprint reader support
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. The fprint project aims to plug a
gap in the Linux desktop: support for consumer fingerprint reader
devices.



%package -n libfprint0
License:        LGPLv2.1
Summary:        Library for fingerprint reader support
Group:          Development/Libraries/C and C++
Provides:       %{name} = %{version}
Obsoletes:      libthinkfinger <= 0.3
Provides:       libthinkfinger = 0.3

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



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

%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
License:        LGPLv2.1
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
./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
%{_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}/*

%changelog