Skip to content

Commit 5c4e435

Browse files
authored
Merge pull request #20 from Owen-sz/master
pkg: update Fedora package to use systemd macros
2 parents 0687df6 + aa7c6bc commit 5c4e435

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

pkg/fedora/surface-dtx-daemon.spec

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
Name: surface-dtx-daemon
22
Version: 0.3.9
3-
Release: 1%{?dist}
3+
Release: 2%{?dist}
44
Summary: Surface Detachment System (DTX) Daemon
55

66
License: MIT
77
URL: https://github.com/linux-surface/surface-dtx-daemon
88

99
Requires: dbus libgcc
10-
BuildRequires: rust cargo dbus-devel
10+
%{?systemd_requires}
11+
BuildRequires: rust cargo dbus-devel systemd-rpm-macros
1112

1213
%global debug_package %{nil}
1314

@@ -50,6 +51,18 @@ install -D -m644 "target/_surface-dtx-userd" "%{buildroot}/usr/share/zsh/site-fu
5051
install -D -m644 "target/surface-dtx-daemon.fish" "%{buildroot}/usr/share/fish/vendor_completions.d/surface-dtx-daemon.fish"
5152
install -D -m644 "target/surface-dtx-userd.fish" "%{buildroot}/usr/share/fish/vendor_completions.d/surface-dtx-userd.fish"
5253

54+
%post
55+
%systemd_post surface-dtx-daemon.service
56+
%systemd_user_post surface-dtx-userd.service
57+
58+
%preun
59+
%systemd_preun surface-dtx-daemon.service
60+
%systemd_user_preun surface-dtx-userd.service
61+
62+
%postun
63+
%systemd_postun_with_restart surface-dtx-daemon.service
64+
%systemd_user_postun_with_restart surface-dtx-userd.service
65+
5366
%files
5467
%config /etc/dbus-1/system.d/org.surface.dtx.conf
5568
%config /etc/udev/rules.d/40-surface_dtx.rules
@@ -66,6 +79,9 @@ install -D -m644 "target/surface-dtx-userd.fish" "%{buildroot}/usr/share/fish/ve
6679
/usr/share/fish/vendor_completions.d/surface-dtx-userd.fish
6780

6881
%changelog
82+
* Thu Oct 02 2025 Owen Zimmerman <[email protected]> - 0.3.9-2
83+
- Add systemd macros
84+
6985
* Sat Apr 19 2025 Maximilian Luz <[email protected]> - 0.3.9-1
7086
- Update dependencies
7187

0 commit comments

Comments
 (0)