Explicit check for requires_* rpm defines

Due to different distros and/or versions of rpm mishandling the shorthand
syntax simply use the longer version which get interpreted correctly.
This commit is contained in:
Brian Behlendorf 2009-08-13 15:02:34 -07:00
parent 68ada11e5c
commit 26d77c4493
1 changed files with 11 additions and 3 deletions

View File

@ -3,9 +3,17 @@
# require_kver, require_kdir, require_obj constants for us, but if it does not
# not we attempt to determine the correct values based on your distro.
%{?require_kver: %define kver %{require_kver}}
%{?require_kdir: %define kdir %{require_kdir}}
%{?require_kobj: %define kobj %{require_kobj}}
%if %{defined require_kver}
%define kver %{require_kver}
%endif
%if %{defined require_kdir}
%define kdir %{require_kdir}
%endif
%if %{defined require_kobj}
%define kobj %{require_kobj}
%endif
# kdir: Full path to the kernel source headers
# kobj: Full path to the kernel build objects