summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO17
-rw-r--r--.gitignore6
-rw-r--r--PKGBUILD46
3 files changed, 69 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..5158bf6603a0
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,17 @@
+pkgbase = killjoy-notifier-logfile-git
+ pkgdesc = Log unit state changes on behalf of killjoy
+ pkgver = 0
+ pkgrel = 1
+ url = https://github.com/Ichimonji10/killjoy-notifier-logfile
+ arch = x86_64
+ license = GPL3
+ makedepends = git
+ makedepends = rust
+ depends = dbus
+ provides = killjoy-notifier-logfile
+ conflicts = killjoy-notifier-logfile
+ source = git+https://github.com/Ichimonji10/killjoy-notifier-logfile.git
+ sha256sums = SKIP
+
+pkgname = killjoy-notifier-logfile-git
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..ec62f82f0c11
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,6 @@
+# Ignore everything, then whitelist specific files.
+*
+
+!.SRCINFO
+!.gitignore
+!PKGBUILD
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..16257cc12b38
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,46 @@
+# Maintainer: Jeremy Audet <jerebear@protonmail.com>
+
+pkgname='killjoy-notifier-logfile-git'
+pkgver=0 # see pkgver()
+pkgrel=1
+pkgdesc='Log unit state changes on behalf of killjoy'
+arch=('x86_64')
+url="https://github.com/Ichimonji10/${pkgname%-git}"
+license=('GPL3')
+depends=('dbus')
+makedepends=('git' 'rust')
+provides=("${pkgname%-git}")
+conflicts=("${pkgname%-git}")
+source=("git+https://github.com/Ichimonji10/${pkgname%-git}.git")
+sha256sums=('SKIP')
+
+pkgver() {
+ cd "${pkgname%-git}"
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+build() {
+ cd "${pkgname%-git}"
+ cargo build --locked --release
+}
+
+check() {
+ cd "${pkgname%-git}"
+ cargo test --locked --release
+}
+
+package() {
+ install -Dm755 \
+ -t "${pkgdir}/usr/bin" \
+ "${pkgname%-git}/target/release/${pkgname%-git}"
+
+ install -Dm644 \
+ -t "${pkgdir}/usr/lib/systemd/user" \
+ "${pkgname%-git}/package/session/${pkgname%-git}.service"
+
+ install -Dm644 \
+ -t "${pkgdir}/usr/share/dbus-1/services" \
+ "${pkgname%-git}/package/session/name.jerebear.KilljoyNotifierLogfile1.service"
+}
+
+# vim:set ts=2 sw=2 et: