archrelease: copy trunk to community-any
[ArchLinux/community.git] / ruby-elftools / trunk / PKGBUILD
blob97828a36f21ddff7f31340c5344d66912c795f70
1 # Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
2 # Contributor: Bet4 <0xbet4@gmail.com>
4 _gemname=elftools
5 pkgname=ruby-${_gemname}
6 pkgver=1.2.0
7 pkgrel=1
8 pkgdesc='ELF parser library implemented in pure Ruby'
9 url='https://github.com/david942j/rbelftools/'
10 arch=('any')
11 license=('MIT')
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')
19 prepare() {
20   cd rbelftools-${pkgver}
21   sed -r 's|~>|>=|g' -i ${_gemname}.gemspec
24 build() {
25   cd rbelftools-${pkgver}
26   gem build ${_gemname}.gemspec
29 package() {
30   cd rbelftools-${pkgver}
31   local _gemdir="$(gem env gemdir)"
32   gem install \
33     --local \
34     --verbose \
35     --ignore-dependencies \
36     --no-user-install \
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}
49 # vim: ts=2 sw=2 et: