diff --git a/trunk/PKGBUILD b/trunk/PKGBUILD index 730e81e..907bf9e 100644 --- a/trunk/PKGBUILD +++ b/trunk/PKGBUILD @@ -2,46 +2,62 @@ _gemname='faraday-net_http_persistent' pkgname="ruby-${_gemname}" -pkgver=2.0.1 -pkgrel=1 +pkgver=2.1.0 +pkgrel=1.0 pkgdesc='About Faraday adapter for NetHttpPersistent' arch=('any') url="https://github.com/lostisland/${_gemname}" license=('MIT') -depends=('ruby') +depends=('ruby-faraday' 'ruby-net-http-persistent') makedepends=('ruby-rspec') -checkdepends=('ruby-faraday' 'ruby-webmock' 'ruby-multipart-parser') +checkdepends=('ruby-webmock' 'ruby-multipart-parser') options=('!emptydirs') -source=("${url}/archive/v${pkgver}/${_gemname}-v${pkgver}.tar.gz") -sha512sums=('f198ebb42cf0aee6ee8b6c598e437112f620bd145dad609e64845e555f4f51034a8f8670ef448b46742f7f5a83bc8681943c6ba817430b1519fd683f57d0b7fa') +source=("${url}/archive/v${pkgver}/${_gemname}-v${pkgver}.tar.gz" + ruby-faraday-net_http_persistent-2.1.0-disable-simple-coverage.patch) +sha512sums=('3ad70814a231dedff56dd2891d834c6cd5f377e30bac4b31e6290097667d18b4eac5b44ad46b14fda873ee80e3b49e018337d60d666f0b32017fe0f4653d905a' + '40d75992693cfffd31bfe78d21a76d5fa7a1f48353b2825929d1aecdb416bf4234dd7749b50c0a3f1142709be789a13b5aae7eb2b81683d0ce7f107c767d8966') prepare() { cd "${srcdir}/${_gemname}-${pkgver}" + patch -Np1 -i ../ruby-faraday-net_http_persistent-2.1.0-disable-simple-coverage.patch # drop broken/cirular dependencies sed --in-place '/add_development_dependency/d' "${_gemname}.gemspec" } build() { - cd "${srcdir}/${_gemname}-${pkgver}" + cd "${_gemname}-${pkgver}" + + local _gemdir="$(gem env gemdir)" + gem build "${_gemname}.gemspec" + + gem install \ + --local \ + --verbose \ + --ignore-dependencies \ + --no-user-install \ + --install-dir "tmp_install/${_gemdir}" \ + --bindir "tmp_install/usr/bin" \ + "${_gemname}-${pkgver}.gem" + + # remove unrepreducible files + rm -rf "tmp_install/${_gemdir}/cache/" } check() { - cd "${srcdir}/${_gemname}-${pkgver}" - # tests currently don't pass because we don't have net-http-persistent in the repos - # we run the tests in ruby-faraday - #rspec -} + cd "${_gemname}-${pkgver}" -package() { -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}/" + GEM_HOME="tmp_install/${_gemdir}" rake spec +} + +package() { + cd "${_gemname}-${pkgver}" - install -Dm 644 README.md -t "${pkgdir}/usr/share/doc/${pkgname}" + cp -a tmp_install/* "${pkgdir}" - rm -rf "${pkgdir}/${_gemdir}/cache" + install -Dm 0644 LICENSE.md -t "${pkgdir}/usr/share/licenses/${pkgname}" + install -Dm 0644 README.md -t "${pkgdir}/usr/share/doc/${pkgname}" } diff --git a/trunk/ruby-faraday-net_http_persistent-2.1.0-disable-simple-coverage.patch b/trunk/ruby-faraday-net_http_persistent-2.1.0-disable-simple-coverage.patch new file mode 100644 index 0000000..2e3873f --- /dev/null +++ b/trunk/ruby-faraday-net_http_persistent-2.1.0-disable-simple-coverage.patch @@ -0,0 +1,24 @@ +diff --git a/Gemfile b/Gemfile +index 874f86f..939dd43 100644 +--- a/Gemfile ++++ b/Gemfile +@@ -9,6 +9,5 @@ gem "faraday", ">= 1" + gem "multipart-parser", "~> 0.1.1" + gem "rake", "~> 13.0" + gem "rspec", "~> 3.0" +-gem "simplecov", "~> 0.19.0" + gem "standardrb", "~> 1.0" + gem "webmock", "~> 3.4" +diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb +index 1a4f21b..5bce0f2 100644 +--- a/spec/spec_helper.rb ++++ b/spec/spec_helper.rb +@@ -1,8 +1,5 @@ + # frozen_string_literal: true + +-require "simplecov" +-SimpleCov.start +- + require "faraday" + require "faraday/net_http_persistent" + require "faraday_specs_setup"