archrelease: copy trunk to community-any
[ArchLinux/community.git] / ruby-tins / trunk / PKGBUILD
blob946ae9e4708345edc40bb48e902cc7afcd6030eb
1 # Maintainer: George Rawlinson <grawlinson@archlinux.org>
2 # Contributor: Maxime Gauduin <alucryd@archlinux.org>
3 # Contributor: Julien Nicoulaud <julien.nicoulaud@gmail.com>
4 # Contributor: Hyacinthe Cartiaux <hyacinthe.cartiaux@free.fr>
6 pkgname=ruby-tins
7 _pkgname="${pkgname#ruby-}"
8 pkgver=1.32.1
9 pkgrel=1
10 pkgdesc='All the stuff that is not good/big enough for a real library'
11 arch=('any')
12 url='https://github.com/flori/tins'
13 license=('MIT')
14 depends=('ruby' 'ruby-sync')
15 makedepends=('git' 'ruby-rake')
16 options=('!emptydirs')
17 _commit='6e1d4309ae4bd0e7b0e21280336732a2f51311e2'
18 source=("$pkgname::git+$url#commit=$_commit")
19 b2sums=('SKIP')
21 pkgver() {
22   cd "$pkgname"
24   git describe --tags | sed 's/^v//'
27 build() {
28   cd "$pkgname"
30   gem build tins.gemspec
33 package() {
34   cd "$pkgname"
36   local _gemdir="$(ruby -e'puts Gem.default_dir')"
38   gem install \
39     --local \
40     --verbose \
41     --ignore-dependencies \
42     --no-user-install \
43     --install-dir "$pkgdir/$_gemdir" \
44     --bindir "$pkgdir/usr/bin" \
45     "$_pkgname-$pkgver.gem"
47   # delete cache
48   rm -rf "$pkgdir/$_gemdir/cache"
50   # license
51   install -vd "$pkgdir/usr/share/licenses/$pkgname"
52   ln -sf "$_gemdir/gems/$_pkgname-$pkgver/COPYING" "$pkgdir/usr/share/licenses/$pkgname"