SPEC file cleanup
This commit is contained in:
parent
f64f838413
commit
1881d76730
@ -1,7 +1,5 @@
|
|||||||
%define rcver %{nil}
|
|
||||||
%define snapshot %{nil}
|
|
||||||
|
|
||||||
%global _hardened_build 1
|
%global _hardened_build 1
|
||||||
|
%bcond_without gui
|
||||||
|
|
||||||
Summary: WPA/WPA2/IEEE 802.1X Supplicant
|
Summary: WPA/WPA2/IEEE 802.1X Supplicant
|
||||||
Name: wpa_supplicant
|
Name: wpa_supplicant
|
||||||
@ -9,13 +7,11 @@ Epoch: 1
|
|||||||
Version: 2.9
|
Version: 2.9
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
License: BSD
|
License: BSD
|
||||||
Source0: http://w1.fi/releases/%{name}-%{version}%{rcver}%{snapshot}.tar.gz
|
Source0: http://w1.fi/releases/%{name}-%{version}.tar.gz
|
||||||
Source2: %{name}.conf
|
Source1: wpa_supplicant.conf
|
||||||
Source3: %{name}.service
|
Source2: wpa_supplicant.service
|
||||||
Source4: %{name}.sysconfig
|
Source3: wpa_supplicant.sysconfig
|
||||||
Source6: %{name}.logrotate
|
Source4: wpa_supplicant.logrotate
|
||||||
|
|
||||||
%define build_gui 1
|
|
||||||
|
|
||||||
# distro specific customization and not suitable for upstream,
|
# distro specific customization and not suitable for upstream,
|
||||||
# Fedora-specific updates to defconfig
|
# Fedora-specific updates to defconfig
|
||||||
@ -32,7 +28,7 @@ Patch4: wpa_supplicant-gui-qt4.patch
|
|||||||
|
|
||||||
URL: http://w1.fi/wpa_supplicant/
|
URL: http://w1.fi/wpa_supplicant/
|
||||||
|
|
||||||
%if %{build_gui}
|
%if %with gui
|
||||||
BuildRequires: qt-devel >= 4.0
|
BuildRequires: qt-devel >= 4.0
|
||||||
%endif
|
%endif
|
||||||
BuildRequires: openssl-devel
|
BuildRequires: openssl-devel
|
||||||
@ -60,76 +56,80 @@ component that is used in the client stations. It implements key negotiation
|
|||||||
with a WPA Authenticator and it controls the roaming and IEEE 802.11
|
with a WPA Authenticator and it controls the roaming and IEEE 802.11
|
||||||
authentication/association of the wlan driver.
|
authentication/association of the wlan driver.
|
||||||
|
|
||||||
%if %{build_gui}
|
|
||||||
|
|
||||||
|
%if %with gui
|
||||||
%package gui
|
%package gui
|
||||||
Summary: Graphical User Interface for %{name}
|
Summary: Graphical User Interface for %{name}
|
||||||
|
|
||||||
%description gui
|
%description gui
|
||||||
Graphical User Interface for wpa_supplicant written using QT
|
Graphical User Interface for wpa_supplicant written using QT
|
||||||
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -p1 -n %{name}-%{version}%{rcver}
|
%autosetup -p1
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
pushd wpa_supplicant
|
pushd wpa_supplicant
|
||||||
cp defconfig .config
|
cp defconfig .config
|
||||||
CFLAGS="${CFLAGS:-%optflags} -fPIE -DPIE" ; export CFLAGS ;
|
export CFLAGS="${CFLAGS:-%optflags} -fPIE -DPIE"
|
||||||
CXXFLAGS="${CXXFLAGS:-%optflags} -fPIE -DPIE" ; export CXXFLAGS ;
|
export CXXFLAGS="${CXXFLAGS:-%optflags} -fPIE -DPIE"
|
||||||
LDFLAGS="${LDFLAGS:-%optflags} -pie -Wl,-z,now" ; export LDFLAGS ;
|
export LDFLAGS="${LDFLAGS:-%optflags} -pie -Wl,-z,now"
|
||||||
# yes, BINDIR=_sbindir
|
# yes, BINDIR=_sbindir
|
||||||
BINDIR="%{_sbindir}" ; export BINDIR ;
|
export BINDIR="%{_sbindir}"
|
||||||
LIBDIR="%{_libdir}" ; export LIBDIR ;
|
export LIBDIR="%{_libdir}"
|
||||||
make %{_smp_mflags} V=1
|
make %{_smp_mflags} V=1
|
||||||
%if %{build_gui}
|
%if %with gui
|
||||||
QTDIR=%{_libdir}/qt4 make wpa_gui-qt4 %{_smp_mflags} V=1 QMAKE='%{qmake_qt4}' LRELEASE='%{_qt4_bindir}/lrelease'
|
make wpa_gui-qt4 %{_smp_mflags} V=1 QTDIR=%{_libdir}/qt4 \
|
||||||
|
QMAKE='%{qmake_qt4}' LRELEASE='%{_qt4_bindir}/lrelease'
|
||||||
%endif
|
%endif
|
||||||
make eapol_test V=1
|
make eapol_test V=1
|
||||||
|
make -C doc/docbook man V=1
|
||||||
popd
|
popd
|
||||||
|
|
||||||
pushd wpa_supplicant/doc/docbook
|
|
||||||
make man V=1
|
|
||||||
popd
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
# init scripts
|
|
||||||
install -D -m 0644 %{SOURCE3} %{buildroot}/%{_unitdir}/%{name}.service
|
|
||||||
install -D -m 0644 %{SOURCE4} %{buildroot}/%{_sysconfdir}/sysconfig/%{name}
|
|
||||||
install -D -m 0644 %{SOURCE6} %{buildroot}/%{_sysconfdir}/logrotate.d/%{name}
|
|
||||||
|
|
||||||
# config
|
# config
|
||||||
install -D -m 0600 %{SOURCE2} %{buildroot}/%{_sysconfdir}/%{name}/%{name}.conf
|
install -D -m 0600 %{SOURCE1} %{buildroot}/%{_sysconfdir}/wpa_supplicant/wpa_supplicant.conf
|
||||||
|
|
||||||
|
# init scripts
|
||||||
|
install -D -m 0644 %{SOURCE2} %{buildroot}/%{_unitdir}/wpa_supplicant.service
|
||||||
|
install -D -m 0644 %{SOURCE3} %{buildroot}/%{_sysconfdir}/sysconfig/wpa_supplicant
|
||||||
|
install -D -m 0644 %{SOURCE4} %{buildroot}/%{_sysconfdir}/logrotate.d/wpa_supplicant
|
||||||
|
|
||||||
# binary
|
# binary
|
||||||
install -d %{buildroot}/%{_sbindir}
|
install -d %{buildroot}/%{_sbindir}
|
||||||
install -m 0755 %{name}/wpa_passphrase %{buildroot}/%{_sbindir}
|
install -m 0755 wpa_supplicant/wpa_passphrase %{buildroot}/%{_sbindir}
|
||||||
install -m 0755 %{name}/wpa_cli %{buildroot}/%{_sbindir}
|
install -m 0755 wpa_supplicant/wpa_cli %{buildroot}/%{_sbindir}
|
||||||
install -m 0755 %{name}/wpa_supplicant %{buildroot}/%{_sbindir}
|
install -m 0755 wpa_supplicant/wpa_supplicant %{buildroot}/%{_sbindir}
|
||||||
install -m 0755 %{name}/eapol_test %{buildroot}/%{_sbindir}
|
install -m 0755 wpa_supplicant/eapol_test %{buildroot}/%{_sbindir}
|
||||||
install -D -m 0644 %{name}/dbus/dbus-wpa_supplicant.conf %{buildroot}/%{_sysconfdir}/dbus-1/system.d/wpa_supplicant.conf
|
install -D -m 0644 wpa_supplicant/dbus/dbus-wpa_supplicant.conf \
|
||||||
install -D -m 0644 %{name}/dbus/fi.w1.wpa_supplicant1.service %{buildroot}/%{_datadir}/dbus-1/system-services/fi.w1.wpa_supplicant1.service
|
%{buildroot}/%{_sysconfdir}/dbus-1/system.d/wpa_supplicant.conf
|
||||||
|
install -D -m 0644 wpa_supplicant/dbus/fi.w1.wpa_supplicant1.service \
|
||||||
|
%{buildroot}/%{_datadir}/dbus-1/system-services/fi.w1.wpa_supplicant1.service
|
||||||
|
|
||||||
%if %{build_gui}
|
%if %with gui
|
||||||
# gui
|
# gui
|
||||||
install -d %{buildroot}/%{_bindir}
|
install -d %{buildroot}/%{_bindir}
|
||||||
install -m 0755 %{name}/wpa_gui-qt4/wpa_gui %{buildroot}/%{_bindir}
|
install -m 0755 wpa_supplicant/wpa_gui-qt4/wpa_gui %{buildroot}/%{_bindir}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# man pages
|
# man pages
|
||||||
install -d %{buildroot}%{_mandir}/man{5,8}
|
install -d %{buildroot}%{_mandir}/man{5,8}
|
||||||
install -m 0644 %{name}/doc/docbook/*.8 %{buildroot}%{_mandir}/man8
|
install -m 0644 wpa_supplicant/doc/docbook/*.8 %{buildroot}%{_mandir}/man8
|
||||||
install -m 0644 %{name}/doc/docbook/*.5 %{buildroot}%{_mandir}/man5
|
install -m 0644 wpa_supplicant/doc/docbook/*.5 %{buildroot}%{_mandir}/man5
|
||||||
|
|
||||||
# some cleanup in docs and examples
|
# some cleanup in docs and examples
|
||||||
rm -f %{name}/doc/.cvsignore
|
rm -f wpa_supplicant/doc/.cvsignore
|
||||||
rm -rf %{name}/doc/docbook
|
rm -rf wpa_supplicant/doc/docbook
|
||||||
chmod -R 0644 %{name}/examples/*.py
|
chmod -R 0644 wpa_supplicant/examples/*.py
|
||||||
|
|
||||||
|
|
||||||
%post
|
%post
|
||||||
%systemd_post wpa_supplicant.service
|
%systemd_post wpa_supplicant.service
|
||||||
|
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
%systemd_preun wpa_supplicant.service
|
%systemd_preun wpa_supplicant.service
|
||||||
|
|
||||||
@ -145,27 +145,35 @@ chmod -R 0644 %{name}/examples/*.py
|
|||||||
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%license COPYING
|
%config(noreplace) %{_sysconfdir}/wpa_supplicant/wpa_supplicant.conf
|
||||||
%doc %{name}/ChangeLog README %{name}/eap_testing.txt %{name}/todo.txt %{name}/wpa_supplicant.conf %{name}/examples
|
%config(noreplace) %{_sysconfdir}/sysconfig/wpa_supplicant
|
||||||
%config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf
|
%dir %{_sysconfdir}/logrotate.d
|
||||||
%config(noreplace) %{_sysconfdir}/sysconfig/%{name}
|
%config(noreplace) %{_sysconfdir}/logrotate.d/wpa_supplicant
|
||||||
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
|
%{_unitdir}/wpa_supplicant.service
|
||||||
%{_unitdir}/%{name}.service
|
%{_sysconfdir}/dbus-1/system.d/wpa_supplicant.conf
|
||||||
%{_sysconfdir}/dbus-1/system.d/%{name}.conf
|
|
||||||
%{_datadir}/dbus-1/system-services/fi.w1.wpa_supplicant1.service
|
%{_datadir}/dbus-1/system-services/fi.w1.wpa_supplicant1.service
|
||||||
%{_sbindir}/wpa_passphrase
|
%{_sbindir}/wpa_passphrase
|
||||||
%{_sbindir}/wpa_supplicant
|
%{_sbindir}/wpa_supplicant
|
||||||
%{_sbindir}/wpa_cli
|
%{_sbindir}/wpa_cli
|
||||||
%{_sbindir}/eapol_test
|
%{_sbindir}/eapol_test
|
||||||
%dir %{_sysconfdir}/%{name}
|
%dir %{_sysconfdir}/wpa_supplicant
|
||||||
%{_mandir}/man8/*
|
%{_mandir}/man8/*
|
||||||
%{_mandir}/man5/*
|
%{_mandir}/man5/*
|
||||||
|
%doc README
|
||||||
|
%doc wpa_supplicant/ChangeLog
|
||||||
|
%doc wpa_supplicant/eap_testing.txt
|
||||||
|
%doc wpa_supplicant/todo.txt
|
||||||
|
%doc wpa_supplicant/wpa_supplicant.conf
|
||||||
|
%doc wpa_supplicant/examples
|
||||||
|
%license COPYING
|
||||||
|
|
||||||
%if %{build_gui}
|
|
||||||
|
%if %with gui
|
||||||
%files gui
|
%files gui
|
||||||
%{_bindir}/wpa_gui
|
%{_bindir}/wpa_gui
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Fri Aug 16 2019 Lubomir Rintel <lkundrak@v3.sk> - 1:2.9-1
|
* Fri Aug 16 2019 Lubomir Rintel <lkundrak@v3.sk> - 1:2.9-1
|
||||||
- Update to version 2.9
|
- Update to version 2.9
|
||||||
|
Loading…
Reference in New Issue
Block a user