updated on Sun Jan 15 08:01:04 UTC 2012
[aur-mirror.git] / nessus / PKGBUILD
blobbe145a6f4e10f8719ffffcab815fe188c420d94d
1 # Maintainer: Daniel Micay <danielmicay@gmail.com>
2 # Contributer: Pranay Kanwar <pranay.kanwar@gmail.com>
4 pkgname=nessus
5 pkgver=4.4.1
6 pkgrel=2
7 _bigver=Nessus-$pkgver-fc14
8 pkgdesc="Vulnerability scanner"
9 arch=('i686' 'x86_64')
10 depends=('openssl' 'gnupg')
11 makedepends=('rpmextract')
12 license=('custom')
13 url="http://www.nessus.org"
14 install=nessus.install
16 # Download the rpm from <http://tenable.com/products/nessus/nessus-download-agreement>
17 # 32-bit: Nessus-4.4.0-fc14.i386.rpm (12103 KB)
18 # 64-bit: Nessus-4.4.0-fc14.x86_64.rpm (12092 KB)
19 source=($_bigver.x86_64.rpm
20         nessusd
21         nessus.sh
22         LICENSE.NESSUS
23         nessus.install)
25 md5sums=('5fad2a71cab0f1448c098d97e3c3a6c8'
26          '389dab32c24f0f70bfab18c8f7df5892'
27          '8c5772ac63f97d94475fe03e80d6ba5c'
28          '8ff98bc9488304fcb66753d3cfb5f30e'
29          'd9d25d4075acc50c0050c7a4f244c7cb')
31 if [[ $CARCH = i686 ]]; then
32   source[0]="$_bigver.i386.rpm"
33   md5sums[0]='7f1f490407b267ca8b41130dfc73baa0'
36 build() {
37   cd "$srcdir"
39   if [[ $CARCH = i686 ]]; then
40     rpmextract.sh $_bigver.i386.rpm &>/dev/null
41   else
42     rpmextract.sh $_bigver.$CARCH.rpm &>/dev/null
43   fi
45   # binaries to patch (is this still needed?)
46   local patch_files=(opt/nessus/bin/nasl
47                      opt/nessus/bin/nessus-fetch
48                      opt/nessus/bin/nessus
49                      opt/nessus/bin/nessuscmd
50                      opt/nessus/sbin/nessusd
51                      opt/nessus/sbin/nessus-adduser
52                      opt/nessus/sbin/nessus-admin
53                      opt/nessus/sbin/nessus-chpasswd
54                      opt/nessus/sbin/nessus-check-signature
55                      opt/nessus/sbin/nessus-mkcert
56                      opt/nessus/sbin/nessus-mkcert-client
57                      opt/nessus/sbin/nessus-rmuser
58                      opt/nessus/sbin/nessus-update-plugins)
60   # patch binaries (is this still needed?)
61   local file
62   for file in ${patch_files[@]}; do
63     sed -i 's/libcrypto.so.10/libcrypto.so\x00\x00\x00/g' $file
64     sed -i 's/libssl.so.10/libssl.so\x00\x00\x00/g' $file
65   done
68 package() {
69   install -Dm755 $pkgname.sh "$pkgdir/etc/profile.d/$pkgname.sh"
71   mkdir -p "$pkgdir/etc/ld.so.conf.d" "$pkgdir/usr/share" "$pkgdir/opt/nessus"
73   # path to libraries
74   echo /opt/nessus/lib > "$pkgdir/etc/ld.so.conf.d/nessus.conf"
76   # man pages
77   cp -a opt/nessus/man "$pkgdir/usr/share/man"
79   # main files
80   cp -a opt/nessus/{bin,com,etc,lib,sbin,var} "$pkgdir/opt/nessus"
82   # daemon script
83   install -Dm755 nessusd "$pkgdir/etc/rc.d/nessusd"
85   # license
86   install -Dm644 LICENSE.NESSUS "$pkgdir/usr/share/licenses/nessus/LICENSE.NESSUS"