diff options
author | Matt Woelk | 2016-07-22 14:36:22 -0500 |
---|---|---|
committer | Matt Woelk | 2016-07-22 14:36:22 -0500 |
commit | 050e4cf404938922d8600756e30136ca5bbe1ee2 (patch) | |
tree | d74425052cc5e5b6772dbf19aea5ebfdf611dee7 /PKGBUILD | |
parent | e4de8e8431ad55721cd3967015763090c0f34911 (diff) | |
download | aur-050e4cf404938922d8600756e30136ca5bbe1ee2.tar.gz |
Implemented xsmile's suggestions.
This should allow automatic downloading again.
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 42 |
1 files changed, 28 insertions, 14 deletions
@@ -1,29 +1,43 @@ # Maintainer: MattWoelk +# Contributor: xsmile <sascha_r gmx de> +_retoken='.*hidden">(\w+)<.*' pkgname=nessus pkgver=6.8.0 pkgrel=1 -_bigver=Nessus-$pkgver-fc20 -pkgdesc='Vulnerability scanner' +_filename="${pkgname^}-${pkgver}-fc20.x86_64.rpm" +pkgdesc="Vulnerability scanner" arch=('x86_64') depends=('openssl' 'gnupg') license=('custom') -url='https://www.nessus.org' -install=nessus.install +url="https://www.nessus.org" +install=${pkgname}.install -# Download the rpm from <http://www.tenable.com/products/nessus/select-your-operating-system> -# Nessus-6.8.0-fc20.x86_64.rpm -./getnessus.sh +_gettoken() { + token=$(curl -s https://www.tenable.com/products/nessus/select-your-operating-system#tos | \ -source=($_bigver.x86_64.rpm + sed -nr "s/${_retoken}/\1/p") + + if [[ "$token" == "" ]]; then + echo + echo "\n==> ERROR: Could not get the download token" + exit 1 + fi + + echo $token +} +_token=$(_gettoken) +_pkgurl="https://downloads.nessus.org/nessus3dl.php?file=${_filename}&licence_accept=yes&t=${_token}" + +source=("${_filename}::${_pkgurl}" nessus.sh - LICENSE.NESSUS - nessus.install) + LICENSE) + md5sums=('4106308f11c6b56f05932ee7bf9e71e1' '8c5772ac63f97d94475fe03e80d6ba5c' - '8ff98bc9488304fcb66753d3cfb5f30e' - 'd9d25d4075acc50c0050c7a4f244c7cb') - package() { + '1db6df5a39009ace46c7ee40141ece1b') + +package() { install -Dm755 $pkgname.sh "$pkgdir/etc/profile.d/$pkgname.sh" mkdir -p "$pkgdir/etc/ld.so.conf.d" "$pkgdir/usr/share" "$pkgdir/opt/nessus" \ @@ -38,5 +52,5 @@ md5sums=('4106308f11c6b56f05932ee7bf9e71e1' cp -a opt/nessus/{bin,com,etc,lib,sbin,var} "$pkgdir/opt/nessus" # license - install -Dm644 LICENSE.NESSUS "$pkgdir/usr/share/licenses/nessus/LICENSE.NESSUS" + install -Dm644 LICENSE "$pkgdir/usr/share/licenses/nessus/LICENSE" } |