711 |
%endif #build_devel |
%endif #build_devel |
712 |
|
|
713 |
|
|
|
### kernel-source |
|
|
%if %build_source |
|
|
%post -n %{kname}-source-%{buildrel} |
|
|
for i in /lib/modules/%{buildrel}*; do |
|
|
if [ -d $i ]; then |
|
|
if [ ! -L $i/build -a ! -L $i/source ]; then |
|
|
rm -f $i/{build,source} |
|
|
ln -sf /usr/src/%{kname}-%{buildrel} $i/build |
|
|
ln -sf /usr/src/%{kname}-%{buildrel} $i/source |
|
|
fi |
|
|
fi |
|
|
done |
|
|
|
|
|
%preun -n %{kname}-source-%{buildrel} |
|
|
for i in /lib/modules/%{buildrel}/{build,source}; do |
|
|
if [ -L $i ]; then |
|
|
if [ "$(readlink $i)" = "/usr/src/%{kname}-%{buildrel}" ]; then |
|
|
rm -f $i |
|
|
fi |
|
|
fi |
|
|
done |
|
|
exit 0 |
|
|
%endif # build_source |
|
|
|
|
|
|
|
714 |
### |
### |
715 |
### file lists |
### file lists |
716 |
### |
### |