Add doas support
This commit is contained in:
parent
7d46ba7a27
commit
d68a0d42c3
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -7,3 +7,4 @@
|
|||
!.SRCINFO
|
||||
!90-hardcode-tray.hook
|
||||
!hook.py
|
||||
!doasuser.patch
|
||||
|
|
|
|||
13
PKGBUILD
13
PKGBUILD
|
|
@ -2,8 +2,8 @@
|
|||
# Contributor: Yuanji <self@gimo.me>
|
||||
# Contributor: Bilal Elmoussaoui <bil.elmoussaoui@gmail.com>
|
||||
pkgname=hardcode-tray-git
|
||||
pkgver=4.3.r224.ga91b4b7
|
||||
pkgrel=2
|
||||
pkgver=4.3.r246.g1d52b2c
|
||||
pkgrel=1
|
||||
pkgdesc="Fixes hardcoded tray icons"
|
||||
arch=('x86_64')
|
||||
url="https://github.com/bil-elmoussaoui/Hardcode-Tray"
|
||||
|
|
@ -17,10 +17,12 @@ provides=("${pkgname%-git}")
|
|||
conflicts=("${pkgname%-git}")
|
||||
source=("${pkgname%-git}::git+https://github.com/bil-elmoussaoui/Hardcode-Tray.git"
|
||||
"90-${pkgname%-git}.hook"
|
||||
"hook.py")
|
||||
"hook.py"
|
||||
"doasuser.patch")
|
||||
sha256sums=('SKIP'
|
||||
'c16ba6a82d4fe523cb91bf472b44296db82ff301866e3bce18bb4149d0aae5ea'
|
||||
'64a9907f74c5c04fb9f32b2b0684a3ce040d3bc2baacabb3ca1e914d70f24c81')
|
||||
'64a9907f74c5c04fb9f32b2b0684a3ce040d3bc2baacabb3ca1e914d70f24c81'
|
||||
'8f567656707f3e1bc534f2b30b0f87a1b9df9372be27788b61044a54fec90045')
|
||||
|
||||
pkgver() {
|
||||
cd "$srcdir/${pkgname%-git}"
|
||||
|
|
@ -33,6 +35,9 @@ prepare() {
|
|||
# Correct app.asar path for community bitwarden package
|
||||
sed -i 's|/usr/lib/bitwarden/resources/|/usr/lib/bitwarden/|g' \
|
||||
data/database/bitwarden.electron.json
|
||||
|
||||
# Add doas support
|
||||
patch --forward --strip=1 --input="${srcdir}/doasuser.patch"
|
||||
}
|
||||
|
||||
build() {
|
||||
|
|
|
|||
12
doasuser.patch
Normal file
12
doasuser.patch
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
diff --unified --recursive --text --color hardcode-tray.orig/const.py.in hardcode-tray.new/const.py.in
|
||||
--- hardcode-tray.orig/const.py.in 2023-05-04 15:16:47.519709571 -0500
|
||||
+++ hardcode-tray.new/const.py.in 2023-05-04 15:19:08.596711509 -0500
|
||||
@@ -24,7 +24,7 @@
|
||||
from HardcodeTray.tools import detect_de, get_themes
|
||||
|
||||
DB_FOLDER = path.join("@DATA_DIR@", "database", "")
|
||||
-USERNAME = getenv("SUDO_USER") or getenv("USER")
|
||||
+USERNAME = getenv("SUDO_USER") or getenv("DOAS_USER") or getenv("USER")
|
||||
USERHOME = path.expanduser("~" + USERNAME)
|
||||
BACKUP_FOLDER = path.join(USERHOME, ".config", "Hardcode-Tray", "")
|
||||
CONFIG_FILE = path.join(USERHOME, ".config", "hardcode-tray.json")
|
||||
Loading…
Reference in a new issue