archrelease: copy trunk to community-x86_64
[ArchLinux/community.git] / ruby-faraday-net_http_persistent / repos / community-any / PKGBUILD
blob48f2a96a83f40b1a9d01af1b297a16c83967f88d
1 # Maintainer: Tim Meusel <tim@bastelfreak.de>
3 _gemname='faraday-net_http_persistent'
4 pkgname="ruby-${_gemname}"
5 pkgver=1.2.0
6 pkgrel=1
7 pkgdesc='About Faraday adapter for NetHttpPersistent'
8 arch=('any')
9 url="https://github.com/lostisland/${_gemname}"
10 license=('MIT')
11 depends=('ruby')
12 makedepends=('ruby-rspec')
13 checkdepends=('ruby-faraday' 'ruby-webmock' 'ruby-multipart-parser')
14 options=('!emptydirs')
15 source=("${url}/archive/v${pkgver}/${_gemname}-v${pkgver}.tar.gz")
16 sha512sums=('4172b93aa72b5f9dcd9fa526789bc336b777fb6785753f0351410c58b8f3fe7e6f989c0812d71e1aa4f6449877cbed8908412321daefe95997483cf51158fa4c')
18 prepare() {
19   cd "${srcdir}/${_gemname}-${pkgver}"
21   # drop broken/cirular dependencies
22   sed --in-place '/add_development_dependency/d' "${_gemname}.gemspec"
25 build() {
26   cd "${srcdir}/${_gemname}-${pkgver}"
27   gem build "${_gemname}.gemspec"
30 check() {
31   cd "${srcdir}/${_gemname}-${pkgver}"
32   # tests currently don't pass because we don't have net-http-persistent in the repos
33   # we run the tests in ruby-faraday
34   #rspec
37 package() {
38 cd "${srcdir}/${_gemname}-${pkgver}"
39   local _gemdir="$(gem env gemdir)"
40   gem install --verbose --ignore-dependencies --no-user-install --install-dir "${pkgdir}/${_gemdir}" --bindir "${pkgdir}/usr/bin" "${_gemname}-${pkgver}.gem"
42   install -Dm 644 LICENSE.md -t "${pkgdir}/usr/share/licenses/${pkgname}/"
44   install -Dm 644 README.md -t "${pkgdir}/usr/share/doc/${pkgname}"
46   rm -rf "${pkgdir}/${_gemdir}/cache"