upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / ruby-patience_diff / trunk / PKGBUILD
blob68977ca2646e9b6ea2ddf7fb1435b987088e0cdb
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
3 pkgname=ruby-patience_diff
4 pkgver=1.2.0
5 pkgrel=1
6 pkgdesc='A Ruby implementation of the Patience diff algorithm'
7 arch=(any)
8 url='https://github.com/watt/ruby_patience_diff'
9 license=(MIT)
10 depends=(ruby-optimist)
11 makedepends=(ruby-hoe ruby-rake)
12 options=(!emptydirs)
13 source=(https://github.com/watt/ruby_patience_diff/archive/v$pkgver/$pkgname-$pkgver.tar.gz)
14 sha256sums=('3c767f112c46ff7a4f42224897786187c845bacd06882fb3cfdf40208c6ac142')
16 prepare() {
17   cd ruby_patience_diff-$pkgver
18   sed -r -e 's|~>|>=|' -i Rakefile
21 build() {
22   local _gemdir="$(gem env gemdir)"
23   cd ruby_patience_diff-$pkgver
24   rake gem
25   gem install \
26     --local \
27     --verbose \
28     --ignore-dependencies \
29     --no-user-install \
30     --install-dir "tmp_install/$_gemdir" \
31     --bindir "tmp_install/usr/bin" \
32     pkg/patience_diff-$pkgver.gem
33   find "tmp_install/$_gemdir/gems/" \
34     -type f \
35     \( \
36         -iname "*.o" -o \
37         -iname "*.c" -o \
38         -iname "*.so" -o \
39         -iname "*.time" -o \
40         -iname "gem.build_complete" -o \
41         -iname "Makefile" \
42     \) \
43     -delete
44   rm -r tmp_install/$_gemdir/cache
47 check() {
48   local _gemdir="$(gem env gemdir)"
49   cd ruby_patience_diff-$pkgver
50   GEM_HOME="tmp_install/$_gemdir" rake test
53 package() {
54   cd ruby_patience_diff-$pkgver
55   cp -a tmp_install/* "$pkgdir"/