[arch-commits] Commit in ruby-rack-protection/trunk (PKGBUILD)

Levente Polyak anthraxx at archlinux.org
Wed May 13 00:18:06 UTC 2020


    Date: Wednesday, May 13, 2020 @ 00:17:50
  Author: anthraxx
Revision: 627273

upgpkg: ruby-rack-protection 2.0.8.1-1

Modified:
  ruby-rack-protection/trunk/PKGBUILD

----------+
 PKGBUILD |   31 +++++++++++++++++++++----------
 1 file changed, 21 insertions(+), 10 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-05-13 00:12:54 UTC (rev 627272)
+++ PKGBUILD	2020-05-13 00:17:50 UTC (rev 627273)
@@ -2,35 +2,46 @@
 
 _gemname=rack-protection
 pkgname=ruby-${_gemname}
-pkgver=2.0.5
-pkgrel=2
+pkgver=2.0.8.1
+pkgrel=1
 pkgdesc='Protect against typical web attacks, works with all Rack apps, including Rails'
-url='https://github.com/sinatra/sinatra/blob/master/rack-protection'
+url='http://sinatrarb.com/protection/'
 arch=('any')
 license=('MIT')
 depends=('ruby' 'ruby-rack')
+makedepends=('ruby-rdoc' 'ruby-rake' 'ruby-bundler' 'ruby-minitest')
+checkdepends=('ruby-rspec')
 options=('!emptydirs')
-source=(${pkgname}-${pkgver}.tar.gz::https://github.com/sinatra/sinatra/archive/v${pkgver}.tar.gz)
-sha256sums=('423c9d6cbbc89e53652c390a9908927058c30952bfdf19c5b083bfce2890fe8a')
-sha512sums=('da626d584f065f924fa5a42802b0e7a03e40e780cfd92e9cb072c86e9cb6d8ba4a699d7383a81b13ac0ffd0ce427900cdf059b77565ace5961dbd00c088ce0f9')
+source=(https://github.com/sinatra/sinatra/archive/v${pkgver}/sinatra-${pkgver}.tar.gz)
+sha512sums=('c6c166e14f2be53cda18263121876ca191c670e12c2c42abb10d0f4a0d8db2916210a6775ef894cf00201c445cd185e5f13c5cd8a1ab0e78e12faa6cb51ee69b')
+b2sums=('7b88f50b2b2960c17aaa4f0ffbffaf70ece16c1bb29b3ee4706904ebc8e779ad84058ca49ae7cea28f86e635eb9b10ab6f5d94c6eeb4de72637bf5b74d4cac42')
 
 prepare() {
   cd sinatra-${pkgver}/${_gemname}
-  sed -r 's|~>|>=|g' -i ${_gemname}.gemspec # don't give a fuck about rubys bla bla
+  sed -r 's|~>|>=|g' -i ${_gemname}.gemspec Rakefile
 }
 
 build() {
   cd sinatra-${pkgver}/${_gemname}
-  gem build ${_gemname}.gemspec
+  rake build
 }
 
+check() {
+  cd sinatra-${pkgver}/${_gemname}
+  # TODO: requires rack-test
+  # rake test
+}
+
 package() {
   cd sinatra-${pkgver}/${_gemname}
   local _gemdir="$(gem env gemdir)"
-  gem install --ignore-dependencies --no-user-install -i "${pkgdir}${_gemdir}" -n "${pkgdir}/usr/bin" ${_gemname}-${pkgver}.gem
+  gem install --ignore-dependencies --no-user-install -i "${pkgdir}${_gemdir}" \
+    -n "${pkgdir}/usr/bin" pkg/${_gemname}-${pkgver}.gem
   install -Dm 644 README.md -t "${pkgdir}/usr/share/doc/${pkgname}"
   install -Dm 644 License -t "${pkgdir}/usr/share/licenses/${pkgname}"
-  rm "${pkgdir}/${_gemdir}/cache/${_gemname}-${pkgver}.gem"
+
+  cd "${pkgdir}/${_gemdir}"
+  rm -r "${pkgdir}/${_gemdir}/cache"
 }
 
 # vim: ts=2 sw=2 et:


More information about the arch-commits mailing list