1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
6 pkgdesc='Ruby method to unindent strings'
8 url='https://github.com/mynyml/unindent'
11 makedepends=(ruby-nanotest ruby-rake)
13 source=(https://github.com/mynyml/unindent/archive/v$pkgver/$pkgname-$pkgver.tar.gz)
14 sha256sums=('2d8457406a66d821f458385a51aabd4f77ff19eb53687a38b309d51ab15f080d')
18 # https://github.com/mynyml/unindent/pull/2
19 sed -i 's/-rubygems//' Rakefile
23 local _gemdir="$(gem env gemdir)"
25 gem build unindent.gemspec
29 --ignore-dependencies \
31 --install-dir "tmp_install/$_gemdir" \
32 --bindir "tmp_install/usr/bin" \
34 find "tmp_install/$_gemdir/gems/" \
41 -iname "gem.build_complete" -o \
45 rm -r tmp_install/$_gemdir/cache
49 local _gemdir="$(gem env gemdir)"
51 GEM_HOME="tmp_install/$_gemdir" rake
56 cp -a tmp_install/* "$pkgdir"/
57 install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/