summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChloe Brown <chloe.brown.00@outlook.com>2024-08-02 09:07:45 +0100
committerChloe Brown <chloe.brown.00@outlook.com>2024-08-02 09:07:45 +0100
commit61431145230756c46e78e1d86215be4a72f800b2 (patch)
treeb31f44bf2bd3414ede028f99d79b97624e2d645d
parentd7b658e6b7caa05127e372f2bdf4ba7e980329e9 (diff)
wihotspot: new package
-rw-r--r--yellowsquid/packages/linux.scm41
-rw-r--r--yellowsquid/packages/patches/wihotspot-destdir.patch28
2 files changed, 69 insertions, 0 deletions
diff --git a/yellowsquid/packages/linux.scm b/yellowsquid/packages/linux.scm
index 6b3a0b3..40138b4 100644
--- a/yellowsquid/packages/linux.scm
+++ b/yellowsquid/packages/linux.scm
@@ -1,8 +1,16 @@
(define-module (yellowsquid packages linux)
+ #:use-module (gnu packages admin)
+ #:use-module (gnu packages aidc)
+ #:use-module (gnu packages base)
+ #:use-module (gnu packages dns)
+ #:use-module (gnu packages gtk)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages sdl)
+ #:use-module (guix build-system glib-or-gtk)
#:use-module (guix build-system gnu)
#:use-module (guix download)
+ #:use-module (guix gexp)
+ #:use-module (guix git-download)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix utils)
@@ -53,3 +61,36 @@ support for serial mice, touchscreens etc.), and test the input event layer.
* jstest - test joystick devices")
(license license:gpl2+)))
+
+(define-public wihotspot
+ (package
+ (name "wihotspot")
+ (version "4.7.2")
+ (home-page "https://github.com/lakinduakash/linux-wifi-hotspot")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference (url home-page)
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (patches (search-patches "wihotspot-destdir.patch"))
+ (sha256 (base32 "0fd22rppbj3kbgx1qkiaj8g3kagc0941q2xd59z0pj041rcxhqgr"))))
+ (build-system glib-or-gtk-build-system)
+ (arguments
+ (list
+ #:make-flags
+ #~(list (string-append "PREFIX=" #$output)
+ "PKGCONFIG=pkg-config")
+ #:phases
+ #~(modify-phases %standard-phases
+ (delete 'configure)
+ (delete 'check))))
+ (inputs (list gtk+ qrencode))
+ (propagated-inputs (list dnsmasq hostapd))
+ (native-inputs (list pkg-config))
+ (synopsis "Wifi hotspot creator for Linux.")
+ (description
+ "Feature-rich wifi hotspot creator for Linux which provides both GUI and
+command-line interface. It is also able to create a hotspot using the same wifi
+card which is connected to an AP already.")
+ (license license:bsd-2)))
diff --git a/yellowsquid/packages/patches/wihotspot-destdir.patch b/yellowsquid/packages/patches/wihotspot-destdir.patch
new file mode 100644
index 0000000..2444a8a
--- /dev/null
+++ b/yellowsquid/packages/patches/wihotspot-destdir.patch
@@ -0,0 +1,28 @@
+--- a/src/scripts/Makefile
++++ b/src/scripts/Makefile
+@@ -8,7 +8,7 @@
+
+ install:
+ install -CDm755 create_ap $(DESTDIR)$(BINDIR)/create_ap
+- install -CDm644 create_ap.conf $(DESTDIR)/etc/create_ap.conf
++ install -CDm644 create_ap.conf $(DESTDIR)$(PREFIX)/etc/create_ap.conf
+ install -CDm644 create_ap.service $(DESTDIR)$(PREFIX)/lib/systemd/system/create_ap.service
+ install -CDm644 bash_completion $(DESTDIR)$(PREFIX)/share/bash-completion/completions/create_ap
+ install -CDm644 README.md $(DESTDIR)$(PREFIX)/share/doc/create_ap/README.md
+@@ -16,14 +16,14 @@
+
+ install-cli-only:
+ install -CDm755 create_ap $(DESTDIR)$(BINDIR)/create_ap
+- install -CDm644 create_ap.conf $(DESTDIR)/etc/create_ap.conf
++ install -CDm644 create_ap.conf $(DESTDIR)$(PREFIX)/etc/create_ap.conf
+ install -CDm644 create_ap.service $(DESTDIR)$(PREFIX)/lib/systemd/system/create_ap.service
+ install -CDm644 bash_completion $(DESTDIR)$(PREFIX)/share/bash-completion/completions/create_ap
+ install -CDm644 README.md $(DESTDIR)$(PREFIX)/share/doc/create_ap/README.md
+
+ uninstall:
+ rm -f $(DESTDIR)$(BINDIR)/create_ap
+- rm -f $(DESTDIR)/etc/create_ap.conf
++ rm -f $(DESTDIR)$(PREFIX)/etc/create_ap.conf
+ rm -f $(DESTDIR)$(PREFIX)/lib/systemd/system/create_ap.service
+ rm -f $(DESTDIR)$(PREFIX)/share/bash-completion/completions/create_ap
+ rm -f $(DESTDIR)$(PREFIX)/share/doc/create_ap/README.md