summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO16
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD27
-rw-r--r--caffeinated.install10
-rw-r--r--caffeinated.service10
5 files changed, 67 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..a3504775300
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,16 @@
+pkgbase = caffeinated
+ pkgdesc = Simple logind idle inhibitor
+ pkgver = 0.1.0
+ pkgrel = 1
+ url = https://github.com/electrickite/caffeinated
+ arch = x86_64
+ license = MIT
+ depends = libbsd
+ depends = systemd
+ source = https://github.com/electrickite/caffeinated/archive/0.1.0.tar.gz
+ source = caffeinated.service
+ sha256sums = 55cd0faf04cf35a99931ca173abc98b6ae4a8bb8cf6b3b393c55a2df67e53560
+ sha256sums = 29b1952dbd1c1b52e82535c1845f843dc427bad4b0831acd9f46c375d4731151
+
+pkgname = caffeinated
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000000..0cced017d91
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+*.tar.xz
+*.tar.gz
+/pkg
+/src
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..78bdc02b214
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,27 @@
+# Maintainer: Corey Hinshaw <corey(at)electrickite(dot)org>
+
+pkgname=caffeinated
+pkgver=0.1.0
+pkgrel=1
+pkgdesc="Simple logind idle inhibitor"
+arch=("x86_64")
+url="https://github.com/electrickite/${pkgname}"
+license=("MIT")
+depends=("libbsd" "systemd")
+source=(
+ "https://github.com/electrickite/${pkgname}/archive/${pkgver}.tar.gz"
+ "${pkgname}.service")
+sha256sums=(
+ "55cd0faf04cf35a99931ca173abc98b6ae4a8bb8cf6b3b393c55a2df67e53560"
+ "29b1952dbd1c1b52e82535c1845f843dc427bad4b0831acd9f46c375d4731151")
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make PREFIX=/usr clean all
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make PREFIX=/usr DESTDIR="${pkgdir}" install
+ install -m644 -D ${srcdir}/${pkgname}.service ${pkgdir}/usr/lib/systemd/user/${pkgname}.service
+}
diff --git a/caffeinated.install b/caffeinated.install
new file mode 100644
index 00000000000..81664c55ee0
--- /dev/null
+++ b/caffeinated.install
@@ -0,0 +1,10 @@
+post_upgrade() {
+ /usr/bin/systemctl daemon-reload >/dev/null 2>&1
+}
+
+post_remove() {
+ /usr/bin/systemctl daemon-reload >/dev/null 2>&1
+ cat << EOF
+ Be sure to stop and disable all running caffeinated user services.
+EOF
+}
diff --git a/caffeinated.service b/caffeinated.service
new file mode 100644
index 00000000000..a950118c0d4
--- /dev/null
+++ b/caffeinated.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Caffeinated idle inhibitor
+Documentation=https://github.com/electrickite/caffeinated
+
+[Service]
+ExecStart=/usr/bin/caffeinated
+Restart=always
+
+[Install]
+WantedBy=default.target