archrelease: copy trunk to community-any
[ArchLinux/community.git] / ruby-sorted_set / repos / community-any / PKGBUILD
blob64837c0991694d257ed84a6c1ad2933a7a52e4de
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
3 pkgname=ruby-sorted_set
4 pkgver=1.0.3
5 _commit=3be5eb2c1a33cb78603abbfe423d188d355a240a
6 pkgrel=2
7 pkgdesc='Implements a variant of Set whose elements are sorted in ascending order'
8 arch=(any)
9 url='https://github.com/knu/sorted_set'
10 license=(BSD)
11 depends=(ruby-set ruby-rbtree)
12 makedepends=(git)
13 checkdepends=(ruby-rake ruby-test-unit)
14 options=(!emptydirs)
15 source=(git+https://github.com/knu/sorted_set.git#commit=$_commit)
16 sha256sums=('SKIP')
18 build() {
19   local _gemdir="$(gem env gemdir)"
20   cd sorted_set
21   gem build sorted_set.gemspec
22   gem install \
23     --local \
24     --verbose \
25     --ignore-dependencies \
26     --no-user-install \
27     --install-dir "tmp_install/$_gemdir" \
28     --bindir "tmp_install/usr/bin" \
29     sorted_set-$pkgver.gem
30   find "tmp_install/$_gemdir/gems/" \
31     -type f \
32     \( \
33         -iname "*.o" -o \
34         -iname "*.c" -o \
35         -iname "*.so" -o \
36         -iname "*.time" -o \
37         -iname "gem.build_complete" -o \
38         -iname "Makefile" \
39     \) \
40     -delete
41   rm -r tmp_install/$_gemdir/cache
44 check() {
45   local _gemdir="$(gem env gemdir)"
46   cd sorted_set
47   GEM_HOME="tmp_install/$_gemdir" rake
50 package() {
51   cd sorted_set
52   cp -a tmp_install/* "$pkgdir"/
53   install -Dm644 LICENSE.txt -t "$pkgdir"/usr/share/licenses/$pkgname/