diff --git a/trunk/PKGBUILD b/trunk/PKGBUILD index 9c4d9e5..4c8cf35 100644 --- a/trunk/PKGBUILD +++ b/trunk/PKGBUILD @@ -2,18 +2,19 @@ _gemname='faraday-rack' pkgname="ruby-${_gemname}" -pkgver=1.0.0 -pkgrel=2 +pkgver=2.0.0 +pkgrel=1 pkgdesc='About Faraday adapter for Rack' arch=('any') url="https://github.com/lostisland/${_gemname}" license=('MIT') -depends=('ruby' 'ruby-rack') +depends=('ruby' 'ruby-faraday' 'ruby-rack') makedepends=('ruby-rspec') -checkdepends=('ruby-faraday' 'ruby-webmock' 'ruby-multipart-parser' 'ruby-rack-test') +#checkdepends=('ruby-webmock' 'ruby-multipart-parser' 'ruby-rack-test') +checkdepends=('ruby-rack-test' 'ruby-webmock') options=('!emptydirs') source=("${url}/archive/v${pkgver}/${_gemname}-v${pkgver}.tar.gz") -sha512sums=('c2abe89a54c41dfa336976ec0f8c86f3a1912b5a950f139f0146a27273560fa74c97c5c35d05f80ce2349de96461b7e398c79cdc3471a8fe782406df03e184ec') +sha512sums=('0c657d997401e7f4d5dc6909e35a83ea57ac35da2ffa6f183af8411bf1bdcbd6bab1dde21b0d48595ac227c1dd575044883454376bc9dde2f15d707fc06f4192') prepare() { cd "${srcdir}/${_gemname}-${pkgver}" @@ -23,23 +24,38 @@ 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}" - rspec + cd "${_gemname}-${pkgver}" + + 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 "${_gemname}-${pkgver}" - install -Dm 644 LICENSE.md -t "${pkgdir}/usr/share/licenses/${pkgname}/" + cp -a tmp_install/* "${pkgdir}" - install -Dm 644 README.md -t "${pkgdir}/usr/share/doc/${pkgname}" - - 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}" }