1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
5 _commit=7e5efd7bb8ef8513f4a8d39f738d6dcb4310addf
7 pkgdesc='Heavily tested yet simple filelocking solution using flock'
9 url='https://github.com/sheerun/filelock'
13 checkdepends=(ruby-rspec)
15 source=(git+https://github.com/sheerun/filelock.git#commit=$_commit)
20 # https://github.com/sheerun/filelock/pull/17
21 git cherry-pick -n 86ca5bc5a38c126a5e9262a7b10251fa79f7c118
25 local _gemdir="$(gem env gemdir)"
27 gem build filelock.gemspec
31 --ignore-dependencies \
33 --install-dir "tmp_install/$_gemdir" \
34 --bindir "tmp_install/usr/bin" \
36 find "tmp_install/$_gemdir/gems/" \
43 -iname "gem.build_complete" -o \
47 rm -r tmp_install/$_gemdir/cache
51 local _gemdir="$(gem env gemdir)"
53 GEM_HOME="tmp_install/$_gemdir" rspec
58 cp -a tmp_install/* "$pkgdir"/
59 install -Dm644 LICENSE.txt -t "$pkgdir"/usr/share/licenses/$pkgname/