File libfprint.spec of Package libfprint
#
# spec file for package libfprint
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2013 Mariusz Fik <fisiu@opensuse.org>.
#
# 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 https://bugs.opensuse.org/
#
%define apiver 2
%{!?_udevrulesdir: %global _udevrulesdir %(pkg-config --variable=udevdir udev)/rules.d}
# Systemd 248 and later already comes with the autosuspend hwdb
%if 0%{?suse_version} >= 1550
%define install_fp_udev_hwdb 0
%else
%define install_fp_udev_hwdb 1
%endif
Name: libfprint
Version: 1.90.1+vfs0090.1
Release: 0
Summary: Library for fingerprint reader support
License: LGPL-2.1-or-later
Group: Development/Libraries/C and C++
URL: https://github.com/3v1n0/libfprint
Source0: libfprint-v%{version}.tar.xz
Source99: baselibs.conf
BuildRequires: gcc-c++
BuildRequires: gobject-introspection
BuildRequires: gobject-introspection-devel
BuildRequires: gtk-doc
BuildRequires: meson >= 0.46.1
BuildRequires: pkgconfig
BuildRequires: pkgconfig(openssl)
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(gudev-1.0)
BuildRequires: pkgconfig(gusb)
BuildRequires: pkgconfig(libusb-1.0)
BuildRequires: pkgconfig(nss)
BuildRequires: pkgconfig(pixman-1)
BuildRequires: pkgconfig(udev)
%description
The fprint project provides a central system to support fingerprint
readers. libfprint is the component which does the work of talking to
fingerprint reading devices, and processing fingerprint data.
This version is only for 2016 ThinkPad's fingerprint readers!
%package -n libfprint-%{apiver}-%{apiver}
Summary: Library for fingerprint reader support
Group: System/Libraries
Provides: %{name} = %{version}
Obsoletes: libfprint-examples
%description -n libfprint-%{apiver}-%{apiver}
The fprint project provides a central system to support fingerprint
readers. libfprint is the component which does the work of talking to
fingerprint reading devices, and processing fingerprint data.
%package devel
Summary: Headers for the fingerprint reader library
Group: Development/Libraries/C and C++
Requires: %{name} = %{version}
Requires: glibc-devel
Requires: libfprint-%{apiver}-%{apiver} = %{version}
%description devel
This package contains the header files and development documentation
for libfprint. If you like to develop programs using libfprint, you
will need to install this package.
%package examples
Summary: Example programs from the libfprint package
Group: Development/Libraries/C and C++
Requires: %{name} = %{version}
%description examples
This package contains example programs from libfprint.
%package doc
Summary: Development documents of libfprint
Group: Documentation/Other
BuildArch: noarch
%description doc
This package contains the development documents for libfprint.
%package -n typelib-1_0-FPrint-2_0
Summary: Introspection bindings for libfprint
Group: System/Libraries
%description -n typelib-1_0-FPrint-2_0
This package contains the introspection bindings for the libfprint.
%prep
%autosetup -p1 -n %{name}-v%{version}
%build
%meson \
-Dgtk-examples=false \
%if %{install_fp_udev_hwdb}
-Dudev_hwdb=enabled \
%else
-Dudev_hwdb=disabled \
%endif
%{nil}
%meson_build
%install
%meson_install
%post -n libfprint-%{apiver}-%{apiver}
/sbin/ldconfig
%{?udev_rules_update:%udev_rules_update}
%if %{install_fp_udev_hwdb}
%{?udev_hwdb_update:%udev_hwdb_update}
%endif
%postun -n libfprint-%{apiver}-%{apiver} -p /sbin/ldconfig
%files -n libfprint-%{apiver}-%{apiver}
%{_libdir}/%{name}-%{apiver}.so.*
#%{_udevrulesdir}/70-%{name}-%{apiver}.rules
%{_udevrulesdir}/60-%{name}-%{apiver}-autosuspend.rules
%if %{install_fp_udev_hwdb}
%{_udevhwdbdir}/60-autosuspend-%{name}-%{apiver}.hwdb
%endif
%files -n typelib-1_0-FPrint-2_0
%{_libdir}/girepository-1.0/*.typelib
%files doc
%{_datadir}/gtk-doc/html/%{name}-%{apiver}
%files devel
%dir %{_includedir}/%{name}-%{apiver}
%{_includedir}/%{name}-%{apiver}/*.h
%{_libdir}/%{name}-%{apiver}.so
%{_libdir}/pkgconfig/%{name}-%{apiver}.pc
%{_datadir}/gir-1.0/*.gir
%changelog