archrelease: copy trunk to community-any
[ArchLinux/community.git] / ruby-fakeweb / trunk / PKGBUILD
blob680ed0193a5977ade8246f5af76d78e33cbdc19d
1 # Maintainer: Thore Bödecker <foxxx0@archlinux.org>
3 _gemname='fakeweb'
4 pkgname="ruby-${_gemname}"
5 pkgver=1.3.0
6 pkgrel=2
7 pkgdesc="Ruby test helper for injecting fake responses to web requests"
8 url="https://github.com/chrisk/fakeweb"
9 arch=('any')
10 license=('MIT')
11 depends=('ruby')
12 makedepends=('ruby-rake' 'ruby-rspec' 'ruby-bundler' 'ruby-rdoc' 'ruby-test-unit')
13 checkdepends=('ruby-mocha')
14 options=('!emptydirs')
15 source=("${_gemname}-v${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz")
16 sha512sums=('2e9c4848fc3733fe54f30d80db5c2d8a4e9148640e3fcce67c087096a5739273cf5bf6b3b981dd284ab78da6af8e4ab995a4021b53964bb24f72d9a7d219c0f6')
18 prepare() {
19   cd "${srcdir}/${_gemname}-${pkgver}"
20   :
23 build() {
24   cd "${srcdir}/${_gemname}-${pkgver}"
25   mkdir -p pkg
26   gem build -o "pkg/${_gemname}-${pkgver}.gem"
29 check() {
30   cd "${srcdir}/${_gemname}-${pkgver}"
31   # tests are broken and require outdated/non-existing gems, upstream seems dead in this regard
32   #rake test
35 package() {
36   cd "${srcdir}/${_gemname}-${pkgver}"
37   local _gemdir="$(gem env gemdir)"
38   gem install \
39     --ignore-dependencies \
40     --no-user-install \
41     -i "${pkgdir}/${_gemdir}" \
42     -n "${pkgdir}/usr/bin"  \
43     "pkg/${_gemname}-${pkgver}.gem"
45   # cd "${pkgdir}/${_gemdir}"
46   # rm -r cache gems/"${_gemname}-${pkgver}"/{ext,tmp,lib/*/*.so} \
47   #   extensions/*/*/"${_gemname}-${pkgver}"/{mkmf.log,gem_make.out}
49   install -D -m644 "LICENSE.txt" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
52 # vim: ts=2 sw=2 et: