upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / ruby-trenni / trunk / PKGBUILD
blob9b7394ca2061cda2da21de4570db0579e30cd40e
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
3 pkgname=ruby-trenni
4 pkgver=3.14.0
5 pkgrel=2
6 pkgdesc='A fast native templating system that compiles directly to Ruby code'
7 arch=(x86_64)
8 url='https://github.com/ioquatix/trenni'
9 license=(MIT)
10 depends=(ruby)
11 makedepends=(ragel ruby-bake ruby-benchmark-ips ruby-covered ruby-rack ruby-nokogiri)
12 checkdepends=(ruby-rspec)
13 options=(!emptydirs)
14 source=(https://github.com/ioquatix/trenni/archive/v$pkgver/$pkgname-$pkgver.tar.gz)
15 sha256sums=('7c45d5d27f75843df66a8857d03db687220b748e9b92bb970bd7aaf3ab45dfab')
17 prepare() {
18   cd trenni-$pkgver
19   sed -e 's/~>/>=/' -i trenni.gemspec
20   sed -i '/ruby-prof/d;/bake-gem/d;/bake-modernize/d' gems.rb
23 build() {
24   local _gemdir="$(gem env gemdir)"
25   cd trenni-$pkgver
26   bake trenni:parsers:generate
27   gem build trenni.gemspec
28   gem install \
29     --local \
30     --verbose \
31     --ignore-dependencies \
32     --no-user-install \
33     --install-dir "tmp_install/$_gemdir" \
34     --bindir "tmp_install/usr/bin" \
35     trenni-$pkgver.gem
36   find "tmp_install/$_gemdir/gems/" \
37     -type f \
38     \( \
39         -iname "*.o" -o \
40         -iname "*.c" -o \
41         -iname "*.so" -o \
42         -iname "*.time" -o \
43         -iname "gem.build_complete" -o \
44         -iname "Makefile" \
45     \) \
46     -delete
47   rm -r tmp_install/$_gemdir/cache
50 check() {
51   local _gemdir="$(gem env gemdir)"
52   cd trenni-$pkgver
53   GEM_HOME="tmp_install/$_gemdir" rspec
56 package() {
57   cd trenni-$pkgver
58   cp -a tmp_install/* "$pkgdir"/