summaryrefslogtreecommitdiff
path: root/pcr/ruby-asciidoctor/PKGBUILD
blob: 40b42f71d87663a27ef29fddbc331f567a2b4a39 (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
# Generated by gem2arch (https://github.com/anatol/gem2arch)
# Contributor (AUR): Nicolas Bigaouette <nbigaouette@chemcomp.com>
# Maintainer (AUR): Nick Østergaard <oe.nick at gmail dot com>

_gemname=asciidoctor
pkgname=ruby-$_gemname
pkgver=1.5.8
pkgdesc='An implementation of the AsciiDoc text processor and publishing toolchain in Ruby'
url='http://asciidoctor.org'
license=(MIT)

pkgrel=1
arch=(any)
depends=(ruby)
makedepends=(rubygems)
options=(!emptydirs)
source=($pkgname-$pkgver.tar.gz::https://github.com/asciidoctor/asciidoctor/archive/v$pkgver.tar.gz)
sha256sums=('bc225145feb7876bce5188aa3ef511fad49b141ec18e1bb60e69b33b0a100da0')

build() {
  cd "$srcdir/$_gemname-$pkgver"

  gem build $_gemname.gemspec
}

package() {
  cd "$srcdir/$_gemname-$pkgver"

  local _gemdir="$(ruby -rubygems -e'puts Gem.default_dir')"
  gem install --no-user-install --ignore-dependencies -i "$pkgdir$_gemdir" -n "$pkgdir/usr/bin" \
    "$_gemname-$pkgver.gem"

  install -Dm644 "$pkgdir$_gemdir"/gems/$_gemname-$pkgver/LICENSE \
                 "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}