summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 7d484817520b38622c6c598b464ecdaf3387813b (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
# Maintainer: George Rawlinson <george@rawlinson.net.nz>

pkgname=ruby-sigdump
_pkgname="${pkgname#ruby-}"
pkgver=0.2.5
pkgrel=1
pkgdesc='Use signal to show stacktrace of a Ruby process without restarting it'
arch=('any')
url='https://github.com/fluent/sigdump'
license=('Apache')
depends=('ruby')
makedepends=('git')
options=('!emptydirs')
_commit='5be55405d18b43e70f30fb397376014a88d4b8fd'
source=("$pkgname::git+$url#commit=$_commit")
b2sums=('SKIP')

pkgver() {
  cd "$pkgname"

  git describe --tags | sed 's/^v//'
}

build() {
  cd "$pkgname"

  gem build "$_pkgname.gemspec"
}

package() {
  cd "$pkgname"

  local _gemdir="$(gem env gemdir)"

  gem install \
    --local \
    --verbose \
    --ignore-dependencies \
    --no-user-install \
    --install-dir "$pkgdir/$_gemdir" \
    --bindir "$pkgdir/usr/bin" \
    "$_pkgname-$pkgver.gem"

  # delete cache
  rm -rf "$pkgdir/$_gemdir/cache"
}