strip unnecessary trailing semicolons; rework softlink creation

OBS-URL: https://build.opensuse.org/package/show/Base:System/kmod?expand=0&rev=112
This commit is contained in:
Jan Engelhardt 2016-07-21 11:27:03 +00:00 committed by Git OBS Bridge
parent 0fde1c43f8
commit 3d3755762d

View File

@ -119,40 +119,39 @@ export LDFLAGS="-Wl,-z,relro,-z,now"
make %{?_smp_mflags} V=1
%install
b="%buildroot";
make install DESTDIR="$b";
b="%buildroot"
%make_install
rm -f "$b/%_libdir"/*.la
mkdir -p "$b/%_libexecdir/kmod" "$b/%_sbindir" "$b/sbin";
mkdir -p "$b/%_libexecdir/kmod" "$b/%_sbindir" "$b/sbin"
for i in depmod insmod lsmod modinfo modprobe rmmod; do
#
# kmod-compat and kmod-compat(usrmerge)
#
ln -s "%_bindir/kmod" "$b/%_sbindir/$i";
ln -s "%_bindir/kmod" "$b/sbin/$i";
ln -s "%_bindir/kmod" "$b/%_sbindir/$i"
ln -s "%_bindir/kmod" "$b/sbin/$i"
#
# Make symlinks also available in normal fashion,
# so one can actually run it.
#
ln -s "%_bindir/kmod" "$b/%_libexecdir/kmod/$i";
done;
mkdir -p "$b/%_bindir" "$b/bin";
ln -s "%_bindir/kmod" "$b/%_libexecdir/kmod/$i"
done
mkdir -p "$b/%_bindir" "$b/bin"
for i in lsmod; do
ln -s "%_bindir/kmod" "$b/%_bindir/$i";
ln -s "%_bindir/kmod" "$b/bin/$i";
done;
ln -s "%_bindir/kmod" "$b/%_bindir/$i"
ln -s "%_bindir/kmod" "$b/bin/$i"
done
#
# make mkinitrd happy
# (last time checked it does not look into /usr)
# make (all ancient versions of) mkinitrd happy which did not look in /usr
#
mkdir -p "$b"/{bin,sbin,%_lib};
ln -s "%_bindir/kmod" "$b/bin/";
mkdir -p "$b"/{bin,sbin,%_lib}
ln -s "%_bindir/kmod" "$b/bin/"
ls -l "$b/%_libdir/"
%if "%_libdir" != "/%_lib"
ln -s "%_libdir/libkmod.so.2" "$b/%_lib/";
ln -s "%_libdir/libkmod.so.2.2.7" "$b/%_lib/";
ln -s "%_libdir/libkmod.so.2.3.1" "$b/%_lib/"
cp -a "%_libdir/libkmod.so.2" "$b/%_lib/"
%endif
%post
@ -162,7 +161,6 @@ ln -s "%_libdir/libkmod.so.2.2.7" "$b/%_lib/";
%{?regenerate_initrd_posttrans}
%post -n %lname -p /sbin/ldconfig
%postun -n %lname -p /sbin/ldconfig
%files