diff options
author | anthraxx | 2016-05-31 00:50:30 +0200 |
---|---|---|
committer | anthraxx | 2016-05-31 00:50:30 +0200 |
commit | 284cf3df748fa13e065f5d343580a42f994b956c (patch) | |
tree | 31958837b2cd741a1cac109ce2c4142aa4addebd | |
download | aur-284cf3df748fa13e065f5d343580a42f994b956c.tar.gz |
addpkg: wpscan-git 2.9.1.2040.5118c68-1
-rw-r--r-- | .SRCINFO | 27 | ||||
-rw-r--r-- | PKGBUILD | 61 | ||||
-rw-r--r-- | wpscan.install | 9 |
3 files changed, 97 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..2c7afa7fb908 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,27 @@ +# Generated by mksrcinfo v8 +# Mon May 30 22:50:30 UTC 2016 +pkgbase = wpscan-git + pkgdesc = Black box WordPress vulnerability scanner + pkgver = 2.9.1.2040.5118c68 + pkgrel = 1 + epoch = 1 + url = http://wpscan.org + install = wpscan.install + arch = i686 + arch = x86_64 + license = custom:WPScan + makedepends = git + makedepends = unzip + depends = ruby-bundler + depends = libxslt + depends = libyaml + depends = curl + provides = wpscan + conflicts = wpscan + options = !strip + options = !emptydirs + source = wpscan-git::git+https://github.com/wpscanteam/wpscan + sha512sums = SKIP + +pkgname = wpscan-git + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..010f0ace7de2 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,61 @@ +# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org> +# Contributor: alexiobash < me (at) alexiobash (dot) com > + +_pkgname=wpscan +pkgname=wpscan-git +pkgver=2.9.1.2040.5118c68 +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=('git' 'unzip') +provides=('wpscan') +conflicts=('wpscan') +options=('!strip' '!emptydirs') +install=wpscan.install +source=(${pkgname}::git+https://github.com/wpscanteam/wpscan) +sha512sums=('SKIP') + +pkgver() { + cd ${pkgname} + printf "%s.%s.%s" "$(git describe --tags --abbrev=0)" \ + "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +prepare() { + cd ${pkgname} + unzip -o data.zip + rm data.zip + cd lib/common + # replace cache location with local user share + sed "s|ROOT_DIR, 'cache'|ENV['HOME'] + '/.local/share/${_pkgname}/cache'|" -i common_helper.rb + sed "s|ROOT_DIR, 'log.txt'|ENV['HOME'] + '/.local/share/${_pkgname}/log.txt'|" -i common_helper.rb +} + +build() { + cd ${pkgname} + bundle install -j"$(nproc)" --path vendor/bundle --without development test +} + +package() { + cd ${pkgname} + + install -d "${pkgdir}/opt/${_pkgname}" + cp -ra --no-preserve=owner . "${pkgdir}/opt/${_pkgname}" + rm -r "${pkgdir}/opt/${_pkgname}/.git" + + 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: diff --git a/wpscan.install b/wpscan.install new file mode 100644 index 000000000000..9ee5b5bcc1a8 --- /dev/null +++ b/wpscan.install @@ -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 +} |