556 |
If you only want the files needed to build 3rdparty (nVidia, Ati, dkms-*,...) |
If you only want the files needed to build 3rdparty (nVidia, Ati, dkms-*,...) |
557 |
drivers against, install the *-devel-* rpm that is matching your kernel. |
drivers against, install the *-devel-* rpm that is matching your kernel. |
558 |
|
|
|
%post -n %{kname}-source-%{buildrel} |
|
|
for i in /lib/modules/%{kversion}-{desktop586,desktop,server}-%{buildrpmrel}; do |
|
|
if [ -d $i ]; then |
|
|
if [ ! -L $i/build -a ! -L $i/source ]; then |
|
|
ln -sf /usr/src/linux-%{kversion}-%{buildrpmrel} $i/build |
|
|
ln -sf /usr/src/linux-%{kversion}-%{buildrpmrel} $i/source |
|
|
fi |
|
|
fi |
|
|
done |
|
|
cd /usr/src |
|
|
rm -f linux |
|
|
ln -snf linux-%{kversion}-%{buildrpmrel} linux |
|
|
|
|
|
%preun -n %{kname}-source-%{buildrel} |
|
|
for i in /lib/modules/%{kversion}-{desktop586,desktop,server}-%{buildrpmrel}/{build,source}; do |
|
|
if [ -L $i ]; then |
|
|
if [ "$(readlink $i)" = "/usr/src/linux-%{kversion}-%{buildrpmrel}" ]; then |
|
|
rm -f $i |
|
|
fi |
|
|
fi |
|
|
done |
|
|
if [ -L /usr/src/linux ]; then |
|
|
if [ "$(readlink /usr/src/linux)" = "linux-%{kversion}-%{buildrpmrel}" ]; then |
|
|
rm -f /usr/src/linux |
|
|
fi |
|
|
fi |
|
|
exit 0 |
|
|
|
|
559 |
# |
# |
560 |
# kernel-source-latest: virtual rpm |
# kernel-source-latest: virtual rpm |
561 |
# |
# |