Release LanUps 0.1.2 with native installers and monitoring updates

This commit is contained in:
tongtong committed 2026-11-28 21:18:14 +08:00
1 parent 90c57f020f
commit 5bdc79d8e4
30 files changed
+751 -270

No files matched your search

+51
View File
@@ -0,0 +1,51 @@
%global debug_package %{nil}
%global _build_id_links none
%global __strip /bin/true
%global __provides_exclude_from ^/opt/lanups/
Name: lanups
Version: %{lanups_version}
Release: 1
Summary: LAN UPS Agent and desktop monitor
License: Unspecified
Source0: lanups-payload.tar.gz
Requires(post): coreutils, glibc-common, shadow-utils, systemd
Requires(preun): systemd
Requires(postun): systemd
Requires: openssl-libs, libicu, libX11, libX11-xcb, libxcb, libXext, libXi, libXrandr, libICE, libSM, fontconfig, libglvnd-glx
%description
LanUps monitors a network UPS and provides a local desktop application and system service.
%install
mkdir -p "%{buildroot}/usr/lib/systemd/system"
tar -xzf "%{SOURCE0}" -C "%{buildroot}"
mv "%{buildroot}/lib/systemd/system/lanups-agent.service" "%{buildroot}/usr/lib/systemd/system/"
%post
set -e
/usr/lib/lanups/configure-agent
if [ -d /run/systemd/system ]; then
systemctl daemon-reload
systemctl enable lanups-agent.service
systemctl restart lanups-agent.service
else
systemctl --root=/ enable lanups-agent.service
fi
%preun
if [ "$1" -eq 0 ]; then
if [ -d /run/systemd/system ]; then systemctl stop lanups-agent.service || :; fi
systemctl --root=/ disable lanups-agent.service || :
fi
%postun
if [ "$1" -eq 0 ] && [ -d /run/systemd/system ]; then systemctl daemon-reload || :; fi
%files
/opt/lanups
/usr/lib/lanups
/usr/lib/systemd/system/lanups-agent.service
/etc/xdg/autostart/lanups-desktop.desktop
/usr/share/applications/lanups-desktop.desktop
/usr/share/icons/hicolor/256x256/apps/lanups.png