[arch-commits] Commit in ruby-rack-protection/repos (2 files)

Felix Yan felixonmars at archlinux.org
Thu Dec 26 01:04:13 UTC 2019


    Date: Thursday, December 26, 2019 @ 01:04:13
  Author: felixonmars
Revision: 541723

archrelease: copy trunk to community-staging-any

Added:
  ruby-rack-protection/repos/community-staging-any/
  ruby-rack-protection/repos/community-staging-any/PKGBUILD
    (from rev 541721, ruby-rack-protection/trunk/PKGBUILD)

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

Copied: ruby-rack-protection/repos/community-staging-any/PKGBUILD (from rev 541721, ruby-rack-protection/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD	                        (rev 0)
+++ community-staging-any/PKGBUILD	2019-12-26 01:04:13 UTC (rev 541723)
@@ -0,0 +1,36 @@
+# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
+
+_gemname=rack-protection
+pkgname=ruby-${_gemname}
+pkgver=2.0.5
+pkgrel=2
+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=('423c9d6cbbc89e53652c390a9908927058c30952bfdf19c5b083bfce2890fe8a')
+sha512sums=('da626d584f065f924fa5a42802b0e7a03e40e780cfd92e9cb072c86e9cb6d8ba4a699d7383a81b13ac0ffd0ce427900cdf059b77565ace5961dbd00c088ce0f9')
+
+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:



More information about the arch-commits mailing list