File libfprint-tod.spec of Package libfprint-tod
#
# spec file for package libfprint
#
# Copyright (c) 2021 Florian "sp1rit" <packaging@sp1rit.anonaddy.me>
# 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
%define libname libfprint
Name: %{libname}-tod
Version: 0
Release: 0
Summary: Library for fingerprint reader support
License: LGPL-2.1-or-later
Group: Development/Libraries/C and C++
URL: https://www.freedesktop.org/wiki/Software/fprint
Source0: %{name}-%{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(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)
%define libver %{version+tod1}
%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.
%package -n %{name}-%{apiver}-%{apiver}
Summary: Library for fingerprint reader support
Group: System/Libraries
Provides: %{name} = %{version}
Conflicts: libfprint-2-2
#Obsoletes: libfprint-examples
%description -n %{name}-%{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: %{name}-%{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
%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 %{name}-%{apiver}-%{apiver}
/sbin/ldconfig
%{?udev_rules_update:%udev_rules_update}
%if %{install_fp_udev_hwdb}
%{?udev_hwdb_update:%udev_hwdb_update}
%endif
%postun -n %{name}-%{apiver}-%{apiver} -p /sbin/ldconfig
%files -n %{name}-%{apiver}-%{apiver}
%{_libdir}/%{libname}-%{apiver}.so.*
%{_libdir}/%{libname}-%{apiver}-tod.so.*
%{_udevrulesdir}/70-%{libname}-%{apiver}.rules
%if %{install_fp_udev_hwdb}
%{_udevhwdbdir}/60-autosuspend-%{libname}-%{apiver}.hwdb
%endif
%files -n typelib-1_0-FPrint-2_0
%{_libdir}/girepository-1.0/*.typelib
%files doc
%{_datadir}/gtk-doc/html/%{libname}-%{apiver}
%files devel
%dir %{_includedir}/%{libname}-%{apiver}
%{_includedir}/%{libname}-%{apiver}/
%{_libdir}/%{libname}-%{apiver}.so
%{_libdir}/%{libname}-%{apiver}-tod.so
%{_libdir}/pkgconfig/%{libname}-%{apiver}.pc
%{_libdir}/pkgconfig/%{libname}-%{apiver}-tod-1.pc
%{_datadir}/gir-1.0/*.gir
%changelog