1 # Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
2 # Contributor: Bet4 <0xbet4@gmail.com>
5 pkgname=ruby-${_gemname}
8 pkgdesc='ELF parser library implemented in pure Ruby'
9 url='https://github.com/david942j/rbelftools/'
12 depends=('ruby' 'ruby-bindata')
13 makedepends=('ruby-rake' 'ruby-rdoc' 'ruby-bundler')
14 options=('!emptydirs')
15 source=(${url}/archive/v${pkgver}/${pkgname}-v${pkgver}.tar.gz)
16 sha512sums=('8f5ef2b96f42ab2e06a203fea53bafbd14a08cbd0c60df1ce1fcdd5b4de45c77720f96d1ab551ce9f93ff94a50bb81ad7561c4540379ea4b2c888db446149a5f')
17 b2sums=('03790ccf38fe1adaf6cf7427ac7cc69f122a72d0bba2005690b2436e2f3806e944ed3bb80b83fe671142f1e56919562c280bb84ebd33e868cdd9ad01b7455959')
20 cd rbelftools-${pkgver}
21 sed -r 's|~>|>=|g' -i ${_gemname}.gemspec
25 cd rbelftools-${pkgver}
26 gem build ${_gemname}.gemspec
30 cd rbelftools-${pkgver}
31 local _gemdir="$(gem env gemdir)"
35 --ignore-dependencies \
37 --install-dir "${pkgdir}${_gemdir}" \
38 --bindir "${pkgdir}/usr/bin" \
39 ${_gemname}-${pkgver}.gem
41 install -Dm 644 README.md -t "${pkgdir}/usr/share/doc/${pkgname}"
42 install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
44 cd "${pkgdir}/${_gemdir}"
45 rm -rf cache gems/${_gemname}-${pkgver}/{ext,lib/*/*.so,man} \
46 extensions/*/*/${_gemname}-${pkgver}/{mkmf.log,gem_make.out}