webhid-git
LOW
maintainer k4zoku
0 votes
scanned 2026-08-24 05:22:02.165497
Why flagged
Uploaded within the last 14 days with 2 or fewer community votes — little peer review so far.
Triggered rules
Low
Few votes, recently uploaded
zero_votes_recent
Uploaded within the last 14 days with 2 or fewer community votes — little peer review so far.
PKGBUILD
1
# Maintainer: K4zoku <k4zoku@pm.me>
2
#
3
# This PKGBUILD builds the WebHID daemon + native-messaging host from the
4
# latest git commit (git package; version derived via git describe, so no
5
# manual bump per release). Supports both x86_64 and aarch64.
6
7
_pkgbase=webhid
8
pkgname=${_pkgbase}-git
9
pkgver=3.1.0.r96.g050c5e5
10
pkgrel=1
11
pkgdesc='WebHID implementation for Firefox via a native-messaging bridge and hidraw daemon'
12
arch=('x86_64' 'aarch64')
13
url='https://github.com/K4zoku/FF-WebHID'
14
license=('MIT')
15
depends=('libudev.so')
16
makedepends=('cargo' 'pkgconf' 'git')
17
optdepends=('webhid-addon: Firefox browser extension (system-wide install)')
18
provides=("${_pkgbase}")
19
conflicts=("${_pkgbase}")
20
install=webhid-git.install
21
source=("${_pkgbase}::git+${url}.git")
22
sha256sums=('SKIP')
23
options=('!lto' '!debug')
24
25
pkgver() {
26
cd "${_pkgbase}"
27
git describe --tags | sed 's/^v//;s/_/./;s/\([^-]*-g\)/r\1/;s/-/./g'
28
}
29
30
prepare() {
31
cargo fetch \
32
--target "$CARCH-unknown-linux-gnu" \
33
--manifest-path "$srcdir/${_pkgbase}/crates/Cargo.toml"
34
}
35
36
build() {
37
cd "$srcdir/${_pkgbase}"
38
cargo build --release --frozen \
39
--manifest-path crates/Cargo.toml
40
}
41
42
_browser_forks=(librewolf waterfox)
43
44
_install_browser_forks() {
45
local _src="$1" _dest="$2" _root
46
for _root in "${_browser_forks[@]}"; do
47
install -Dm644 "$_src" "$pkgdir/usr/lib/$_root/$_dest"
48
done
49
}
50
51
package() {
52
local _root="$srcdir/${_pkgbase}"
53
local _release="$_root/crates/target/release"
54
local _nm_dir="$pkgdir/usr/lib/mozilla/native-messaging-hosts"
55
56
install -Dm755 "$_release/webhid-daemon" \
57
"$pkgdir/usr/bin/webhid-daemon"
58
install -Dm755 "$_release/webhid-native-messaging" \
59
"$pkgdir/usr/bin/webhid-native-messaging"
60
61
sed 's|{{NM_BIN}}|/usr/bin/webhid-native-messaging|g' \
62
"$_root/manifests/webhid.forwarder_nm_host.json" \
63
| install -Dm644 /dev/stdin "$_nm_dir/webhid.forwarder_nm_host.json"
64
sed 's|{{DAEMON_BIN}}|/usr/bin/webhid-daemon|g' \
65
"$_root/manifests/webhid.daemon_nm_host.json" \
66
| install -Dm644 /dev/stdin "$_nm_dir/webhid.daemon_nm_host.json"
67
68
sed 's|{{DAEMON_BIN}}|/usr/bin/webhid-daemon|g' \
69
"$_root/manifests/webhid-daemon.service" \
70
| install -Dm644 /dev/stdin \
71
"$pkgdir/usr/lib/systemd/system/webhid-daemon.service"
72
73
local _f
74
for _f in webhid.forwarder_nm_host.json webhid.daemon_nm_host.json; do
75
_install_browser_forks "$_nm_dir/$_f" "native-messaging-hosts/$_f"
76
done
77
78
install -Dm644 "$_root/LICENSE" \
79
"$pkgdir/usr/share/licenses/${pkgname}/LICENSE"
80
}
81
Scan history
| Scanned at (UTC) | Severity | Rules |
|---|---|---|
| 2026-08-24 05:22:02 | Low | 1 |