archrelease: copy trunk to community-any
[ArchLinux/community.git] / ruby-minitest / trunk / PKGBUILD
blobfcc21b30bc5ae2de5e549630b551bb13450b9d6a
1 # Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
2 # Maintainer: Andreas 'Segaja' Schleifer <segaja at archlinux dot org>
3 # Contributor: Simon Kohlmeyer <simon.kohlmeyer@gmail.com>
5 _gemname='minitest'
6 pkgname="ruby-${_gemname}"
7 pkgver=5.16.3
8 pkgrel=1
9 pkgdesc='Complete suite of testing facilities supporting TDD, BDD, mocking, and benchmarking'
10 url="https://github.com/seattlerb/${_gemname}"
11 arch=('any')
12 license=('MIT')
13 depends=('ruby')
14 makedepends=('rubygems' 'ruby-hoe' 'ruby-rake' 'ruby-rdoc')
15 options=('!emptydirs')
16 source=("${url}/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz")
17 sha512sums=('f5ebd3994b42cefc1d0ecb6e18c8b39f41ea60fc5ec22d2cd27e3b09c34aa6085f44a8e096f08aad0c6f72c91cdf4cc22411327b6b3d95aa7a1f3aac459ecbda')
19 build() {
20   cd "${_gemname}-${pkgver}"
22   rake gem
25 check() {
26   cd "${_gemname}-${pkgver}"
28   rake test
31 package() {
32   cd "${_gemname}-${pkgver}"
34   local _gemdir="$(gem env gemdir)"
36   gem install \
37     --local \
38     --verbose \
39     --ignore-dependencies \
40     --no-user-install \
41     --install-dir "${pkgdir}/${_gemdir}" \
42     --bindir "${pkgdir}/usr/bin" \
43     "pkg/${_gemname}-${pkgver}.gem"
45   # remove unrepreducible files
46   rm --force --recursive --verbose \
47     "${pkgdir}/${_gemdir}/cache/" \
48     "${pkgdir}/${_gemdir}/gems/${_gemname}-${pkgver}/vendor/" \
49     "${pkgdir}/${_gemdir}/doc/${_gemname}-${pkgver}/ri/ext/"
51   find "${pkgdir}/${_gemdir}/gems/" \
52     -type f \
53     \( \
54       -iname "*.o" -o \
55       -iname "*.c" -o \
56       -iname "*.so" -o \
57       -iname "*.time" -o \
58       -iname "gem.build_complete" -o \
59       -iname "Makefile" \
60     \) \
61     -delete
63   find "${pkgdir}/${_gemdir}/extensions/" \
64     -type f \
65     \( \
66       -iname "mkmf.log" -o \
67       -iname "gem_make.out" \
68     \) \
69     -delete
71   install -Dm 644 README.rdoc History.rdoc -t "${pkgdir}/usr/share/doc/${pkgname}"
72   install -Dm 644 README.rdoc -t "${pkgdir}/usr/share/licenses/${pkgname}"
75 # vim: ts=2 sw=2 et: