Package Details: wifi4wofi 0.5.1-1

Git Clone URL: https://aur.archlinux.org/wifi4wofi.git (read-only, click to copy)
Package Base: wifi4wofi
Description: bash script providing WiFi menu for wofi, forked from wofi-wifi-menu
Upstream URL: https://github.com/fearlessgeekmedia/wifi4wofi
Keywords: rofi wayland, wifi, wofi,
Licenses: MIT
Submitter: fearlessgeekmedi
Maintainer: fearlessgeekmedi
Last Packager: fearlessgeekmedi
Votes: 2
Popularity: 0.036365
First Submitted: 2022-10-24 17:05 (UTC)
Last Updated: 2022-10-27 18:55 (UTC)

Latest Comments

pato05 commented on 2023-05-20 15:53 (UTC)

The current PKGBUILD doesn't work. Please do not use sudo in the PKGBUILD, and write every change to $pkgdir as it would make those new files not removable when the package is removed.

diff --git a/PKGBUILD b/PKGBUILD
index 15bc8b6..af505a2 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,7 +4,7 @@
 pkgname=wifi4wofi
 _pkgname=wifi4wofi
 pkgver=0.5.1
-pkgrel=1
+pkgrel=2
 pkgdesc="bash script providing WiFi menu for wofi, forked from wofi-wifi-menu"
 arch=("any")
 url="https://github.com/fearlessgeekmedia/wifi4wofi"
@@ -15,12 +15,10 @@ source=('git+https://github.com/fearlessgeekmedia/wifi4wofi')
 sha256sums=('SKIP')

 package() {
-  sudo mkdir -p "${pkgdir}/usr/bin"
-  sudo cp "${srcdir}/wifi4wofi/wifi4wofi" "${pkgdir}/usr/bin/wifi4wofi"
-  sudo chmod +x "${pkgdir}/usr/bin/wifi4wofi"
-  if [[!-d "/usr/share/wofi"]]
-  then
-    sudo mkdir "/usr/share/wofi"
-  fi
-  sudo cp "${srcdir}/wifi4wofi/config.example" "/usr/share/wofi/wifi.example"
+  mkdir -p "${pkgdir}/usr/bin"
+  cp "${srcdir}/wifi4wofi/wifi4wofi" "${pkgdir}/usr/bin/wifi4wofi"
+  chmod +x "${pkgdir}/usr/bin/wifi4wofi"
+
+  mkdir -p "${pkgdir}/usr/share/wofi"
+  cp "${srcdir}/wifi4wofi/config.example" "${pkgdir}/usr/share/wofi/wifi.example"
 }

kleintux commented on 2022-12-15 16:54 (UTC)

Don't use SUDO in PKGBUILDS. it's forbidden. Don't install something direct to the System. It's a security risk and the files will not be deleted if the package gets deleted. You need to add the files to the pkgdir folder.

see https://wiki.archlinux.org/title/Creating_packages#package()

thank you for fixing and maintaining