archrelease: copy trunk to community-any
[ArchLinux/community.git] / ruby-toml / repos / community-any / PKGBUILD
blob2eca407e74c048fcb6754dfb72e76e66761a48b9
1 # Maintainer: Tim Meusel <tim@bastelfreak.de>
3 _gemname='toml'
4 pkgname="ruby-${_gemname}"
5 pkgver=0.3.0
6 pkgrel=1
7 pkgdesc='Parser construction library with great error reporting in Ruby'
8 arch=('any')
9 url="https://github.com/jm/${_gemname}"
10 license=('MIT')
11 makedepends=('ruby-rake' 'ruby-rdoc' 'ruby-bundler')
12 checkdepends=('ruby-multi_json' 'ruby-minitest')
13 depends=('ruby' 'ruby-parslet')
14 source=("${url}/archive/v${pkgver}/v${pkgname}-${pkgver}.tar.gz" 'disable_simplecov.patch' 'toml.gemspec.patch')
15 options=("!emptydirs")
16 sha512sums=('5b09fdb1ca54ea06637e5aaf76b5232dcc39318c048090b3bc8bae659b39e386057ab3758fb647b65c752af7996295902517962cf5bec765fe74d70bd6ffbc7b'
17             'c363263059cad44c3faa10553f1d8760c6f3cc072efa1f1cbdcf0a715da4173e9fac98dabdf72144d796c2ebc1496554438096018a1e41c088f8e513e0d8efdb'
18             '1e2fb6c1758fc8e4c76193896d838380648e123e851640872198ef3192a9bcf5e2e0044a3ba55091475380e3339f32d9a80a199072687cc573d8a5ba1c13ffbe')
20 prepare() {
21   cd "${_gemname}-${pkgver}"
22   sed --in-place '/simplecov/d' Gemfile
23   patch --forward --verbose --strip=1 --input='../disable_simplecov.patch'
24   patch --forward --verbose --strip=1 --input='../toml.gemspec.patch'
27 build() {
28   cd "${_gemname}-${pkgver}"
29   gem build "${_gemname}.gemspec"
32 check() {
33   cd "${_gemname}-${pkgver}"
34   rake test
37 package() {
38   cd "${_gemname}-${pkgver}"
39   local _gemdir="$(gem env gemdir)"
40   gem install --verbose --ignore-dependencies --no-user-install --install-dir "${pkgdir}/${_gemdir}" --bindir "${pkgdir}/usr/bin" "${_gemname}-${pkgver}.gem"
42   install -Dm 644 README.md CHANGELOG.md -t "${pkgdir}/usr/share/doc/${pkgname}"
43   install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}/"
45   rm -rf "${pkgdir}/${_gemdir}/cache"
48 # vim: ts=2 sw=2 et: