summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMansour Behabadi2022-07-03 18:27:35 +1000
committerMansour Behabadi2022-07-03 18:29:53 +1000
commitbf8f021869eb5e4e1771c49f5b5adf8d4f75fcac (patch)
treedf81162a81619e75225fcfb664bdf7c375f58f56
downloadaur-bf8f021869eb5e4e1771c49f5b5adf8d4f75fcac.tar.gz
Version 20220109.db9de00-1
-rw-r--r--.SRCINFO19
-rw-r--r--PKGBUILD30
-rw-r--r--airstatus.service11
3 files changed, 60 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..942e37075b6d
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+pkgbase = airstatus-git
+ pkgdesc = Check AirPods battery levels on Linux
+ pkgver = 20220109.db9de00
+ pkgrel = 1
+ url = https://github.com/delphiki/AirStatus
+ arch = i686
+ arch = x86_64
+ license = GPL
+ makedepends = git
+ depends = python
+ depends = python-bleak
+ provides = airstatus
+ conflicts = airstatus
+ source = git+https://github.com/delphiki/AirStatus.git
+ source = airstatus.service
+ sha256sums = SKIP
+ sha256sums = dc74cf84be34ba277b1e684eff8a9726600e6cc1dc9b06ffce811de01afbf8b3
+
+pkgname = airstatus-git
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..58a86211f276
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,30 @@
+# Maintainer: Mansour Behabadi <mansour@oxplot.com>
+
+pkgname=airstatus-git
+pkgver=20220109.db9de00
+pkgrel=1
+pkgdesc="Check AirPods battery levels on Linux"
+arch=('i686' 'x86_64')
+url="https://github.com/delphiki/AirStatus"
+license=('GPL')
+depends=('python' 'python-bleak')
+makedepends=('git')
+provides=('airstatus')
+conflicts=('airstatus')
+source=("git+https://github.com/delphiki/AirStatus.git"
+ "airstatus.service")
+sha256sums=('SKIP'
+ 'dc74cf84be34ba277b1e684eff8a9726600e6cc1dc9b06ffce811de01afbf8b3')
+
+pkgver() {
+ cd AirStatus
+ printf "%s.%s" "$(git show -s --format=%cs | tr -d -)" "$(git rev-parse --short HEAD)"
+}
+
+package() {
+ install -Dm644 airstatus.service -t "${pkgdir}/usr/lib/systemd/system"
+
+ cd AirStatus
+ install -Dm644 main.py "${pkgdir}/usr/lib/airstatus.py"
+ install -Dm644 LICENSE -t "${pkgdir}/usr/share/licenses/airstatus"
+}
diff --git a/airstatus.service b/airstatus.service
new file mode 100644
index 000000000000..9b4f48529ce3
--- /dev/null
+++ b/airstatus.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=AirPods Battery Monitor
+
+[Service]
+ExecStart=/usr/bin/python3 /usr/lib/airstatus.py /tmp/airstatus.out
+User=nobody
+Restart=always
+RestartSec=3
+
+[Install]
+WantedBy=default.target