summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 6ee00175547e25504acd5dbb2caad206bb8012a9 (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
# shellcheck shell=bash
# Maintainer: Chinmay Dalal <w5vwg64uy at relay dot firefox dot com>

pkgname=powertop-git
_pkgname=powertop
pkgver=2.15.r11.g9beafe3
pkgrel=1
pkgdesc='A tool to diagnose issues with power consumption and power management, git version'
arch=('i686' 'x86_64')
url='https://01.org/powertop/'
license=('GPL2')
makedepends=('git' 'autoconf-archive')
depends=('gcc-libs' 'libnl' 'ncurses' 'pciutils' 'libtracefs')
provides=("$_pkgname")
conflicts=("$_pkgname")
source=(git+https://github.com/fenrus75/powertop.git)
sha256sums=('SKIP')

# template start; name=git-pkgver-r; version=1.0;
pkgver() {
    cd "${srcdir}/${_pkgname}"
    git describe --tags --long | sed -E 's/([^-]+-g)/r\1/;s/-/./g;s/^v//g'
}

build() {
    cd "${srcdir}/${_pkgname}"

    ./autogen.sh
    ./configure --prefix=/usr
    make
}

package() {
    cd "${srcdir}/${_pkgname}"

    make DESTDIR="${pkgdir}" install
    mv "${pkgdir}/usr/sbin" "${pkgdir}/usr/bin"
}