upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / ruby-rails-dom-testing / trunk / PKGBUILD
blob8bab96207ecbd866ff96c59b03e393dae74d607e
1 # Maintainer: Andreas 'Segaja' Schleifer <segaja at archlinux dot org>
3 _gemname='rails-dom-testing'
4 pkgname="ruby-${_gemname}"
5 pkgver=2.0.3
6 pkgrel=2
7 pkgdesc='Dom and Selector assertions for Rails applications'
8 arch=('any')
9 url='https://github.com/rails/rails-dom-testing'
10 license=('MIT')
11 options=(!emptydirs)
12 depends=('ruby' 'ruby-activesupport' 'ruby-nokogiri')
13 makedepends=('ruby-bundler' 'ruby-rake')
14 source=("${url}/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz")
15 sha512sums=('0103cb494a28faa24c050c5659d7ac6858941f67fa977d1565193f30a2035b030450db4f091739cac86ff765677ea801bc7cd0966eea98866f5f582d8250d9b9')
17 prepare() {
18   cd "${_gemname}-${pkgver}"
20   # update gemspec/Gemfile to allow newer version of the dependencies
21   sed --in-place --regexp-extended 's|~>|>=|g' "${_gemname}.gemspec"
22   rm Gemfile.lock
25 build() {
26   cd "${_gemname}-${pkgver}"
28   rake build
31 check() {
32   cd "${_gemname}-${pkgver}"
34   rake test
37 package() {
38   cd "${_gemname}-${pkgver}"
40   local _gemdir="$(gem env gemdir)"
42   gem install --ignore-dependencies --no-user-install --install-dir "${pkgdir}/${_gemdir}" --bindir "${pkgdir}/usr/bin" "pkg/${_gemname}-${pkgver}.gem"
44   rm "${pkgdir}/${_gemdir}/cache/${_gemname}-${pkgver}.gem"
46   install -Dm 644 MIT-LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
47   install -Dm 644 CONTRIBUTING.md README.md --target-directory "${pkgdir}/usr/share/doc/${pkgname}"