Date: Tuesday, October 10, 2017 @ 00:13:54
  Author: anthraxx
Revision: 262260

addpkg: ruby-rack-protection 2.0.0-1

Added:
  ruby-rack-protection/
  ruby-rack-protection/repos/
  ruby-rack-protection/trunk/
  ruby-rack-protection/trunk/PKGBUILD

----------+
 PKGBUILD |   36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

Added: ruby-rack-protection/trunk/PKGBUILD
===================================================================
--- ruby-rack-protection/trunk/PKGBUILD                         (rev 0)
+++ ruby-rack-protection/trunk/PKGBUILD 2017-10-10 00:13:54 UTC (rev 262260)
@@ -0,0 +1,36 @@
+# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
+
+_gemname=rack-protection
+pkgname=ruby-${_gemname}
+pkgver=2.0.0
+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'
+arch=('any')
+license=('MIT')
+depends=('ruby' 'ruby-rack')
+options=('!emptydirs')
+source=(${pkgname}-${pkgver}.tar.gz::https://github.com/sinatra/sinatra/archive/v${pkgver}.tar.gz)
+sha256sums=('8e9483b7dede0468128af227381cbf13acd974f8987a09013a584ee6d0a7d65b')
+sha512sums=('54c736fc6f63bb55ad36b4005335cc5709da9da8c2a29e13218e9f4494f07167077a2ec22dfb08f0bfaf0d4f872ec4d561adb636f7392f148da2ce0ea5a24084')
+
+prepare() {
+  cd sinatra-${pkgver}/${_gemname}
+  sed -r 's|~>|>=|g' -i ${_gemname}.gemspec # don't give a fuck about rubys 
bla bla
+}
+
+build() {
+  cd sinatra-${pkgver}/${_gemname}
+  gem build ${_gemname}.gemspec
+}
+
+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
+  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"
+}
+
+# vim: ts=2 sw=2 et:

Reply via email to