summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-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 00000000000..942e37075b6
--- /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 00000000000..58a86211f27
--- /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 00000000000..9b4f48529ce
--- /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