- force usage of kernel-devel in build environment instead of uname
detected kernel
This commit is contained in:
parent
0d85675fe7
commit
b6002fe4b0
@ -1,4 +1,5 @@
|
||||
%define build_devel 1
|
||||
%define _kernel $(ls -d /usr/src/kernels/*/ | head -1)
|
||||
|
||||
Name: iptables
|
||||
Summary: Tools for managing Linux kernel packet filtering capabilities
|
||||
@ -15,7 +16,7 @@ URL: http://www.netfilter.org/
|
||||
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
|
||||
License: GPLv2
|
||||
BuildRequires: libselinux-devel
|
||||
BuildRequires: kernel, kernel-devel
|
||||
BuildRequires: kernel-devel
|
||||
Conflicts: kernel < 2.4.20
|
||||
Requires(post): chkconfig
|
||||
Requires(preun): chkconfig
|
||||
@ -73,9 +74,8 @@ TOPDIR=`pwd`
|
||||
OPT="$RPM_OPT_FLAGS -I$TOPDIR/include -fPIC"
|
||||
#export KERNEL_DIR=/usr
|
||||
#export KBUILD_OUTPUT=/usr
|
||||
export KERNEL_DIR="/lib/modules/%{uname}/source"
|
||||
export KBUILD_OUTPUT="/lib/modules/%{uname}/build"
|
||||
|
||||
export KERNEL_DIR=%{_kernel}
|
||||
export KBUILD_OUTPUT=%{_kernel}
|
||||
|
||||
export DO_SELINUX=1
|
||||
make COPT_FLAGS="$OPT" LIBDIR=/%{_lib}
|
||||
@ -86,6 +86,8 @@ make COPT_FLAGS="$OPT" LIBDIR=/%{_lib} ip6tables-save ip6tables-restore
|
||||
rm -rf %{buildroot}
|
||||
#export KERNEL_DIR=/usr
|
||||
#export KBUILD_OUTPUT=/usr
|
||||
export KERNEL_DIR=%{_kernel}
|
||||
export KBUILD_OUTPUT=%{_kernel}
|
||||
export DO_SELINUX=1
|
||||
make install DESTDIR=%{buildroot} BINDIR=/sbin LIBDIR=/%{_lib} MANDIR=%{_mandir}
|
||||
%if %{build_devel}
|
||||
|
Loading…
Reference in New Issue
Block a user