archrelease: copy trunk to community-x86_64
[ArchLinux/community.git] / ruby-build-environment / trunk / PKGBUILD
blobd4059cbb35a68c30232c658e0839db80f06a8df5
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
3 pkgname=ruby-build-environment
4 pkgver=1.13.0
5 _commit=6e8cb7f5ca00a8194dea5a6e01b5c92a2b48f8d1
6 pkgrel=3
7 pkgdesc='A nested hash data structure for controlling build environments'
8 arch=(any)
9 url='https://github.com/ioquatix/build-environment'
10 license=(MIT)
11 depends=(ruby)
12 makedepends=(git)
13 checkdepends=(ruby-covered ruby-rspec ruby-rake)
14 options=(!emptydirs)
15 source=(git+https://github.com/ioquatix/build-environment.git#commit=$_commit)
16 sha256sums=('SKIP')
18 prepare() {
19   cd build-environment
20   sed -r -e 's|~>|>=|g' -i build-environment.gemspec
23 build() {
24   local _gemdir="$(gem env gemdir)"
25   cd build-environment
26   gem build build-environment.gemspec
27   gem install \
28     --local \
29     --verbose \
30     --ignore-dependencies \
31     --no-user-install \
32     --install-dir "tmp_install/$_gemdir" \
33     --bindir "tmp_install/usr/bin" \
34     build-environment-$pkgver.gem
35   find "tmp_install/$_gemdir/gems/" \
36     -type f \
37     \( \
38         -iname "*.o" -o \
39         -iname "*.c" -o \
40         -iname "*.so" -o \
41         -iname "*.time" -o \
42         -iname "gem.build_complete" -o \
43         -iname "Makefile" \
44     \) \
45     -delete
46   rm -r tmp_install/$_gemdir/cache
49 check() {
50   local _gemdir="$(gem env gemdir)"
51   cd build-environment
52   GEM_HOME="tmp_install/$_gemdir" rake
55 package() {
56   cd build-environment
57   cp -a tmp_install/* "$pkgdir"/