%define major 1 %define libname %mklibname tracefs %{major} %define devname %mklibname tracefs -d Name: libtracefs Version: 1.8.1 Release: %mkrel 1 Summary: Library for access kernel tracefs Group: System/Libraries License: LGPL-2.1-or-later AND GPL-2.0-or-later AND GPL-2.0-only URL: https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/ Source0: https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/snapshot/libtracefs-%{version}.tar.gz BuildRequires: meson BuildRequires: bison BuildRequires: flex BuildRequires: xmlto BuildRequires: asciidoc BuildRequires: pkgconfig(libtraceevent) >= 1.8.1 %description libtracefs is a library for accessing kernel tracefs. %package tools Summary: Tools for libtracefs Group: Development/C++ %description tools This library provides C APIs to access the kernel trace file system. This subpackage contains tools. %package -n %{libname} Summary: Library for access kernel tracefs Group: System/Libraries %description -n %{libname} libtracefs is a library for accessing kernel tracefs. %package -n %{devname} Summary: Development headers of %{name} Group: Development/C++ Requires: %{libname} = %{version}-%{release} Provides: tracefs-devel = %{version}-%{release} %description -n %{devname} Development headers files of %{name}. %prep %autosetup -p1 %build %meson \ --default-library=shared \ -Dhtmldir=%{_docdir}/%{name} %meson_build %meson_build docs %install %meson_install %files tools %{_bindir}/sqlhist %{_mandir}/man1/sqlhist.1.* %files -n %{libname} %license LICENSES/LGPL-2.1 %license LICENSES/GPL-2.0 %{_libdir}/%{name}.so.%{major} %{_libdir}/%{name}.so.%{version} %files -n %{devname} %{_docdir}/%{name}/ %{_includedir}/libtracefs/ %{_libdir}/pkgconfig/%{name}.pc %{_libdir}/%{name}.so %{_mandir}/man3/libtracefs.3.* %{_mandir}/man3/tracefs_*