upgpkg: ufw 0.36.2-1
[ArchLinux/community.git] / ruby-bump / trunk / PKGBUILD
blob5537b693705eef65988a5bc76a214ca2f898309b
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
3 pkgname=ruby-bump
4 pkgver=0.10.0
5 _commit=73c206174ca02549d120402b9a007db0d0bc9699
6 pkgrel=2
7 pkgdesc='Bump your gem version file'
8 arch=(any)
9 url='https://github.com/gregorym/bump'
10 license=(MIT)
11 depends=(ruby)
12 makedepends=(git)
13 checkdepends=(ruby-byebug ruby-rake ruby-rspec ruby-rubocop)
14 options=(!emptydirs)
15 source=(git+https://github.com/gregorym/bump.git#commit=$_commit)
16 sha256sums=('SKIP')
18 prepare() {
19   cd bump
20   git config --global user.email "pony@arch"
21   git config --global user.name "Lucky Pony"
24 build() {
25   local _gemdir="$(gem env gemdir)"
26   cd bump
27   gem build bump.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     bump-$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 bump
53   GEM_HOME="../tmp_install/$_gemdir" rake spec
56 package() {
57   cd bump
58   cp -a ../tmp_install/* "$pkgdir"/
59   install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/