diff --git a/kmod-2.21.tar.xz b/kmod-2.21.tar.xz new file mode 100644 index 0000000..81f83d5 --- /dev/null +++ b/kmod-2.21.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:29334584a6569860c2a2b7f86e5ab87ff62d9d9cfc9431eea2246ca2b967a2ad +size 58220 diff --git a/kmod-2.tar.xz b/kmod-2.tar.xz deleted file mode 100644 index 3eb77fd..0000000 --- a/kmod-2.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:33edf14f28ef9b51d893e6167d846d23fc572f6ba634acf0ad9a6e3925ff55c0 -size 262484 diff --git a/kmod.spec b/kmod.spec index 285cb50..76fe17a 100644 --- a/kmod.spec +++ b/kmod.spec @@ -18,7 +18,8 @@ Name: kmod %define lname libkmod1 Summary: Utilities to load modules into the kernel -Version: 2 +Version: 2.21 +%define git_snapshot 1 Release: 0 License: LGPL-2.1+ and GPL-2.0+ Group: System/Kernel @@ -28,6 +29,9 @@ URL: http://www.politreco.com/2011/12/announce-kmod-2/ Source: %name-%version.tar.xz BuildRoot: %{_tmppath}/%{name}-%{version}-build +%if 0%{?git_snapshot} +BuildRequires: automake, libtool +%endif BuildRequires: pkgconfig, xz %description @@ -39,6 +43,19 @@ These tools are designed on top of libkmod, a library that is shipped with kmod. The aim is to be compatible with tools, configurations and indexes from module-init-tools project. +%package compat +Summary: Compat symlinks for kernel module utilities +License: GPL-2.0+ +Group: System/Kernel +Conflicts: module-init-tools + +%description compat +kmod is a set of tools to handle common tasks with Linux kernel +modules like insert, remove, list, check properties, resolve +dependencies and aliases. + +This package contains traditional name symlinks (lsmod, etc.) + %package -n %lname Summary: Library to interact with Linux kernel modules License: LGPL-2.1+ @@ -62,14 +79,30 @@ list modules, also checking its properties, dependencies and aliases. %setup -q %build +%if 0%{?git_snapshot} +if [ ! -e configure ]; then + autoreconf -fi; +fi; +%endif # The extra --includedir gives us the possibility to detect dependent # packages which fail to properly use pkgconfig. -%configure --includedir=%_includedir/%name-%version +%configure --includedir=%_includedir/%name-%version \ + --with-rootlibdir=/%_lib --bindir=/bin make %{?_smp_mflags} %install +b="%buildroot"; %make_install -rm -f "%buildroot/%_libdir"/*.la +# Remove standalone tools +rm -f "$b/bin"/kmod-*; +rm -f "$b/%_libdir"/*.la; + +# kmod-compat +mkdir -p "$b/bin" "$b/sbin"; +ln -s kmod "$b/bin/lsmod"; +for i in depmod insmod lsmod modinfo modprobe rmmod; do + ln -s "/bin/kmod" "$b/sbin/$i"; +done; %post -n %lname -p /sbin/ldconfig @@ -77,11 +110,11 @@ rm -f "%buildroot/%_libdir"/*.la %files %defattr(-,root,root) -%_bindir/kmod-* +/bin/kmod %files -n %lname %defattr(-,root,root) -%_libdir/libkmod.so.1* +/%_lib/libkmod.so.1* %files -n libkmod-devel %defattr(-,root,root) @@ -89,4 +122,9 @@ rm -f "%buildroot/%_libdir"/*.la %_libdir/pkgconfig/*.pc %_libdir/libkmod.so +%files compat +%defattr(-,root,root) +/bin/lsmod +/sbin/* + %changelog