upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / ruby-introspection / trunk / PKGBUILD
blobf724b4908dcb17c11cf95e4631d6b575ede8481d
1 # Maintainer:: Tim Meusel <tim@bastelfreak.de>
3 _gemname=introspection
4 pkgname="ruby-${_gemname}"
5 pkgver=0.0.4
6 pkgrel=2
7 pkgdesc='Dynamic inspection of the hierarchy of method definitions on a Ruby object.'
8 arch=('any')
9 url="https://github.com/floehopper/${_gemname}"
10 license=('MIT')
11 depends=('ruby')
12 checkdepends=('ruby-rake')
13 makedepends=('ruby-minitest' 'ruby-metaclass')
14 options=('!emptydirs')
15 source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz"
16         'disable-bundler.patch'
17         'disable-blankslate.patch')
18 sha512sums=('0e5820fb31a69e561faa10bd9871a6dcffc6b1e452c543971244cfb65cb0237fbe50b2137006606db18f856957156a3b2ee521b05be7cae7e7602d1489d3e15f'
19             'f95a588a4184a13b4e7a56cd62d115d8dfc79a8cec143b45a632be816403f603f8eeb0b17575b2ef743317ab16e2c67f7b9fbb6bba0cb488b3b66f9186cda408'
20             '963fadf5411ad142d7dd72b7564289ef8b135d787e8596a2cef68b692da886f6a234a6373d3f926af5010414cc4a091cdd38c4c5e52536f7441bdea13de6549a')
22 prepare() {
23   cd "${_gemname}-${pkgver}"
25   # `git` doesn't work within src dir, because we downloaded an archive
26   sed --in-place 's|git ls-files|find|' ${_gemname}.gemspec
27   sed --in-place '/s.test_files/d' ${_gemname}.gemspec
28   sed --in-place '/s.executables/d' ${_gemname}.gemspec
30   patch --forward --verbose --strip=1 --input='../disable-bundler.patch'
31   patch --forward --verbose --strip=1 --input='../disable-blankslate.patch'
33   # Disable deprecated gemspec option
34   sed --in-place '/s.rubyforge_project/d' ${_gemname}.gemspec
37 check() {
38   cd "${_gemname}-${pkgver}"
39   rake test
42 build() {
43   cd "${_gemname}-${pkgver}"
44   gem build ${_gemname}.gemspec
47 package() {
48   cd "${_gemname}-${pkgver}"
49   local _gemdir="$(gem env gemdir)"
50   gem install --ignore-dependencies --no-user-install --install-dir "${pkgdir}${_gemdir}" --bindir "${pkgdir}/usr/bin" "${_gemname}-${pkgver}.gem"
51   install -Dm 644 README.md --target-directory "${pkgdir}/usr/share/doc/${pkgname}"
52   install -Dm 644 COPYING.txt --target-directory "${pkgdir}/usr/share/licenses/${pkgname}"
54   # delete unneeded files
55   rm "${pkgdir}/${_gemdir}/cache/${_gemname}-${pkgver}.gem"
56   rm -rf "${pkgdir}/${_gemdir}/gems/${_gemname}-${pkgver}/"{test,yard-templates,gemfiles,bin,.github,.gemtest,mocha.gemspec.orig}
59 # vim: ts=2 sw=2 et: