Date: Tuesday, August 3, 2021 @ 11:10:06 Author: bastelfreak Revision: 993507
update to 1.1.0 Modified: ruby-faraday-middleware/trunk/PKGBUILD ----------+ PKGBUILD | 48 ++++++++++++++++++++++++++++++++++++------------ 1 file changed, 36 insertions(+), 12 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2021-08-03 09:29:04 UTC (rev 993506) +++ PKGBUILD 2021-08-03 11:10:06 UTC (rev 993507) @@ -1,23 +1,47 @@ -# Maintainer: Felix Yan <felixonm...@archlinux.org> +# Maintainer: Tim Meusel <t...@bastelfreak.de> +# Contributor: Felix Yan <felixonm...@archlinux.org> # Contributor: Carsten Feuls <archli...@carstenfeuls.de> +_gemname=faraday_middleware pkgname=ruby-faraday-middleware -pkgver=1.0.0 -pkgrel=2 +pkgver=1.1.0 +pkgrel=1 pkgdesc='Various middleware for Faraday' arch=('any') -url='https://github.com/lostisland/faraday_middleware' +url="https://github.com/lostisland/${_gemname}" license=('MIT') depends=('ruby' 'ruby-faraday') -makedepends=('ruby-rdoc') +makedepends=('ruby-rdoc' 'ruby-rake' 'ruby-bundler') +checkdepends=('ruby-rspec' 'ruby-webmock' 'ruby-rack-test' 'ruby-rack') options=('!emptydirs') -source=("https://rubygems.org/downloads/faraday_middleware-$pkgver.gem") -noextract=("faraday_middleware-$pkgver.gem") -sha512sums=('fb566356421c3996376cefd675e2e6b3d4664177a1855e037803c85d8dcfbea5ce0047162f81f71fa2b53f2feea93667b8a208aaffa94607a9476f4b76c959c1') +source=("${url}/archive/v${pkgver}/${_gemname}-v${pkgver}.tar.gz") +sha512sums=('e9c3ada418e47c397272b52706bbcbfa1c98b7b467c148c0094b1dfe47d28fc57e397461e6e7446c5bb8d71ed968e74e1b7e67e793e30d3f47e9fb1aae549912') +prepare() { + cd "${srcdir}/${_gemname}-${pkgver}/spec/unit/" + # remove unit test for ruby-hashie/ruby-rash/ruby-multi_xml/ruby-brotli/ruby-rack-cache/ruby-simple_oauth + # we don't have them in the repos + rm mashify_spec.rb rashify_spec.rb parse_xml_spec.rb gzip_spec.rb caching_spec.rb oauth_spec.rb +} + +build() { + cd "${srcdir}/${_gemname}-${pkgver}" + gem build "${_gemname}.gemspec" +} + +check() { + cd "${srcdir}/${_gemname}-${pkgver}" + rake spec +} + package() { - local _gemdir="$(ruby -e'puts Gem.default_dir')" - gem install --ignore-dependencies --no-user-install -i "$pkgdir/$_gemdir" -n "$pkgdir/usr/bin" faraday_middleware-$pkgver.gem - rm "$pkgdir/$_gemdir/cache/faraday_middleware-$pkgver.gem" - install -D -m644 "$pkgdir/$_gemdir/gems/faraday_middleware-$pkgver/LICENSE.md" "$pkgdir/usr/share/licenses/$pkgname/LICENSE.md" +cd "${srcdir}/${_gemname}-${pkgver}" + local _gemdir="$(gem env gemdir)" + gem install --verbose --ignore-dependencies --no-user-install --install-dir "${pkgdir}/${_gemdir}" --bindir "${pkgdir}/usr/bin" "${_gemname}-${pkgver}.gem" + + install -Dm 644 LICENSE.md -t "${pkgdir}/usr/share/licenses/${pkgname}/" + + install -Dm 644 README.md CONTRIBUTING.md docs/* -t "${pkgdir}/usr/share/doc/${pkgname}" + + rm -rf "${pkgdir}/${_gemdir}/cache" }