!59 [sync] PR-58: fix build error for loongarch64

From: @openeuler-sync-bot 
Reviewed-by: @dillon_chen 
Signed-off-by: @dillon_chen
This commit is contained in:
openeuler-ci-bot 2024-06-07 02:28:49 +00:00 committed by Gitee
commit d627b7181f
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -1,7 +1,7 @@
Name: wpa_supplicant
Epoch: 1
Version: 2.10
Release: 5
Release: 6
Summary: A WPA Supplicant with support for WPA and WPA2 (IEEE 802.11i / RSN)
License: BSD or GPLv2
Url: https://w1.fi/wpa_supplicant/
@ -13,12 +13,20 @@ Source5: %{name}.logrotate
#fix PEAP client to require successful Phase2 authentication when needed (CVE-2023-52160)
Patch0: backport-wpa_supplicant-PEAP-client-Update-Phase-2-authentication-requiremen.patch
%ifnarch loongarch64
Patch6000: wpa_supplicant-gui-qt4.patch
%endif
%if "%{?toolchain}" == "clang"
Patch6001: Add-clang-support-for-qmake.patch
%endif
BuildRequires: qt-devel >= 4.0 openssl-devel readline-devel dbus-devel libnl3-devel systemd-units docbook-utils
%ifarch loongarch64
BuildRequires: /usr/bin/qmake
%else
BuildRequires: qt-devel >= 4.0
%endif
BuildRequires: openssl-devel readline-devel dbus-devel libnl3-devel systemd-units docbook-utils
Requires(post): systemd-sysv
Requires(post): systemd
Requires(preun): systemd
@ -31,11 +39,13 @@ It is suitable for both desktop/laptop computers and embedded systems. Supplican
used in the client stations. It implements key negotiation with a WPA Authenticator and it controls the roaming
and IEEE 802.11 authentication/association of the wlan driver.
%ifnarch loongarch64
%package gui
Summary: Graphical User Interface for %{name}
%description gui
Graphical User Interface for wpa_supplicant written using QT
%endif
%package help
Summary: Help package for %{name}
@ -59,7 +69,9 @@ export CFLAGS="${CFLAGS:-%optflags} -fPIE -DPIE"\
cp -f %{SOURCE1} %{name}/.config
%{_build_cmd__ %{name}}
%ifnarch loongarch64
%{_build_cmd__ %{name} wpa_gui-qt4} %{_build_setups_qt__}
%endif
%{_build_cmd__ %{name} eapol_test}
%{_build_cmd__ %{name}/doc/docbook man}
@ -73,7 +85,9 @@ install -m755 %{name}/{wpa_passphrase,wpa_cli,wpa_supplicant,eapol_test} %{build
install -Dm644 %{name}/dbus/dbus-wpa_supplicant.conf %{buildroot}%{_sysconfdir}/dbus-1/system.d/wpa_supplicant.conf
install -Dm644 %{name}/dbus/fi.w1.wpa_supplicant1.service %{buildroot}%{_datadir}/dbus-1/system-services/fi.w1.wpa_supplicant1.service
%ifnarch loongarch64
install -Dm755 %{name}/wpa_gui-qt4/wpa_gui %{buildroot}/%{_bindir}/wpa_gui
%endif
install -d %{buildroot}%{_mandir}/man{5,8}
install -m644 %{name}/doc/docbook/*.8 %{buildroot}%{_mandir}/man8
@ -96,8 +110,10 @@ install -m644 %{name}/doc/docbook/*.5 %{buildroot}%{_mandir}/man5
%{_sbindir}/wpa_cli
%{_sbindir}/eapol_test
%ifnarch loongarch64
%files gui
%{_bindir}/wpa_gui
%endif
%files help
%doc %{name}/ChangeLog README %{name}/eap_testing.txt %{name}/todo.txt %{name}/wpa_supplicant.conf %{name}/examples
@ -105,6 +121,9 @@ install -m644 %{name}/doc/docbook/*.5 %{buildroot}%{_mandir}/man5
%{_mandir}/man5/*
%changelog
* Wed May 29 2024 Wenlong Zhang <zhangwenlong@loongson.cn> - 1:2.10-6
- fix build error for loongarch64
* Mon Apr 15 2024 Han Jinpeng <hanjinpeng@kylinos.cn> - 1:2.10-5
- Backport patch fix CVE-2023-52160