From 4b49bf8edf3fd5ecade21a670058e94634417451e3fa78f7aa301f6534fc4114 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Sat, 10 Mar 2012 18:27:40 +0000 Subject: [PATCH] Accepting request 108736 from home:rjschwei:branches:Base:System usrMerge project - move files from toplevel to /usr OBS-URL: https://build.opensuse.org/request/show/108736 OBS-URL: https://build.opensuse.org/package/show/Base:System/kmod?expand=0&rev=21 --- kmod.changes | 5 +++++ kmod.spec | 41 ++++++++++++++++++++++++++++++++++------- 2 files changed, 39 insertions(+), 7 deletions(-) diff --git a/kmod.changes b/kmod.changes index fab74bf..61d95ac 100644 --- a/kmod.changes +++ b/kmod.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sat Mar 10 17:44:05 UTC 2012 - rschweikert@suse.com + +- place binary in /usr tree (UsrMerge project) + ------------------------------------------------------------------- Sat Mar 3 20:50:43 UTC 2012 - jengelh@medozas.de diff --git a/kmod.spec b/kmod.spec index 7f32a7c..3c898d2 100644 --- a/kmod.spec +++ b/kmod.spec @@ -14,6 +14,8 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # + + Name: kmod %define lname libkmod2 Summary: Utilities to load modules into the kernel @@ -91,20 +93,30 @@ autoreconf -fi; # The extra --includedir gives us the possibility to detect dependent # packages which fail to properly use pkgconfig. %configure --with-xz --with-zlib --includedir=%_includedir/%name-%version \ - --with-rootlibdir=/%_lib --bindir=/bin + --with-rootlibdir=%{_libdir} --bindir=%{_bindir} make %{?_smp_mflags} %install -b="%buildroot"; %make_install -rm -f "$b/bin"/kmod-*; -rm -f "$b/%_libdir"/*.la; +rm -f %buildroot/%_libdir/*.la # kmod-compat -mkdir -p "$b/bin" "$b/sbin"; -ln -s kmod "$b/bin/lsmod"; +#UsrMerge +mkdir -p %buildroot/bin +mkdir -p %buildroot/sbin +mkdir -p %buildroot/%_lib +ln -s %{_bindir}/kmod %buildroot/bin +ln -s %{_bindir}/kmod %buildroot/bin/lsmod for i in depmod insmod lsmod modinfo modprobe rmmod; do - ln -s "/bin/kmod" "$b/sbin/$i"; + ln -s %{_bindir}/kmod %buildroot/sbin/$i +done; +ln -s %_libdir/libkmod.so.2 %buildroot/%_lib +ln -s %_libdir/libkmod.so.2.1.0 %buildroot/%_lib +#EndUsrMerge +mkdir -p %buildroot/%{_sbindir} +ln -s %{_bindir}/kmod %buildroot/%{_bindir}/lsmod +for i in depmod insmod lsmod modinfo modprobe rmmod; do + ln -s %{_bindir}/kmod %buildroot/%{_sbindir}/$i done; %check @@ -116,12 +128,18 @@ make check %files %defattr(-,root,root) +%{_bindir}/kmod +#UsrMerge /bin/kmod +#EndUsrMerge %_mandir/man5/modules.dep.bin.5* %files -n %lname %defattr(-,root,root) +%_libdir/libkmod.so.2* +#UsrMerge /%_lib/libkmod.so.2* +#EndUsrMerge %files -n libkmod-devel %defattr(-,root,root) @@ -131,6 +149,7 @@ make check %files compat %defattr(-,root,root) +#UsrMerge /bin/lsmod /sbin/depmod /sbin/insmod @@ -138,6 +157,14 @@ make check /sbin/modinfo /sbin/modprobe /sbin/rmmod +#EndUsrMerge +%_bindir/lsmod +%_sbindir/depmod +%_sbindir/insmod +%_sbindir/lsmod +%_sbindir/modinfo +%_sbindir/modprobe +%_sbindir/rmmod %_mandir/man5/depmod.d.5* %_mandir/man5/modprobe.d.5* %_mandir/man5/modules.dep.5*