]>
Commit | Line | Data |
---|---|---|
5588f8df JP |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without systemd # don't package systemd units | |
4 | ||
c83bc4f5 | 5 | Summary: HostAP - acts as an access point |
64ea1939 ER |
6 | Summary(es.UTF-8): HostAP - actúa como un punto de acceso |
7 | Summary(pl.UTF-8): HostAP - praca jako access point | |
c83bc4f5 | 8 | Name: hostapd |
94173213 | 9 | Version: 2.10 |
389389e6 | 10 | Release: 2 |
0760ac2d | 11 | License: BSD |
c83bc4f5 | 12 | Group: Daemons |
c29d4493 | 13 | Source0: https://w1.fi/releases/%{name}-%{version}.tar.gz |
94173213 | 14 | # Source0-md5: 0be43e9e09ab94a7ebf82de0d1c57761 |
c83bc4f5 | 15 | Source1: %{name}.init |
5588f8df JP |
16 | Source2: %{name}.service |
17 | Source3: %{name}@.service | |
d8e88466 | 18 | Patch0: %{name}-config.patch |
f36f7094 | 19 | Patch1: %{name}-build-time-config.patch |
2b2ffb9f | 20 | URL: http://w1.fi/hostapd/ |
7f5cb6c4 | 21 | BuildRequires: libnl-devel >= 1:3.2 |
0760ac2d | 22 | BuildRequires: openssl-devel >= 1.0.2 |
26c6c5bc | 23 | BuildRequires: pkgconfig |
a2a0fac5 | 24 | BuildRequires: rpmbuild(macros) >= 1.268 |
58fa11a2 | 25 | BuildRequires: sed >= 4.0 |
0760ac2d | 26 | BuildRequires: sqlite3-devel >= 3 |
faf313f4 | 27 | Requires(post,preun): /sbin/chkconfig |
0760ac2d | 28 | Requires: openssl >= 1.0.2 |
86311832 | 29 | Requires: rc-scripts |
5588f8df | 30 | %{?with_systemd:Requires: systemd-units >= 38} |
2a75f8bb | 31 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
c83bc4f5 | 32 | |
33 | %description | |
34 | This package contains utilities and userspace daemon for the Linux | |
a2a0fac5 | 35 | driver for wireless LAN cards based on Intersil's Prism2/2.5/3, |
36 | Intersil/Conexant Prism GT/Duette/Indigo (Prism54), Atheros ar521x | |
37 | (madwifi) chipsets. The driver supports a so called Host AP mode, | |
38 | i.e., it takes care of IEEE 802.11 management functions in the host | |
39 | computer and acts as an access point. This does not require any | |
40 | special firmware for the wireless LAN card. In addition to this, it | |
41 | has support for normal station operations in BSS and possible also in | |
42 | IBSS. | |
c83bc4f5 | 43 | |
3a1ff280 | 44 | %description -l es.UTF-8 |
c83bc4f5 | 45 | Este paquete contiene unas herramientas y un servidor del espacio de |
3a1ff280 | 46 | usuario para tarjetas LAN inalámbricas basadas en el chipset Intersil |
a2a0fac5 | 47 | Prism2/2.5/3, Intersil/Conexant Prism GT/Duette/Indigo (Prism54), |
48 | Atheros ar521x (madwifi). El driver soporta el llamado modo Host AP, | |
49 | es decir, se encarga de las funciones administrativas el el host, | |
3a1ff280 JR |
50 | actuando como "access point". Ello no requiere ningún firmware |
51 | especial para la tarjeta LAN inalámbrica. Además, también hay soporte | |
52 | para operaciones normales de estación en BSS y posiblemente también en | |
a2a0fac5 | 53 | IBSS. |
c83bc4f5 | 54 | |
3a1ff280 JR |
55 | %description -l pl.UTF-8 |
56 | Ten pakiet zawiera narzędzia oraz demona działającego w przestrzeni | |
57 | użytkownika dla linuksowego sterownika kart sieci bezprzewodowych | |
58 | opartych na układach Intersil Prism2/2.5/3, Intersil/Conexant Prism | |
a2a0fac5 | 59 | GT/Duette/Indigo (Prism54), Atheros ar521x (madwifi). Sterownik |
3a1ff280 JR |
60 | obsługuje tak zwany tryb Host AP, czyli dba o funkcje zarządzające |
61 | IEEE 802.11 na komputerze i działa jako access point. Nie wymaga to | |
62 | żadnego specjalnego firmware dla karty sieci bezprzewodowej. Ponadto | |
63 | ma obsługę normalnych operacji stacyjnych w BSS, a być może także | |
a2a0fac5 | 64 | IBSS. |
c83bc4f5 | 65 | |
66 | %prep | |
67 | %setup -q | |
04bc77b5 | 68 | %patch0 -p1 |
f36f7094 | 69 | %patch1 -p1 |
878752c8 | 70 | |
c83bc4f5 | 71 | %build |
389389e6 JP |
72 | CFLAGS="%{rpmcflags} %{rpmcppflags}" \ |
73 | LDFLAGS="%{rpmldflags}" \ | |
b1b08872 | 74 | %{__make} -C hostapd all nt_password_hash hlr_auc_gw \ |
58fa11a2 | 75 | V=1 \ |
2fcbed0b | 76 | CC="%{__cc}" \ |
c9b6aa9a | 77 | |
c83bc4f5 | 78 | %install |
79 | rm -rf $RPM_BUILD_ROOT | |
b1b08872 | 80 | install -d $RPM_BUILD_ROOT{/sbin,%{_sysconfdir}/{hostap,pcmcia},%{_mandir}/man{1,8}} |
c83bc4f5 | 81 | install -d $RPM_BUILD_ROOT/etc/rc.d/init.d |
82 | ||
d764f339 | 83 | # hostapd hostapd_cli nt_password_hash hlr_auc_gw |
a485f685 | 84 | install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/hostapd |
5588f8df JP |
85 | %if %{with systemd} |
86 | install -pD %{SOURCE2} $RPM_BUILD_ROOT%{systemdunitdir}/%{name}.service | |
87 | install -pD %{SOURCE3} $RPM_BUILD_ROOT%{systemdunitdir}/%{name}@.service | |
88 | %endif | |
a485f685 ER |
89 | install -p hostapd/hostapd $RPM_BUILD_ROOT/sbin |
90 | install -p hostapd/hostapd_cli $RPM_BUILD_ROOT/sbin | |
91 | install -p hostapd/nt_password_hash $RPM_BUILD_ROOT/sbin | |
92 | install -p hostapd/hlr_auc_gw $RPM_BUILD_ROOT/sbin | |
b1b08872 JB |
93 | cp -p hostapd/hostapd.8 $RPM_BUILD_ROOT%{_mandir}/man8 |
94 | cp -p hostapd/hostapd_cli.1 $RPM_BUILD_ROOT%{_mandir}/man1 | |
c83bc4f5 | 95 | |
d764f339 | 96 | # hostapd configuration |
a485f685 ER |
97 | cp -a hostapd/hostapd.accept $RPM_BUILD_ROOT%{_sysconfdir}/hostap |
98 | cp -a hostapd/hostapd.conf $RPM_BUILD_ROOT%{_sysconfdir}/hostap | |
99 | cp -a hostapd/hostapd.deny $RPM_BUILD_ROOT%{_sysconfdir}/hostap | |
c83bc4f5 | 100 | |
faf313f4 JB |
101 | %clean |
102 | rm -rf $RPM_BUILD_ROOT | |
103 | ||
c83bc4f5 | 104 | %post |
105 | /sbin/chkconfig --add hostapd | |
a485f685 | 106 | %service hostapd restart "HostAP Daemon" |
c83bc4f5 | 107 | |
108 | %preun | |
109 | if [ "$1" = "0" ]; then | |
a2a0fac5 | 110 | %service hostapd stop |
c83bc4f5 | 111 | /sbin/chkconfig --del hostapd |
112 | fi | |
113 | ||
c83bc4f5 | 114 | %files |
115 | %defattr(644,root,root,755) | |
0760ac2d | 116 | %doc COPYING hostapd/{ChangeLog,README,README-WPS} |
c83bc4f5 | 117 | %dir %{_sysconfdir}/hostap |
7f5cb6c4 JB |
118 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/hostap/hostapd.accept |
119 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/hostap/hostapd.conf | |
120 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/hostap/hostapd.deny | |
121 | %attr(755,root,root) /sbin/hlr_auc_gw | |
122 | %attr(755,root,root) /sbin/hostapd | |
123 | %attr(755,root,root) /sbin/hostapd_cli | |
124 | %attr(755,root,root) /sbin/nt_password_hash | |
c83bc4f5 | 125 | %attr(754,root,root) /etc/rc.d/init.d/hostapd |
b1b08872 JB |
126 | %{_mandir}/man1/hostapd_cli.1* |
127 | %{_mandir}/man8/hostapd.8* | |
5588f8df JP |
128 | %if %{with systemd} |
129 | %{systemdunitdir}/%{name}.service | |
130 | %{systemdunitdir}/%{name}@.service | |
131 | %endif |