-
Notifications
You must be signed in to change notification settings - Fork 160
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
user/poweralertd: move from main, add user service
- Loading branch information
Showing
3 changed files
with
42 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
type = process | ||
command = /usr/bin/poweralertd | ||
depends-on: dbus | ||
depends-on: graphical.target | ||
log-type = buffer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
diff --git a/dbus.h b/dbus.h | ||
index e9a1fbe..839d087 100644 | ||
--- a/dbus.h | ||
+++ b/dbus.h | ||
@@ -9,4 +9,8 @@ | ||
#include <systemd/sd-bus.h> | ||
#endif | ||
|
||
+#if defined(HAVE_TANGLE) | ||
+#include <tangle/sd-bus.h> | ||
+#endif | ||
+ | ||
#endif | ||
diff --git a/meson.build b/meson.build | ||
index bad7ed9..d44ed9c 100644 | ||
--- a/meson.build | ||
+++ b/meson.build | ||
@@ -25,8 +25,12 @@ configuration.set('bindir', join_paths(get_option('prefix'), get_option('bindir' | ||
basu = dependency('basu', required: false) | ||
elogind = dependency('libelogind', required: false) | ||
systemd = dependency('libsystemd', required: false) | ||
+tangle = dependency('tangle', required: false) | ||
|
||
-if basu.found() | ||
+if tangle.found() | ||
+ add_project_arguments('-DHAVE_TANGLE=1', language: 'c') | ||
+ sdbus = tangle | ||
+elif basu.found() | ||
add_project_arguments('-DHAVE_BASU=1', language: 'c') | ||
sdbus = basu | ||
elif elogind.found() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
pkgname = "poweralertd" | ||
pkgver = "0.3.0" | ||
pkgrel = 0 | ||
pkgrel = 1 | ||
build_style = "meson" | ||
hostmakedepends = [ | ||
"meson", | ||
"pkgconf", | ||
"scdoc", | ||
] | ||
makedepends = ["elogind-devel"] | ||
makedepends = ["tangle-devel"] | ||
depends = ["upower"] | ||
pkgdesc = "UPower-powered power alerter" | ||
maintainer = "Umar Getagazov <[email protected]>" | ||
|
@@ -16,3 +16,7 @@ | |
source = f"https://git.sr.ht/~kennylevinsen/poweralertd/archive/{pkgver}.tar.gz" | ||
sha256 = "5b2a1d0fefab62e5ddb5784f2cd3d330f36b3cb5260936f5051f6ff89d8abc3f" | ||
hardening = ["vis", "cfi"] | ||
|
||
|
||
def post_install(self): | ||
self.install_service(self.files_path / "poweralertd.user") |