1 # Maintainer: Andreas 'Segaja' Schleifer <segaja at archlinux dot org>
4 pkgname="ruby-${_gemname}"
7 pkgdesc='Crass is a pure Ruby CSS parser based on the CSS Syntax Level 3 spec'
9 url='https://github.com/rgrove/crass'
13 makedepends=('ruby-bundler' 'ruby-rake')
14 checkdepends=('ruby-minitest')
15 source=("${url}/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz")
16 sha512sums=('de98dea48d0cff148b3000d7388256552d1bf5a014ecbc074efc909473bc6edf2cf1db36179aaa4284eb810618dafc346757ac61708c9659045e013e6c6d4e36')
19 cd "${_gemname}-${pkgver}"
21 # we built based on a tar archive, not a git repo
22 sed --in-place 's/git ls-files -z/find -print0/' "${_gemname}.gemspec"
24 # update gemspec/Gemfile to allow newer version of the dependencies
25 sed --in-place --regexp-extended 's|~>|>=|g' "${_gemname}.gemspec"
29 cd "${_gemname}-${pkgver}"
35 cd "${_gemname}-${pkgver}"
41 cd "${_gemname}-${pkgver}"
43 local _gemdir="$(gem env gemdir)"
45 gem install --ignore-dependencies --no-user-install -i "${pkgdir}/${_gemdir}" -n "${pkgdir}/usr/bin" "pkg/${_gemname}-${pkgver}.gem"
47 rm "${pkgdir}/${_gemdir}/cache/${_gemname}-${pkgver}.gem"
49 install -Dm 644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
50 install -Dm 644 HISTORY.md README.md --target-directory "${pkgdir}/usr/share/doc/${pkgname}"