panasonic-posture-manager
LOW
maintainer adogecheems
0 votes
scanned 2026-11-03 16:05:05.794714
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: adogecheems <adogecheems@outlook.com>
2
#
3
# AUR source-build package for the 2.0.x series. Read README.md in this
4
# directory before submitting. The source is pinned to the v2.0.0 release tag.
5
# The package is published on AUR as panasonic-posture-manager.
6
7
pkgname=panasonic-posture-manager
8
pkgver=2.0.0
9
pkgrel=1
10
pkgdesc='Posture management and screen orientation for convertible Linux 2-in-1 laptops'
11
arch=('x86_64')
12
url='https://github.com/adogecheems/panasonic-posture-manager'
13
license=('AGPL-3.0-or-later')
14
# Python package (wheel) + GJS/GTK UI + desktop session integration.
15
depends=(
16
'gjs'
17
'gtk4>=4.12'
18
'libadwaita>=1.4'
19
'python>=3.11'
20
'python-gobject'
21
'systemd'
22
'polkit'
23
'dbus'
24
'iio-sensor-proxy'
25
)
26
# Display and lock integration lives in optional desktop packages. The
27
# privileged daemon and relay are desktop-neutral, so keep all backends
28
# optional and let users install the set for their session.
29
optdepends=(
30
'gnome-shell: GNOME session notification server and desktop integration'
31
'mutter: display rotation and orientation lock on GNOME Wayland'
32
'gnome-settings-daemon: touchscreen orientation-lock GSettings schema on GNOME'
33
'kscreen: display rotation and auto-rotate policy on Plasma 6.8+ (kscreenctl)'
34
'libkscreen: display rotation and auto-rotate policy on Plasma 6.0-6.7 (kscreen-doctor)'
35
)
36
# Build tooling: Git source, C relay, gettext catalog and the PEP 517 wheel.
37
makedepends=('git' 'gcc' 'gettext' 'python-build' 'python-installer' 'python-setuptools' 'python-wheel')
38
install="${pkgname}.install"
39
40
# Build directly from the tagged upstream source. This is a VCS source, so
41
# SKIP is the correct checksum entry; the tag pins the release revision.
42
source=("${pkgname}::git+https://github.com/adogecheems/${pkgname}.git#tag=v${pkgver}")
43
sha256sums=('SKIP')
44
45
build() {
46
cd "${srcdir}/${pkgname}"
47
48
# Never ship prebuilt artifacts: rebuild the C relay and the gettext catalog
49
# from source, then build the Python wheel with the distribution toolchain.
50
rm -f backend/relay backend/*.gch
51
rm -f locale/zh_CN/LC_MESSAGES/panasonic-posture-manager.mo
52
rm -rf dist build src/*.egg-info
53
make
54
python -m build --wheel --no-isolation
55
}
56
57
check() {
58
cd "${srcdir}/${pkgname}"
59
# compileall + unittest + session-bus D-Bus integration + i18n coverage.
60
# The runtime dependencies of make check (PyGObject, dbus-run-session) are
61
# already part of depends.
62
make check
63
}
64
65
package() {
66
cd "${srcdir}/${pkgname}"
67
68
local libdir="${pkgdir}/usr/lib/panasonic-posture-manager"
69
local datadir="${pkgdir}/usr/share/panasonic-posture-manager"
70
local file wheel
71
72
# Python package, console scripts and metadata come from the wheel; the
73
# installed file list is decided by python-installer (do not hard-code the
74
# site-packages path or the Python version).
75
for wheel in dist/*.whl; do
76
python -m installer --destdir="${pkgdir}" "${wheel}"
77
done
78
79
# GJS UI modules, posture illustrations and model profiles: data-only files
80
# that intentionally live outside the Python package.
81
while IFS= read -r -d '' file; do
82
install -Dm644 "${file}" "${datadir}/${file#data/}"
83
done < <(find data -type f -print0)
84
85
# The desktop entry and notifications resolve the application icon by ID
86
# from the standard hicolor theme, separately from the data-directory copy
87
# used by the GJS window when running from a source checkout.
88
install -Dm644 data/assets/work.mmoe.panasonic.PostureManager.png \
89
"${pkgdir}/usr/share/icons/hicolor/512x512/apps/work.mmoe.panasonic.PostureManager.png"
90
91
# Privileged actuator built from backend/*.c by make.
92
if [[ ! -x backend/relay ]]; then
93
echo "error: backend/relay was not built by make" >&2
94
return 1
95
fi
96
install -Dm755 backend/relay "${libdir}/relay"
97
98
# gettext catalogs follow the system locale layout.
99
while IFS= read -r -d '' file; do
100
install -Dm644 "${file}" "${pkgdir}/usr/share/locale/${file#locale/}"
101
done < <(find locale -type f -name '*.mo' -print0)
102
103
# systemd units (system + user), D-Bus policy/activation, polkit action,
104
# desktop entry and the uinput module requested at boot.
105
install -Dm644 packaging/systemd/panasonic-posture-manager.service \
106
"${pkgdir}/usr/lib/systemd/system/panasonic-posture-manager.service"
107
install -Dm644 packaging/systemd/user/panasonic-posture-manager-session.service \
108
"${pkgdir}/usr/lib/systemd/user/panasonic-posture-manager-session.service"
109
install -Dm644 packaging/modules-load.d/uinput.conf \
110
"${pkgdir}/usr/lib/modules-load.d/panasonic-posture-manager.conf"
111
install -Dm644 packaging/dbus/work.mmoe.panasonic.Posture.conf \
112
"${pkgdir}/usr/share/dbus-1/system.d/work.mmoe.panasonic.Posture.conf"
113
install -Dm644 packaging/dbus/work.mmoe.panasonic.Posture.service \
114
"${pkgdir}/usr/share/dbus-1/system-services/work.mmoe.panasonic.Posture.service"
115
install -Dm644 packaging/polkit/work.mmoe.panasonic.Posture.policy \
116
"${pkgdir}/usr/share/polkit-1/actions/work.mmoe.panasonic.Posture.policy"
117
install -Dm644 packaging/desktop/work.mmoe.panasonic.PostureManager.desktop \
118
"${pkgdir}/usr/share/applications/work.mmoe.panasonic.PostureManager.desktop"
119
120
# Only install a license file if upstream ships one. Do not fabricate a
121
# license file in this package.
122
if [[ -f LICENSE ]]; then
123
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
124
fi
125
126
# Catch accidental /usr/local paths in installed text files. The relay is an
127
# ELF binary; grep -I skips it.
128
if grep -rIq '/usr/local' "${pkgdir}"; then
129
echo "error: /usr/local reference found in the package tree" >&2
130
return 1
131
fi
132
}
133
Scan history
| Scanned at (UTC) | Severity | Rules |
|---|---|---|
| 2026-11-03 16:05:05 | Low | 1 |