summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 2b65d91a301ced137fe50b6684c7f716d07442f8 (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
# Contributor: Alexandre Bolelli <t3k0@live.com>
# Maintainer: Alexandre Bolelli <t3k0@live.com>

pkgname=powersave-git
pkgver=r2.180aa76
pkgrel=1
pkgdesc="Powersave for Dell Inspiron 15 Serie 5000 (i15-5558-B30)"
arch=('x86_64')
url="https://github.com/semeion/${pkgname%-git}"
conflicts=('indicator-powersave')
license=('GPL3')
makedepends=('git')
depends=('systemd')
source=("git+${url}.git")
sha256sums=('SKIP')

pkgver() {
    #cd "$srcdir/${pkgname%-git}"
    cd "${pkgname%-git}"
    # printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

package() {
    #cd "$srcdir"
    # add systemd service
    cd "../src/${pkgname%-git}"
    install -Dm0755 -- 00-powersave "${pkgdir}/usr/lib/systemd/system-sleep/00-powersave"
    install -Dm0755 -- 99-powersave.rules "${pkgdir}/etc/udev/rules.d/99-powersave.rules"
    install -Dm0755 -- low-battery "${pkgdir}/usr/bin/low-battery"
    install -Dm0755 -- low-battery.service "${pkgdir}/usr/lib/systemd/system/low-battery.service"
    install -Dm0755 -- low-battery.timer "${pkgdir}/usr/lib/systemd/system/low-battery.timer"
    install -Dm0755 -- throttle "${pkgdir}/usr/bin/throttle"
}