upgpkg: ufw 0.36.2-1
[ArchLinux/community.git] / ruby-i18n / trunk / PKGBUILD
blobd9e7a1c01e45d5df72253c85073197c274d6138f
1 # Maintainer: David Runge <dvzrv@archlinux.org>
3 _name=i18n
4 pkgname=ruby-i18n
5 pkgver=1.12.0
6 pkgrel=1
7 pkgdesc="New wave internationalisation support for Ruby"
8 arch=(any)
9 url="https://github.com/ruby-i18n/i18n"
10 license=(MIT)
11 depends=(ruby ruby-concurrent)
12 makedepends=(ruby-rdoc)
13 checkdepends=(ruby-bundler ruby-activesupport ruby-json ruby-minitest ruby-mocha ruby-rake ruby-test_declarative)
14 options=(!emptydirs)
15 source=($pkgname-$pkgver.tar.gz::https://github.com/$pkgname/$_name/archive/v$pkgver.tar.gz)
16 sha512sums=('616db5b15febc7a8716ceafef6c51a24e2d050f8e27e389ef96d94cdc95f9704942079d1e6b502666a015a99deee169342482c9a808164700401c47f96da8f0d')
17 b2sums=('6818e5bdea156e9b6f7b33e319e5b5a5c3c9e7a799b56ded87ab2e27efa4effe730e23a8736b7374b8072c7ba4237a92619aeaad3a16c0bfe10fe73bf9c588d6')
19 prepare() {
20   cd $_name-$pkgver
21   # we do not do version pinning
22   sed -e 's,~>,>=,g' -i *.gemspec Gemfile Rakefile
23   # lockfiles should be removed
24   rm -fv Gemfile.lock
25   # do not rely on Gemfiles (unless the project *really* needs it)
26   rm -fv Gemfile
30 build() {
31   cd $_name-$pkgver
32   gem build $_name.gemspec
35 check(){
36   cd $_name-$pkgver
37   rake test
40 package() {
41   local _gemdir="$(gem env gemdir)"
43   cd "$_name-$pkgver"
44   gem install \
45     --ignore-dependencies \
46     --no-user-install \
47     --install-dir "$pkgdir/$_gemdir" \
48     --bindir "$pkgdir/usr/bin" \
49     "$_name-$pkgver.gem"
51   # remove unrepreducible files
52   rm -frv \
53     "$pkgdir/$_gemdir/cache/" \
54     "$pkgdir/$_gemdir/gems/$_name-$pkgver/vendor/" \
55     "$pkgdir/$_gemdir/doc/$_name-$pkgver/ri/ext/"
57   find "$pkgdir/$_gemdir/gems/" \
58     -type f \
59     \( \
60         -iname "*.o" -o \
61         -iname "*.c" -o \
62         -iname "*.so" -o \
63         -iname "*.time" -o \
64         -iname "gem.build_complete" -o \
65         -iname "Makefile" \
66     \) \
67     -delete
69   find "$pkgdir/$_gemdir/extensions/" \
70     -type f \
71     \( \
72       -iname "mkmf.log" -o \
73       -iname "gem_make.out" \
74     \) \
75     -delete
77   install -vDm 644 MIT-LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"