%global debug_package %{nil} URL: https://github.com/MCC45TR/uke-linux-hardware-support Source0: uke-battery-observer-1.4.0.tar.xz ExclusiveArch: aarch64 BuildRequires: gcc-c++ make systemd-rpm-macros jq dbus-daemon systemd BuildRequires: pkgconfig(libcrypto) BuildRequires: pkgconfig(libdrm) BuildRequires: pkgconfig(libsystemd) >= 257 Name: uke-battery-observer Version: 1.4.0 Release: 11.fc46 License: MIT Summary: Read-only native battery observation for Xiaomi Uke Requires: senemos-native-runtime(libstdc++) systemd-libs Requires(pre): systemd %description -n uke-battery-observer C++ standard power-supply collector and read-only D-Bus diagnostics. Firmware controls charging. No raw-property writes, PD negotiation, thresholds, factory access or calibration changes are supplied. Health and estimation algorithms remain disabled until pack/firmware evidence is qualified. This source component reports software tests and physical qualification separately. %package -n uke-charge-control Version: 1.4.0 Release: 11.fc46 License: MIT Summary: Evidence-gated native Uke charge-control backend Requires: senemos-native-runtime(libstdc++) systemd-libs Requires: upower >= 1.91.5 Requires(pre): systemd %description -n uke-charge-control Separate privileged threshold/current helper and disabled admission services. General controls require the reviewed kernel option, exact per-boot evidence, numerical guards and matching firmware setting readback. Positive FCC writes use the separately admitted OEM property. Voltage and PD remain firmware-owned; no voltage writer. The shipped profile is unqualified. No physical acceptance is implied. An explicit matched-kernel operation can enable only the existing 70/80 cap with external input off, preserving thresholds and electrical settings. Another explicit operation requests that already enabled target once. An opaque firmware reply is reported as receipt only, with physical effect unknown. %package -n uke-offline-charge Version: 1.4.0 Release: 11.fc46 License: MIT Summary: Minimal native charger-boot interface for Uke Requires: systemd senemos-native-runtime(libstdc++) %description -n uke-offline-charge Native DRM battery screen for an explicitly detected charger boot. The matched initramfs selects its isolated systemd target before desktop startup. Normal boots are unchanged. No firmware writer, PD control or charging algorithm is included. Physical charger-boot, power-key and unplug behavior require testing. %prep %setup -q ( mkdir -p "%{_builddir}/uke-battery-observer-1.4.0/work/uke-battery-observer" cd '%{_builddir}/uke-battery-observer-1.4.0/work/uke-battery-observer' rm -rf 'uke-battery-observer-1.4.0' /usr/bin/rpmuncompress -x '%{_builddir}/uke-battery-observer-1.4.0/inputs/uke-battery-observer/uke-battery-observer-1.4.0.tar.xz' STATUS=$? if [ $STATUS -ne 0 ]; then exit $STATUS fi cd 'uke-battery-observer-1.4.0' /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w . sha256sum -c SOURCE-SHA256SUMS ) %build ( cd "%{_builddir}/uke-battery-observer-1.4.0/work/uke-battery-observer/uke-battery-observer-1.4.0" /usr/bin/make -O -j${RPM_BUILD_NCPUS} V=1 VERBOSE=1 CXXFLAGS="-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wno-complain-wrong-lang -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer" LDFLAGS="-Wl,-z,relro -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-hardened-ld-errors -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -specs=/usr/lib/rpm/redhat/redhat-package-notes " ) %install ( cd "%{_builddir}/uke-battery-observer-1.4.0/work/uke-battery-observer/uke-battery-observer-1.4.0" /usr/bin/make install DESTDIR=%{buildroot} INSTALL="/usr/bin/install -p" prefix=/usr ) %check ( cd "%{_builddir}/uke-battery-observer-1.4.0/work/uke-battery-observer/uke-battery-observer-1.4.0" # Host software checks; never tablet acceptance or automatic device access. /usr/bin/make -O -j${RPM_BUILD_NCPUS} V=1 VERBOSE=1 test-native ) %pre -n uke-battery-observer %post -n uke-battery-observer if [ $1 -eq 1 ] && [ -x "/usr/lib/systemd/systemd-update-helper" ]; then # Initial installation /usr/lib/systemd/systemd-update-helper install-system-units uke-battery.service || : fi %preun -n uke-battery-observer if [ $1 -eq 0 ] && [ -x "/usr/lib/systemd/systemd-update-helper" ]; then # Package removal, not upgrade /usr/lib/systemd/systemd-update-helper remove-system-units uke-battery.service || : fi %postun -n uke-battery-observer %post -n uke-charge-control if [ $1 -eq 1 ] && [ -x "/usr/lib/systemd/systemd-update-helper" ]; then # Initial installation /usr/lib/systemd/systemd-update-helper install-system-units uke-charge-control.service uke-charge-automatic.service uke-charge-protection.service || : fi %preun -n uke-charge-control if [ $1 -eq 0 ] && [ -x "/usr/lib/systemd/systemd-update-helper" ]; then # Package removal, not upgrade /usr/lib/systemd/systemd-update-helper remove-system-units uke-charge-control.service uke-charge-automatic.service uke-charge-protection.service || : fi %postun -n uke-charge-control %files -n uke-charge-control %license work/uke-battery-observer/uke-battery-observer-1.4.0/LICENSE %doc work/uke-battery-observer/uke-battery-observer-1.4.0/docs/CHARGE-CONTROL.md work/uke-battery-observer/uke-battery-observer-1.4.0/docs/CHARGING-PROTOCOLS.md work/uke-battery-observer/uke-battery-observer-1.4.0/docs/BATTERY-LONGEVITY.md /usr/libexec/uke-charge-control /usr/share/uke-battery/protection-readiness.json /usr/lib/systemd/system/uke-charge-control.service /usr/lib/systemd/system/uke-charge-automatic.service /usr/lib/systemd/system/uke-charge-protection.service /usr/lib/udev/rules.d/80-uke-charge-protection.rules /usr/lib/systemd/system-preset/91-uke-charge-control.preset %config(noreplace) /etc/uke-battery/control-profile.json %config(noreplace) /etc/UPower/UPower.conf.d/60-uke-battery-safety.conf %files -n uke-offline-charge %license work/uke-battery-observer/uke-battery-observer-1.4.0/LICENSE %doc work/uke-battery-observer/uke-battery-observer-1.4.0/docs/OFFLINE-CHARGING.md /usr/libexec/uke-offline-charge /usr/lib/systemd/system/uke-offline-charge.service /usr/lib/systemd/system/uke-offline-charge.target %files -n uke-battery-observer %license work/uke-battery-observer/uke-battery-observer-1.4.0/LICENSE %doc work/uke-battery-observer/uke-battery-observer-1.4.0/README.md work/uke-battery-observer/uke-battery-observer-1.4.0/docs/BATTERY.md work/uke-battery-observer/uke-battery-observer-1.4.0/docs/RUNTIME-PROFILE.md work/uke-battery-observer/uke-battery-observer-1.4.0/docs/BATTERY-ENGINEERING.md work/uke-battery-observer/uke-battery-observer-1.4.0/SOURCE-SHA256SUMS /usr/bin/uke-battery /usr/lib/systemd/system/uke-battery.service /usr/lib/systemd/system-preset/90-uke-battery.preset /usr/share/dbus-1/system.d/org.senemos.Uke.Battery1.conf /usr/share/dbus-1/system-services/org.senemos.Uke.Battery1.service /usr/lib/sysusers.d/uke-battery.conf /usr/share/uke-battery/battery-profile.json /usr/share/uke-battery/model-profile.json %changelog * Thu Oct 29 2026 Senemos Maintainers <75160848+MCC45TR@users.noreply.github.com> - 1.4.0-11.fc46 - Build this component independently from its reviewed source recipe.