diff --git a/kmod.spec b/kmod.spec index ef74ece..5a07229 100644 --- a/kmod.spec +++ b/kmod.spec @@ -1,6 +1,6 @@ Name: kmod Version: 27 -Release: 5 +Release: 6 Summary: Kernel module management # GPLv2+ is used by programs, LGPLv2+ is used for libraries. License: GPLv2+ and LGPLv2+ @@ -42,6 +42,15 @@ Requires: %{name} = %{version}-%{release} 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 @@ -54,11 +63,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 @@ -103,6 +113,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* @@ -110,6 +123,9 @@ install -m 0644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/depmod.d/dist.conf %doc TODO NEWS README %changelog +* Fri Jan 15 2021 shanzhikun - 27-6 +- add package python3-kmod. + * Thu Jan 14 2021 xinghe - 27-5 - fix memory leak in modinfo and build warning