archrelease: copy trunk to community-any
[ArchLinux/community.git] / ruby-rake-compiler / trunk / PKGBUILD
blobd3d5241ddaaf68349c12276d57309a5250bc2a9d
1 # Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
3 _gemname=rake-compiler
4 pkgname=ruby-${_gemname}
5 pkgver=1.2.0
6 pkgrel=1
7 pkgdesc='Rake-based Ruby Extension (C, Java) task generator'
8 url='https://github.com/rake-compiler/rake-compiler'
9 arch=('any')
10 license=('MIT')
11 depends=('ruby' 'rubygems' 'ruby-rake')
12 makedepends=('ruby-rdoc')
13 options=('!emptydirs')
14 source=(https://github.com/rake-compiler/rake-compiler/archive/v${pkgver}/${pkgname}-v${pkgver}.tar.gz)
15 sha512sums=('77b6dd8b976039484ec7d6bb9e0b2432d40153f218ce2e1d242246711d40dc3ed9be7ba6ec99ee8fd89192ab04d5d1a97b4d1c089c86c7d20b163eb8d4ae68d5')
16 b2sums=('56394a2a8d6761f0f36bbc9fa63b2c36e57a33ba6c0bc660f31ef671e9fa90c581d65acb218ba8699dda7793fe6b8eac03e988c9a6dd486df422fd1228bc8b72')
18 prepare() {
19   cd ${_gemname}-${pkgver}
20   sed -r 's|~>|>=|g' -i ${_gemname}.gemspec
23 build() {
24   cd ${_gemname}-${pkgver}
25   gem build ${_gemname}.gemspec
28 package() {
29   cd ${_gemname}-${pkgver}
30   local _gemdir="$(gem env gemdir)"
31   gem install --ignore-dependencies --no-user-install -i "${pkgdir}${_gemdir}" \
32     -n "${pkgdir}/usr/bin" ${_gemname}-${pkgver}.gem
33   install -Dm 644 LICENSE.txt -t "${pkgdir}/usr/share/licenses/${pkgname}"
34   install -Dm 644 README.md History.md -t "${pkgdir}/usr/share/doc/${pkgname}"
36   cd "${pkgdir}/${_gemdir}"
37   rm -rf cache gems/${_gemname}-${pkgver}/{ext,lib/*/*.so} \
38     extensions/*/*/${_gemname}-${pkgver}/{mkmf.log,gem_make.out}
41 # vim: ts=2 sw=2 et: