archrelease: copy trunk to community-any
[ArchLinux/community.git] / ruby-msgpack / repos / community-x86_64 / PKGBUILD
blob5fb92b0655f98482c8a1a1da71554234474efb24
1 # Maintainer: Thore Bödecker <foxxx0@archlinux.org>
2 # Maintainer: Tim Meusel <tim@bastelfreak.de>
4 _gemname=msgpack
5 pkgname="ruby-${_gemname}"
6 pkgver=1.7.0
7 pkgrel=1
8 pkgdesc='MessagePack implementation for Ruby'
9 url='https://github.com/msgpack/msgpack-ruby'
10 arch=('x86_64')
11 license=('Apache')
12 depends=('ruby')
13 makedepends=('ruby-rdoc' 'ruby-rake' 'ruby-rake-compiler' 'ruby-yard' 'ruby-rspec' 'ruby-bundler' 'ruby-webrick' 'ruby-ruby_memcheck')
14 options=('!emptydirs')
15 source=("${url}/archive/v${pkgver}/${pkgname}-v${pkgver}.tar.gz")
16 sha256sums=('4cabaefef28a5790be19699e07cbd7764a00fe5db48bb183f56648421480958f')
17 sha512sums=('716d4cd6bac3e57b82fa5a5560fb9c712477e67d440eb91a86eeac3999ff9cf9c4f39a1fd23d5ea6d65f8e764691405f671ba861903535597e7b48c9c615fd8d')
19 prepare() {
20   cd "${_gemname}-ruby-${pkgver}"
21   sed 's|git ls-files -z|find -print0|' -i "${_gemname}.gemspec"
22   sed 's|~>|>=|g' -i Gemfile
25 build() {
26   cd "${_gemname}-ruby-${pkgver}"
27   rake compile
28   rake build
29   rake clean
32 check() {
33   cd "${_gemname}-ruby-${pkgver}"
34   rake spec
37 package() {
38   cd "${_gemname}-ruby-${pkgver}"
39   local _gemdir="$(gem env gemdir)"
40   gem install \
41     --ignore-dependencies \
42     --no-user-install \
43     --install-dir "${pkgdir}/${_gemdir}" \
44     --bindir "${pkgdir}/usr/bin"  \
45     "pkg/${_gemname}-${pkgver}.gem"
47   install -Dm 644 README.md -t "${pkgdir}/usr/share/doc/${pkgname}"
48   install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
50   rm -rf "${pkgdir}/${_gemdir}/doc/${_gemname}-${pkgver}/ri/ext"
52   cd "${pkgdir}/${_gemdir}"
53   rm -r cache gems/"${_gemname}-${pkgver}"/{ext,tmp,lib/*/*.so} \
54     extensions/*/*/"${_gemname}-${pkgver}"/{mkmf.log,gem_make.out}
57 # vim: ts=2 sw=2 et: