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
This commit is contained in:
Jan Engelhardt 2012-03-10 18:27:40 +00:00 committed by Git OBS Bridge
parent de08b15014
commit 4b49bf8edf
2 changed files with 39 additions and 7 deletions

View File

@ -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

View File

@ -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*