File fprintd.spec of Package fprintd

# spec file for package fprintd
# Copyright (c) 2015 SUSE LINUX 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

Name:           fprintd
Version:        0.6.0
Release:        0
Summary:        D-Bus service for Fingerprint reader access
License:        GPL-2.0+
Group:          Productivity/Security
Source1:        baselibs.conf
BuildRequires:  gtk-doc >= 1.3
BuildRequires:  intltool
BuildRequires:  pam-devel
BuildRequires:  xz
BuildRequires:  pkgconfig(dbus-glib-1)
BuildRequires:  pkgconfig(glib-2.0)
BuildRequires:  pkgconfig(libfprint) > 0.1.0
BuildRequires:  pkgconfig(polkit-gobject-1)
BuildRequires:  pkgconfig(systemd)
Recommends:     %{name}-lang
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
ExcludeArch:    s390 s390x

D-Bus service to access fingerprint readers.

%package pam
Summary:        PAM module for fingerprint authentication
License:        GPL-2.0+
Group:          Productivity/Security
Requires:       %{name} = %{version}
# on biarch platforms we need to have it before the call of pam-config
Recommends:     yast2-fingerprint-reader
Supplements:    modalias(usb:v045Ep00BBd*dc*dsc*dp*ic*isc*ip*)
Supplements:    modalias(usb:v045Ep00BCd*dc*dsc*dp*ic*isc*ip*)
Supplements:    modalias(usb:v045Ep00BDd*dc*dsc*dp*ic*isc*ip*)
Supplements:    modalias(usb:v045Ep00CAd*dc*dsc*dp*ic*isc*ip*)
Supplements:    modalias(usb:v0483p2015d*dc*dsc*dp*ic*isc*ip*)
Supplements:    modalias(usb:v0483p2016d*dc*dsc*dp*ic*isc*ip*)
Supplements:    modalias(usb:v05BAp0007d*dc*dsc*dp*ic*isc*ip*)
Supplements:    modalias(usb:v05BAp000Ad*dc*dsc*dp*ic*isc*ip*)
Supplements:    modalias(usb:v08FFp1600d*dc*dsc*dp*ic*isc*ip*)
Supplements:    modalias(usb:v08FFp2580d*dc*dsc*dp*ic*isc*ip*)
Supplements:    modalias(usb:v08FFp5501d*dc*dsc*dp*ic*isc*ip*)
Supplements:    modalias(usb:v1162p0300d*dc*dsc*dp*ic*isc*ip*)
Supplements:    modalias(usb:v147Ep2016d*dc*dsc*dp*ic*isc*ip*)
Obsoletes:      pam_fprint < 0.2-7
Provides:       pam_fprint = %{version}-%{release}
Obsoletes:      pam_thinkfinger < 0.3
Provides:       pam_thinkfinger = 0.3
Obsoletes:      pam_fp < 0.1
Provides:       pam_fp = 0.1
Requires(postun):         coreutils pam pam-config

%description pam
PAM module that uses the fprintd D-Bus service for fingerprint

%package devel
Summary:        Development files for %{name}
License:        GFDL-1.1+
Group:          Development/Libraries/C and C++
Requires:       %{name} = %{version}
Requires:       gtk-doc
BuildArch:      noarch

%description devel
Development documentation for fprintd, the D-Bus service for
fingerprint readers access.

%setup -q

%configure \
    --libdir=/%{_lib}/ \
    --disable-static \
    --enable-gtk-doc \
make %{?_smp_mflags}

find %{buildroot}/%{_lib} -name '*.la' -delete -print
mkdir -p %{buildroot}/%{_localstatedir}/lib/fprint
%find_lang %{name} %{?no_lang_C}

%service_add_pre fprintd.service

%service_add_post fprintd.service

%service_del_preun fprintd.service

%service_del_postun fprintd.service

%postun pam
if [ "$1" = "0" ]; then
        %{_sbindir}/pam-config -d --fprintd ||:

# FIXME This file should be marked as config when it does something useful

%files lang -f %{name}.lang

%files pam
%doc pam/README

%files devel