updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / nessus / PKGBUILD
blobfa4302d95566e7b3950710550d6fe8289fa173fd
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 license=('custom')
12 url="http://www.nessus.org"
13 install=nessus.install
15 # Download the rpm from <http://tenable.com/products/nessus/nessus-download-agreement>
16 # 32-bit: Nessus-4.4.0-fc14.i386.rpm (12103 KB)
17 # 64-bit: Nessus-4.4.0-fc14.x86_64.rpm (12092 KB)
18 source=($_bigver.x86_64.rpm
19         nessusd
20         nessus.sh
21         LICENSE.NESSUS
22         nessus.install)
24 md5sums=('5fad2a71cab0f1448c098d97e3c3a6c8'
25          '389dab32c24f0f70bfab18c8f7df5892'
26          '8c5772ac63f97d94475fe03e80d6ba5c'
27          '8ff98bc9488304fcb66753d3cfb5f30e'
28          'd9d25d4075acc50c0050c7a4f244c7cb')
30 if [[ $CARCH = i686 ]]; then
31   source[0]="$_bigver.i386.rpm"
32   md5sums[0]='7f1f490407b267ca8b41130dfc73baa0'
35 build() {
36   cd "$srcdir"
38   # binaries to patch (is this still needed?)
39   local patch_files=(opt/nessus/bin/nasl
40                      opt/nessus/bin/nessus-fetch
41                      opt/nessus/bin/nessus
42                      opt/nessus/bin/nessuscmd
43                      opt/nessus/sbin/nessusd
44                      opt/nessus/sbin/nessus-adduser
45                      opt/nessus/sbin/nessus-admin
46                      opt/nessus/sbin/nessus-chpasswd
47                      opt/nessus/sbin/nessus-check-signature
48                      opt/nessus/sbin/nessus-mkcert
49                      opt/nessus/sbin/nessus-mkcert-client
50                      opt/nessus/sbin/nessus-rmuser
51                      opt/nessus/sbin/nessus-update-plugins)
53   # patch binaries (is this still needed?)
54   local file
55   for file in ${patch_files[@]}; do
56     sed -i 's/libcrypto.so.10/libcrypto.so\x00\x00\x00/g' $file
57     sed -i 's/libssl.so.10/libssl.so\x00\x00\x00/g' $file
58   done
61 package() {
62   install -Dm755 $pkgname.sh "$pkgdir/etc/profile.d/$pkgname.sh"
64   mkdir -p "$pkgdir/etc/ld.so.conf.d" "$pkgdir/usr/share" "$pkgdir/opt/nessus"
66   # path to libraries
67   echo /opt/nessus/lib > "$pkgdir/etc/ld.so.conf.d/nessus.conf"
69   # man pages
70   cp -a opt/nessus/man "$pkgdir/usr/share/man"
72   # main files
73   cp -a opt/nessus/{bin,com,etc,lib,sbin,var} "$pkgdir/opt/nessus"
75   # daemon script
76   install -Dm755 nessusd "$pkgdir/etc/rc.d/nessusd"
78   # license
79   install -Dm644 LICENSE.NESSUS "$pkgdir/usr/share/licenses/nessus/LICENSE.NESSUS"