SHA256
1
0
forked from pool/hostapd

Accepting request 140345 from Base:System

- Add Native systemd units (forwarded request 140288 from elvigia)

OBS-URL: https://build.opensuse.org/request/show/140345
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/hostapd?expand=0&rev=20
This commit is contained in:
Stephan Kulow 2012-11-08 07:04:50 +00:00 committed by Git OBS Bridge
commit 74b7ac5cc1
3 changed files with 27 additions and 2 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Nov 6 04:41:17 UTC 2012 - crrodriguez@opensuse.org
- Add Native systemd units
-------------------------------------------------------------------
Tue May 15 04:55:22 UTC 2012 - glin@suse.com

10
hostapd.service Normal file
View File

@ -0,0 +1,10 @@
[Unit]
Description=Hostapd IEEE 802.11 AP, IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator
After=network.target
[Service]
ExecStart=/usr/sbin/hostapd /etc/hostapd.conf
ExecReload=/bin/kill -HUP $MAINPID
[Install]
WantedBy=multi-user.target

View File

@ -23,8 +23,9 @@ BuildRequires: libnl-1_1-devel
BuildRequires: libnl-devel
%endif
BuildRequires: openssl-devel
BuildRequires: pkgconfig(systemd)
Summary: Turns Your WLAN Card into a WPA capable Access Point
License: BSD-3-Clause ; GPL-2.0+
License: BSD-3-Clause and GPL-2.0+
Group: Hardware/Wifi
Version: 1.0
Release: 0
@ -33,8 +34,10 @@ Url: http://hostap.epitest.fi/
PreReq: %insserv_prereq
Source: http://hostap.epitest.fi/releases/hostapd-%{version}.tar.gz
Source1: hostapd.init
Source2: hostapd.service
Patch: hostapd.dif
Patch1: hostapd-tmp.diff
%{?systemd_requires}
%description
hostapd is a user space daemon for access point and authentication
@ -60,7 +63,7 @@ cp defconfig .config
%build
cd hostapd
CFLAGS="$RPM_OPT_FLAGS" CC="%{__cc}" make %{?_smp_mflags} V=1
CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE $(getconf LFS_CFLAGS)" CC="%{__cc}" make %{?_smp_mflags} V=1
%install
cd hostapd
@ -80,14 +83,20 @@ install -m 644 hostapd.sim_db %{buildroot}/etc
install -m 644 hostapd.vlan %{buildroot}/etc
install -m 600 hostapd.wpa_psk %{buildroot}/etc
install -m 644 hostapd.8 %{buildroot}/%{_mandir}/man8
install -D -m 0644 %{SOURCE2} %{buildroot}%{_unitdir}/hostapd.service
%pre
%service_add_pre hostapd.service
%post
%service_add_post hostapd.service
%insserv_cleanup
%preun
%service_del_preun hostapd.service
%{stop_on_removal hostapd}
%postun
%service_del_postun hostapd.service
%{restart_on_update hostapd}
%insserv_cleanup
@ -101,5 +110,6 @@ rm -rf $RPM_BUILD_ROOT
%{_sbindir}/*
%doc hostapd/ChangeLog COPYING hostapd/README hostapd/wired.conf hostapd/hostapd.conf
%doc %{_mandir}/man8/*
%{_unitdir}/hostapd.service
%changelog