summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 74cac12660f809b99e6bf8f67488200989305011 (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
41
42
43
44
45
46
47
# Maintainer: Chocobo1 <chocobo1 AT archlinux DOT net>

pkgname=sysfsutils-git
pkgver=2.1.1.r13.g085bba6
pkgrel=2
pkgdesc="A set of utilities for interfacing with system devices"
arch=('i686' 'x86_64')
url="https://linux-diag.sourceforge.net/Sysfsutils.html"
license=('GPL' 'LGPL')
depends=('glibc')
makedepends=('git')
provides=("sysfsutils=$pkgver")
conflicts=('sysfsutils')
options=('staticlibs')
source=("git+https://github.com/linux-ras/sysfsutils.git")
sha256sums=('SKIP')


pkgver() {
  cd "sysfsutils"

  _tag=$(git tag -l --sort -v:refname | sed '/rc[0-9]*/d' | head -n1)
  _rev=$(git rev-list --count $_tag..HEAD)
  _hash=$(git rev-parse --short HEAD)
  printf "%s.r%s.g%s" "$_tag" "$_rev" "$_hash" | sed 's/^v//'
}

build() {
  cd "sysfsutils"

  ./autogen
  ./configure \
    --prefix="/usr"
  make
}

check() {
  cd "sysfsutils"

  make check
}

package() {
  cd "sysfsutils"

  make DESTDIR="$pkgdir" install
}