diff options
author | Ludovic Courtès <ludo@gnu.org> | 2019-05-09 09:36:24 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2019-05-09 12:11:36 +0200 |
commit | 56038bac600ffe96610d2d7dbe71c90431472432 (patch) | |
tree | 568c810a14519d9e82a0b89e7cf572e6a9d5a129 /gnu/packages/admin.scm | |
parent | 6ad799d7c5c14b1bbf1e3db7198b312965d3b786 (diff) | |
download | patches-56038bac600ffe96610d2d7dbe71c90431472432.tar patches-56038bac600ffe96610d2d7dbe71c90431472432.tar.gz |
gnu: Add hostapd.
* gnu/packages/admin.scm (hostapd): New variable.
Diffstat (limited to 'gnu/packages/admin.scm')
-rw-r--r-- | gnu/packages/admin.scm | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index dfc3467bf8..5ab6af71f6 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -1277,6 +1277,72 @@ command.") #t)))))) (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 (package (name "wakelan") |