summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 58a86211f276c25a0de7da63c39f8e56b2797c6a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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"
}