Switch libnl to libnl3 build dependency

This commit is contained in:
Simone Caronni 2014-02-03 09:47:52 +01:00
parent 4765dadca8
commit b7025e7475
2 changed files with 43 additions and 8 deletions

View File

@ -0,0 +1,22 @@
--- a/hostapd/defconfig
+++ b/hostapd/defconfig
@@ -22,6 +22,19 @@ CONFIG_DRIVER_HOSTAP=y
# Driver interface for drivers using the nl80211 kernel interface
CONFIG_DRIVER_NL80211=y
+# driver_nl80211.c requires libnl. If you are compiling it yourself
+# you may need to point hostapd to your version of libnl.
+#
+#CFLAGS += -I$<path to libnl include files>
+#LIBS += -L$<path to libnl library files>
+
+# Use libnl v2.0 (or 3.0) libraries.
+#CONFIG_LIBNL20=y
+
+# Use libnl 3.2 libraries (if this is selected, CONFIG_LIBNL20 is ignored)
+#CONFIG_LIBNL32=y
+
+
# Driver interface for FreeBSD net80211 layer (e.g., Atheros driver)
#CONFIG_DRIVER_BSD=y
#CFLAGS += -I/usr/local/include

View File

@ -2,7 +2,7 @@
Name: hostapd
Version: 2.0
Release: 5%{?dist}
Release: 6%{?dist}
Summary: IEEE 802.11 AP, IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator
License: BSD
URL: http://w1.fi/hostapd
@ -14,8 +14,9 @@ Source3: %{name}.sysconfig
Source4: %{name}.init
Patch0: %{name}-RPM_OPT_FLAGS.patch
Patch1: %{name}-EAP-TLS-server-Fix-TLS-Message-Length-validation.patch
Patch2: %{name}-document-libnl-configuration.patch
BuildRequires: libnl-devel >= 1.1
BuildRequires: libnl3-devel
BuildRequires: openssl-devel
%if 0%{?fedora} || 0%{?rhel} >= 7
@ -59,17 +60,25 @@ Logwatch scripts for hostapd.
# commit 586c446e0ff42ae00315b014924ec669023bd8de
%patch1 -p1
# http://hostap.epitest.fi/gitweb/gitweb.cgi?p=hostap.git;a=commitdiff;h=3043b4f4550a71487bd9f0cc876d1baddbb7bb5d
%patch2 -p1
# Prepare default config file
cat %{SOURCE2} | sed -e 's/HOSTAPD_VERSION/'%{version}'/' > %{name}.conf
%build
cd hostapd
cat defconfig | sed -e '/^#CONFIG_DRIVER_NL80211=y/s/^#//' \
cat defconfig | sed \
-e '/^#CONFIG_DRIVER_NL80211=y/s/^#//' \
-e '/^#CONFIG_RADIUS_SERVER=y/s/^#//' \
-e '/^#CONFIG_DRIVER_WIRED=y/s/^#//' \
-e '/^#CONFIG_DRIVER_NONE=y/s/^#//' \
-e '/^#CONFIG_IEEE80211N=y/s/^#//' \
-e '/^#CONFIG_FULL_DYNAMIC_VLAN=y/s/^#//' > .config
-e '/^#CONFIG_FULL_DYNAMIC_VLAN=y/s/^#//' \
-e '/^#CONFIG_LIBNL32=y/s/^#//' \
> .config
echo "CFLAGS += -I%{_includedir}/libnl3" > .config
echo "LIBS += -L%{_libdir}" > .config
make %{?_smp_mflags} EXTRA_CFLAGS="$RPM_OPT_FLAGS"
%install
@ -171,6 +180,10 @@ fi
%{_sysconfdir}/logwatch/scripts/services/%{name}
%changelog
* Mon Feb 03 2014 Simone Caronni <negativo17@gmail.com> - 2.0-6
- Add libnl build documentation and switch libnl-devel to libnl3-devel build
dependency (#1041471).
* Fri Nov 22 2013 John W. Linville <linville@redhat.com> - 2.0-5
- Enable CONFIG_FULL_DYNAMIC_VLAN build option