archrelease: copy trunk to community-any
[ArchLinux/community.git] / ruby-locale / trunk / PKGBUILD
blob2d285a2bdaead818f2992d9427697a1507d3cca2
1 # Maintainer: Tim Meusel <tim@bastelfreak.de>
2 # Contributor: VojtÄ›ch Aschenbrenner <v@asch.cz>
4 _gemname='locale'
5 pkgname="ruby-${_gemname}"
6 pkgver=2.1.3
7 pkgrel=3
8 pkgdesc='A pure ruby library which provides basic and general purpose APIs for localization.'
9 arch=('any')
10 url="https://github.com/ruby-gettext/locale"
11 license=('RUBY' 'LGPL3')
12 makedepends=('ruby-rdoc' 'ruby-rake' 'ruby-bundler' 'ruby-yard')
13 checkdepends=('ruby-test-unit' 'ruby-test-unit-rr')
14 depends=('ruby')
15 options=(!emptydirs)
16 source=("${url}/archive/${pkgver}/${pkgname}-${pkgver}.tar.gz")
17 sha512sums=('77877f15914dbee5ca83155f8cb84815296b4e2e4205218c9926e0265b40940cbdbe68fb048870ce4f53a6caeeb593813a2e16e8c130a19e44a28cb67c82fe25')
19 build() {
20   cd "${_gemname}-${pkgver}"
21   # remove dependencies that aren't actual dependencies
22   sed --in-place '/test\/unit\/notify/d' test/run-test.rb
23   sed --in-place '/s.add_development_dependency("redcarpet")/d' "${_gemname}.gemspec"
24   sed --in-place '/s.add_development_dependency("test-unit-notify")/d' "${_gemname}.gemspec"
25   rake build
28 check() {
29   cd "${_gemname}-${pkgver}"
30   rake test
33 package() {
34   cd "${_gemname}-${pkgver}"
35   local _gemdir="$(gem env gemdir)"
36   gem install --verbose --ignore-dependencies --no-user-install --install-dir "${pkgdir}/${_gemdir}" --bindir "${pkgdir}/usr/bin" "pkg/${_gemname}-${pkgver}.gem"
38   install -Dm 644 COPYING -t "${pkgdir}/usr/share/licenses/${pkgname}/"
39   install -Dm 644 README.rdoc ChangeLog doc/text/news.md -t "${pkgdir}/usr/share/doc/${pkgname}"
41   rm -rf "${pkgdir}/${_gemdir}/cache"
44 # vim: ts=2 sw=2 et: