summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 195ed09c5e30d6d7a64e4e14dffdb305557e0ef7 (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
31
# Maintainer:Lucas Eduardo Wendt <lucas59356@gmail.com>

pkgname=batmon-git
pkgver=r5.2b8ae64
depends=('python')
makedepends=()
pkgrel=1
arch=(any)
pkgdesc="Monitores the battery level and saves somewhere for future analysis"
license=("custom")
options=(!strip)
url="https://github.com/lucasew/batmon"
install=batmon-git.install
source=("batmon::git+https://github.com/lucasew/batmon/")
sha256sums=("SKIP")

pkgver() {
  cd "batmon"
  ( set -o pipefail
    git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
  )
}

package() {
    mkdir $pkgdir/usr/bin -p
    cp $srcdir/batmon/batmond $pkgdir/usr/bin
    chmod +x $pkgdir/usr/bin/batmond
    mkdir $pkgdir/etc/systemd/system -p
    cp $srcdir/batmon/batmond.service $pkgdir/etc/systemd/system
}