summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 95c8aba97919a8987484770ec3a163a9af922514 (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
48
49
50
51
52
# Maintainer: Tinu Weber <http://ayekat.ch>

pkgname=perfutils-git
pkgver=r94.5676231
pkgrel=1
arch=(x86_64)

pkgdesc='Collection of eclectic tools for measuring performance using the cycle counter and pinning threads'
license=('custom:ISC')
url='https://github.com/PlatformLab/PerfUtils'

source=('git+https://github.com/PlatformLab/PerfUtils'
        perfutils.pc)
sha256sums=(SKIP
            SKIP)

provides=(${pkgname%-git})
conflicts=(${pkgname%-git})

depends=(gcc-libs glibc)
makedepends=(git)

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

build() {
  cd PerfUtils
  make
  g++ -shared obj/*.o -o obj/libPerfUtils.so
}

package() {
  cd PerfUtils

  # libraries
  install -dm0755 "$pkgdir"/usr/lib
  install -Dm0755 obj/libPerfUtils.{a,so} "$pkgdir"/usr/lib/
  ln -sf libPerfUtils.so "$pkgdir"/usr/lib/libPerfUtils.so.0

  # headers
  install -dm0755 "$pkgdir"/usr/include/PerfUtils
  install -m0644 include/PerfUtils/* "$pkgdir"/usr/include/PerfUtils/

  # pkgconf
  install -Dm0644 "$srcdir"/perfutils.pc "$pkgdir"/usr/lib/pkgconfig/perfutils.pc

  # misc
  install -Dm0644 README.md "$pkgdir"/usr/share/doc/"${pkgname%-git}"/README.md
  install -Dm0644 LICENSE "$pkgdir"/usr/share/licenses/"${pkgname%-git}"/LICENSE
}