summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 4bde0e7f7801b037c97a79a569da0b8346006945 (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
# Maintainer: Troy Engel <troyengel+arch@gmail.com>

pkgname='perf-tools'
pkgdesc='Performance analysis tools based on Linux perf_events (aka perf) and ftrace'
pkgver=1.0
pkgrel=1
arch=('any')
url='https://github.com/brendangregg/perf-tools'
depends=('perf')
conflicts=('perf-tools-git')
license=('GPL')
source=(perf-tools-"$pkgver".tar.gz::https://github.com/brendangregg/perf-tools/archive/v"$pkgver".tar.gz)
sha256sums=('2d4e964e9b5d97b0ecf33a4e4e627692b65abeaad1b104976a09c57487c208ee')

package () {
  cd "${pkgname}-${pkgver}"

  local file
  for file in bin/*
  do
    if [[ -L ${file} ]] ; then
      file=$(readlink -f "${file}")
    fi
    local basename=${file##*/}
    install -Dm755 "${file}" "${pkgdir}/usr/bin/${basename}"
    if [[ -r man/man8/${basename}.8 ]]
    then
      install -Dm644 "man/man8/${basename}.8" \
        "${pkgdir}/usr/share/man/man8/${basename}.8"
    fi
  done

  install -m755 -d "${pkgdir}/usr/share/doc/${pkgname}"
  install -m644 -t "${pkgdir}/usr/share/doc/${pkgname}" \
    README.md examples/*
}