summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b344e28cad467a8c83696cfd69939e3de2b344fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Generated by gem2arch (https://github.com/anatol/gem2arch)
# Maintainer: q234 rty <q23456yuiop at gmail dot com>
# Contributor: Brandon Mulcahy <brandon@lightcones.net>

_gemname=taglib-ruby
pkgname=ruby-$_gemname
pkgver=2.0.0
pkgrel=1
pkgdesc='Ruby interface for the taglib C++ library'
arch=(i686 x86_64)
url='http://robinst.github.io/taglib-ruby/'
license=(MIT)
depends=(ruby taglib)
makedepends=(ruby-rdoc)
options=(!emptydirs)
source=(https://rubygems.org/downloads/$_gemname-$pkgver.gem)
noextract=($_gemname-$pkgver.gem)
sha256sums=('51b90f23ab2d775921a097690fcc772b5009f60b1f913ee4f40b3a9afeccb1ae')

package() {
  local _gemdir="$(ruby -e'puts Gem.default_dir')"
  gem install --ignore-dependencies --no-user-install -i "$pkgdir/$_gemdir" -n "$pkgdir/usr/bin" $_gemname-$pkgver.gem
  # remove unrepreducible files
  rm --force --recursive --verbose \
    "${pkgdir}/${_gemdir}/cache/" \
    "${pkgdir}/${_gemdir}/gems/${_gemname}-${pkgver}/vendor/" \
    "${pkgdir}/${_gemdir}/doc/${_gemname}-${pkgver}/ri/ext/"
  find "${pkgdir}/${_gemdir}/gems/" \
    -type f \
    \( \
      -iname "*.o" -o \
      -iname "*.c" -o \
      -iname "*.so" -o \
      -iname "*.time" -o \
      -iname "gem.build_complete" -o \
      -iname "Makefile" \
    \) \
    -delete
  find "${pkgdir}/${_gemdir}/extensions/" \
    -type f \
    \( \
      -iname "mkmf.log" -o \
      -iname "gem_make.out" \
    \) \
    -delete
  install -D -m644 "$pkgdir/$_gemdir/gems/$_gemname-$pkgver/LICENSE.txt" "$pkgdir/usr/share/licenses/$pkgname/LICENSE.txt"
}