SHA256
1
0
forked from pool/kmod

Accepting request 108783 from Base:System

- place binary in /usr tree (UsrMerge project)

OBS-URL: https://build.opensuse.org/request/show/108783
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/kmod?expand=0&rev=5
This commit is contained in:
Stephan Kulow 2012-03-13 08:34:13 +00:00 committed by Git OBS Bridge
commit 77413a688b
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 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/ # Please submit bugfixes or comments via http://bugs.opensuse.org/
# #
Name: kmod Name: kmod
%define lname libkmod2 %define lname libkmod2
Summary: Utilities to load modules into the kernel Summary: Utilities to load modules into the kernel
@ -91,20 +93,30 @@ autoreconf -fi;
# The extra --includedir gives us the possibility to detect dependent # The extra --includedir gives us the possibility to detect dependent
# packages which fail to properly use pkgconfig. # packages which fail to properly use pkgconfig.
%configure --with-xz --with-zlib --includedir=%_includedir/%name-%version \ %configure --with-xz --with-zlib --includedir=%_includedir/%name-%version \
--with-rootlibdir=/%_lib --bindir=/bin --with-rootlibdir=%{_libdir} --bindir=%{_bindir}
make %{?_smp_mflags} make %{?_smp_mflags}
%install %install
b="%buildroot";
%make_install %make_install
rm -f "$b/bin"/kmod-*; rm -f %buildroot/%_libdir/*.la
rm -f "$b/%_libdir"/*.la;
# kmod-compat # kmod-compat
mkdir -p "$b/bin" "$b/sbin"; #UsrMerge
ln -s kmod "$b/bin/lsmod"; 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 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; done;
%check %check
@ -116,12 +128,18 @@ make check
%files %files
%defattr(-,root,root) %defattr(-,root,root)
%{_bindir}/kmod
#UsrMerge
/bin/kmod /bin/kmod
#EndUsrMerge
%_mandir/man5/modules.dep.bin.5* %_mandir/man5/modules.dep.bin.5*
%files -n %lname %files -n %lname
%defattr(-,root,root) %defattr(-,root,root)
%_libdir/libkmod.so.2*
#UsrMerge
/%_lib/libkmod.so.2* /%_lib/libkmod.so.2*
#EndUsrMerge
%files -n libkmod-devel %files -n libkmod-devel
%defattr(-,root,root) %defattr(-,root,root)
@ -131,6 +149,7 @@ make check
%files compat %files compat
%defattr(-,root,root) %defattr(-,root,root)
#UsrMerge
/bin/lsmod /bin/lsmod
/sbin/depmod /sbin/depmod
/sbin/insmod /sbin/insmod
@ -138,6 +157,14 @@ make check
/sbin/modinfo /sbin/modinfo
/sbin/modprobe /sbin/modprobe
/sbin/rmmod /sbin/rmmod
#EndUsrMerge
%_bindir/lsmod
%_sbindir/depmod
%_sbindir/insmod
%_sbindir/lsmod
%_sbindir/modinfo
%_sbindir/modprobe
%_sbindir/rmmod
%_mandir/man5/depmod.d.5* %_mandir/man5/depmod.d.5*
%_mandir/man5/modprobe.d.5* %_mandir/man5/modprobe.d.5*
%_mandir/man5/modules.dep.5* %_mandir/man5/modules.dep.5*