summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 53b03705e1c1912a51f471dc563947788097b096 (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
32
33
34
35
36
37
38
39
40
# Maintainer: Manuel Palenzuela <sadshinobi@protonmail.com>

author=Baitinq
pkgname=coreboot-battery-threshold-git
_gitname=coreboot-battery-threshold
pkgver=0
pkgrel=1
pkgdesc='Simple script to set battery thresholds on coreboot devices.'
url='https://github.com/Baitinq/coreboot-battery-threshold.git'
arch=('any')
license=('GPL')
depends=('ectool')
makedepends=('git')
provides=('coreboot-battery-threshold')

source=("git://github.com/$author/$_gitname.git")

md5sums=('SKIP')
sha1sums=('SKIP')
sha256sums=('SKIP')

pkgver() {
    cd "$_gitname"
    printf '0.r%s.%s' \
        "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

package() {
  cd "$srcdir/$_gitname"

  # Install the program.
  mkdir -p "$pkgdir/usr/share/$_gitname"
  install -Dm755 coreboot-battery-threshold "${pkgdir}/usr/bin/$_gitname"
  chmod +x "$pkgdir/usr/bin/$_gitname"
  install -Dm 644 $pkgbase.service \
    "$pkgdir/etc/systemd/system/$pkgbase.service"
  cp -a --no-preserve=ownership * "$pkgdir/usr/share/$_gitname"
  chmod -R 777 "$pkgdir/usr/share/$_gitname"

}