From ac6dee305bec65aa533955ca8b48f6cb14e46f9c Mon Sep 17 00:00:00 2001 From: Yang Yanchao Date: Thu, 24 Feb 2022 15:53:12 +0800 Subject: [PATCH] add package python3-kmod. sync the PR:https://gitee.com/src-openeuler/kmod/pulls/22/files Signed-off-by: Yang Yanchao (cherry picked from commit bcb7b0817275f09b1dd7c509e4fdd74fe8214558) --- kmod.spec | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/kmod.spec b/kmod.spec index 1dc3f80..a9a545c 100644 --- a/kmod.spec +++ b/kmod.spec @@ -1,6 +1,6 @@ Name: kmod Version: 29 -Release: 3 +Release: 4 Summary: Kernel module management # GPLv2+ is used by programs, LGPLv2+ is used for libraries. License: GPLv2+ and LGPLv2+ @@ -39,6 +39,15 @@ Requires: %{name} = %{version}-%{release} %{name}-libs The kmod-devel package provides header files used for loading or unloading kernel modules. +%package -n python3-kmod +Summary: Python3 bindings for kmod/libkmod. +BuildRequires: python3 python3-devel python3-Cython kmod-devel kmod-libs +Requires: python3 + +%description -n python3-kmod +python3-kmod is a Python3 wrapper module for libkmod, exposing common +module operations: listing installed modules, modprobe, and rmmod. + %package help Summary: Documents and man pages for the kmod Requires: man info @@ -51,11 +60,12 @@ developers to understand the kmod. %autosetup -n %{name}-%{version} -p1 %build -%configure --with-openssl --with-zlib --with-xz +%configure --with-openssl --with-zlib --with-xz --enable-python %make_build %install %make_install +rm -f %{buildroot}%{python3_sitearch}/kmod/*.la pushd $RPM_BUILD_ROOT/%{_mandir}/man5 ln -s modprobe.d.5.gz modprobe.conf.5.gz popd @@ -100,6 +110,9 @@ install -m 0644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/depmod.d/dist.conf %{_libdir}/pkgconfig/libkmod.pc %{_libdir}/libkmod.so +%files -n python3-kmod +%{python3_sitearch}/kmod/ + %files help %attr(0644,root,root) %{_mandir}/man5/*.5* %attr(0644,root,root) %{_mandir}/man8/*.8* @@ -107,6 +120,9 @@ install -m 0644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/depmod.d/dist.conf %doc TODO NEWS README %changelog +* Thu Feb 24 2022 Yang Yanchao - 29-4 +- add package python3-kmod. + * Fri Jan 7 2022 zhouwenpei - 29-3 - kmod-devel: add requires on kmod-libs -- Gitee