diff --git a/trunk/PKGBUILD b/trunk/PKGBUILD index e04fc59..dc21ab9 100644 --- a/trunk/PKGBUILD +++ b/trunk/PKGBUILD @@ -8,9 +8,9 @@ pkgdesc='Faraday adapter for HTTPClient' arch=('any') url="https://github.com/lostisland/${_gemname}" license=('MIT') -depends=('ruby' 'ruby-httpclient') +depends=('ruby' 'ruby-faraday' 'ruby-httpclient') makedepends=('ruby-rspec') -checkdepends=('ruby-faraday' 'ruby-webmock' 'ruby-multipart-parser') +checkdepends=('ruby-webmock') options=('!emptydirs') source=("${url}/archive/v${pkgver}/${_gemname}-v${pkgver}.tar.gz") sha512sums=('034f8dc7fff8ea214a78208a57bf92e16259ab1b515936a647d50ce3bae7361bcef891eb1baa0ce4a1f8cc4afa14b564f743aee2a0c215d3cbebabab8c41c537') @@ -23,24 +23,39 @@ prepare() { } 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}" + cd "${_gemname}-${pkgver}" - rspec + local _gemdir="$(gem env gemdir)" + + GEM_HOME="tmp_install/${_gemdir}" rake spec } 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" + cd "${srcdir}/${_gemname}-${pkgver}" - install -Dm 644 LICENSE.md -t "${pkgdir}/usr/share/licenses/${pkgname}/" + cp -a tmp_install/* "${pkgdir}" - install -Dm 644 README.md CODE_OF_CONDUCT.md -t "${pkgdir}/usr/share/doc/${pkgname}" + install -Dm 0644 LICENSE.md -t "${pkgdir}/usr/share/licenses/${pkgname}/" + install -Dm 0644 README.md CODE_OF_CONDUCT.md -t "${pkgdir}/usr/share/doc/${pkgname}" - rm -rf "${pkgdir}/${_gemdir}/cache" }