[arch-commits] Commit in (5 files)

Levente Polyak anthraxx at archlinux.org
Sun Nov 20 01:19:08 UTC 2016


    Date: Sunday, November 20, 2016 @ 01:19:07
  Author: anthraxx
Revision: 196345

addpkg: wpscan 1:2.9.2-1

Added:
  wpscan/
  wpscan/repos/
  wpscan/trunk/
  wpscan/trunk/PKGBUILD
  wpscan/trunk/wpscan.install

----------------+
 PKGBUILD       |   51 +++++++++++++++++++++++++++++++++++++++++++++++++++
 wpscan.install |    9 +++++++++
 2 files changed, 60 insertions(+)

Added: wpscan/trunk/PKGBUILD
===================================================================
--- wpscan/trunk/PKGBUILD	                        (rev 0)
+++ wpscan/trunk/PKGBUILD	2016-11-20 01:19:07 UTC (rev 196345)
@@ -0,0 +1,51 @@
+# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
+# Contributor: alexiobash < me (at) alexiobash (dot) com >
+
+pkgname=wpscan
+pkgver=2.9.2
+pkgrel=1
+epoch=1
+pkgdesc='Black box WordPress vulnerability scanner'
+url='http://wpscan.org'
+arch=('i686' 'x86_64')
+license=('custom:WPScan')
+depends=('ruby-bundler' 'libxslt' 'libyaml' 'curl')
+makedepends=('unzip')
+options=('!strip' '!emptydirs')
+install=wpscan.install
+source=(${pkgname}-${pkgver}.tar.gz::https://github.com/wpscanteam/wpscan/archive/${pkgver}.tar.gz)
+sha512sums=('cc8ff69b4b4b7ad26a32b9627d44d9d8e647310763cf768d91eb400d86fcbbb98f7a5cd695f9f7b2df9e85d5b3c49f2336a8bcf9a14e2458ffe06e3d2be145d6')
+
+prepare() {
+  cd ${pkgname}-${pkgver}
+  unzip -o data.zip
+  rm data.zip
+  # replace cache location with local user share
+  sed "s|ROOT_DIR, 'cache'|ENV['HOME'] + '/.local/share/${pkgname}/cache'|" -i lib/common/common_helper.rb
+  sed "s|ROOT_DIR, 'log.txt'|ENV['HOME'] + '/.local/share/${pkgname}/log.txt'|" -i lib/common/common_helper.rb
+  bundle config build.nokogiri --use-system-libraries
+}
+
+build() {
+  cd ${pkgname}-${pkgver}
+  bundle install -j"$(nproc)" --path vendor/bundle --without development test
+}
+
+package() {
+  cd ${pkgname}-${pkgver}
+
+  install -d "${pkgdir}/opt/${pkgname}"
+  cp -ra --no-preserve=owner . "${pkgdir}/opt/${pkgname}"
+
+  install -d "${pkgdir}/usr/bin"
+  cat > "${pkgdir}/usr/bin/${pkgname}" << EOF
+#!/bin/sh
+BUNDLE_GEMFILE=/opt/${pkgname}/Gemfile bundle exec ruby /opt/${pkgname}/${pkgname}.rb "\$@"
+EOF
+  chmod 755 "${pkgdir}/usr/bin/${pkgname}"
+
+  install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
+  install -Dm 644 CHANGELOG.md DISCLAIMER.txt README.md -t "${pkgdir}/usr/share/doc/${pkgname}"
+}
+
+# vim: ts=2 sw=2 et:

Added: wpscan/trunk/wpscan.install
===================================================================
--- wpscan/trunk/wpscan.install	                        (rev 0)
+++ wpscan/trunk/wpscan.install	2016-11-20 01:19:07 UTC (rev 196345)
@@ -0,0 +1,9 @@
+post_install() {
+  echo -n 'Updating wpscan database...'
+  /usr/bin/wpscan --update >/dev/null 2>&1
+  echo "done."
+}
+
+post_upgrade() {
+  post_install
+}



More information about the arch-commits mailing list