gnu: Add hostapd.

* gnu/packages/admin.scm (hostapd): New variable.
This commit is contained in:
Ludovic Courtès 2019-05-09 09:36:24 +02:00
parent 6ad799d7c5
commit 56038bac60
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 66 additions and 0 deletions

View File

@ -1277,6 +1277,72 @@ command.")
#t)))))) #t))))))
(synopsis "Graphical user interface for WPA supplicant"))) (synopsis "Graphical user interface for WPA supplicant")))
(define-public hostapd
(package
(name "hostapd")
(version "2.8")
(source (origin
(method url-fetch)
(uri (string-append "https://w1.fi/releases/hostapd-" version
".tar.gz"))
(sha256
(base32
"1c74rrazkhy4lr7pwgwa2igzca7h9l4brrs7672kiv7fwqmm57wj"))))
(build-system gnu-build-system)
(arguments
'(#:phases
(modify-phases %standard-phases
(replace 'configure
(lambda* (#:key outputs #:allow-other-keys)
;; This is mostly copied from 'wpa-supplicant' above.
(chdir "hostapd")
(copy-file "defconfig" ".config")
(let ((port (open-file ".config" "al")))
(display "
CONFIG_LIBNL32=y
CONFIG_IEEE80211R=y
CONFIG_IEEE80211N=y
CONFIG_IEEE80211AC=y\n" port)
(close-port port))
#t))
(add-after 'install 'install-man-pages
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(man (string-append out "/share/man"))
(man1 (string-append man "/man1"))
(man8 (string-append man "/man8")))
(define (copy-man-page target)
(lambda (file)
(install-file file target)))
(for-each (copy-man-page man1)
(find-files "." "\\.1"))
(for-each (copy-man-page man8)
(find-files "." "\\.8"))
#t))))
#:make-flags (list "CC=gcc"
(string-append "BINDIR=" (assoc-ref %outputs "out")
"/sbin")
(string-append "LIBDIR=" (assoc-ref %outputs "out")
"/lib"))
#:tests? #f))
(native-inputs `(("pkg-config" ,pkg-config)))
;; There's an optional dependency on SQLite.
(inputs `(("openssl" ,openssl)
("libnl" ,libnl)))
(home-page "https://w1.fi/hostapd/")
(synopsis "Daemon for Wi-Fi access points and authentication servers")
(description
"hostapd is a user-space daemon for WiFi access points and authentication
servers. It implements IEEE 802.11 access point management, IEEE
802.1X/WPA/WPA2/EAP Authenticators, RADIUS client, EAP server, and RADIUS
authentication server.")
;; Same license as wpa_supplicant.
(license license:bsd-3)))
(define-public wakelan (define-public wakelan
(package (package
(name "wakelan") (name "wakelan")