hnscrcpy-git

LOW
maintainer maoyaotang1 0 votes scanned 2026-10-22 05:34:05.500565
View on AUR
Why flagged

Package builds from a git source on GitHub, which is plausibly the project's own; includes a SKIP'd checksum but no evidence of remote code execution or malicious payload; worst case is source tampering, but it's a self-built project with no prebuilt binaries from untrusted sources.

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.

Low AI review llm_review

An AI model (qwen/qwen3-235b-a22b-2507) reviewed this and agrees it is LOW (confidence 90%): Package builds from a git source on GitHub, which is plausibly the project's own; includes a SKIP'd checksum but no evidence of remote code execution or malicious payload; worst case is source tampering, but it's a self-built project with no prebuilt binaries from untrusted sources.

PKGBUILD

1# Maintainer: MaoYaoTang <maoyaotang@163.com>
2
3pkgname=hnscrcpy-git
4_pkgname=hnscrcpy
5pkgver=v1.0.1.r4.gdcb7bf9
6pkgrel=1
7pkgdesc="Display and control HarmonyOS NEXT devices via hdc, scrcpy-like (JavaFX + FFmpeg)"
8arch=('x86_64')
9url="https://github.com/taxiao213/hnscrcpy"
10license=('Apache-2.0')
11
12# jpackage app-image 内嵌完整 JRE 与 JavaFX/FFmpeg native,故不依赖系统 Java。
13# libgl 为 JavaFX Prism 渲染所需;X/GTK 库由桌面环境提供。
14depends=('libgl')
15makedepends=('maven' 'jdk21-openjdk')
16
17provides=('hnscrcpy')
18conflicts=('hnscrcpy-bin')
19
20_tag="v${pkgver}"
21_archive="${pkgname%-git}"
22source=(
23 "git+$url.git"
24)
25sha256sums=('SKIP')
26
27pkgver() {
28 git -C ${_pkgname} describe --long --abbrev=7 | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
29}
30
31build() {
32 cd "${srcdir}/${_pkgname}"
33 export JAVA_HOME=/usr/lib/jvm/java-21-openjdk
34 sh scripts/build-package.sh
35}
36package() {
37 cd "${srcdir}/${_pkgname}"
38
39 # 1. 生成 desktop 文件(内联,不需要外部 hnscrcpy.desktop)
40install -Dm644 /dev/stdin "${pkgdir}/usr/share/applications/${_pkgname}.desktop" <<'DESKTOP'
41[Desktop Entry]
42Type=Application
43Name=hnscrcpy
44Name[zh_CN]=鸿蒙Next手机投屏
45GenericName=鸿蒙 Next 屏幕投屏与设备控制工具
46Comment=借助hdc投屏并控制鸿蒙Next设备
47Exec=hnscrcpy
48Icon=hnscrcpy
49Terminal=false
50Categories=Utility;RemoteAccess;
51Keywords=harmony;hmos;hdc;scrcpy;mirror;cast;
52StartupNotify=true
53DESKTOP
54
55 # 2. 整套app-image复制到 /opt
56 install -d "${pkgdir}/opt"
57 cp -a "target/dist/${_pkgname}" "${pkgdir}/opt/"
58 install -Dm755 "target/classes/hdc/linux-64/hdc" "${pkgdir}/usr/bin/hdc"
59 install -Dm644 "target/classes/hdc/linux-64/libusb_shared.so" "${pkgdir}/usr/lib/libusb_shared.so"
60
61 # 3. 启动 wrapper
62 install -Dm755 /dev/stdin "${pkgdir}/usr/bin/${_pkgname}" <<'WRAPPER'
63#!/usr/bin/env bash
64exec /opt/hnscrcpy/bin/hnscrcpy "$@"
65WRAPPER
66
67 # 4. udev 规则 内联,不再需要外部 51-hdc-huawei.rules
68 install -Dm644 /dev/stdin "${pkgdir}/usr/lib/udev/rules.d/51-hdc-huawei.rules" <<'UDEV'
69SUBSYSTEM=="usb", ATTRS{idVendor}=="12d1", MODE="0666", GROUP="uucp"
70UDEV
71
72 # 5. 图标
73 install -Dm644 "design/icon/hnscrcpy-linux.png" \
74 "${pkgdir}/usr/share/icons/hicolor/512x512/apps/${_pkgname}.png"
75}
76

Scan history

Scanned at (UTC)SeverityRules
2026-10-22 05:34:05 Low 2

Report a package

Reports go to the AURWatch maintainer (one person) and are read by hand. No login required.

0 / 4000
Your suggestion