Want more features on Pastebin? Sign Up, it's FREE!
Guest

nessus pkgbuild

By: a guest on Jan 25th, 2012  |  syntax: Bash  |  size: 2.49 KB  |  views: 176  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. # Maintainer: Daniel Micay <danielmicay@gmail.com>
  2. # Contributer: Pranay Kanwar <pranay.kanwar@gmail.com>
  3.  
  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
  14.  
  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)
  23.  
  24. md5sums=('5fad2a71cab0f1448c098d97e3c3a6c8'
  25.          '389dab32c24f0f70bfab18c8f7df5892'
  26.          '8c5772ac63f97d94475fe03e80d6ba5c'
  27.          '8ff98bc9488304fcb66753d3cfb5f30e'
  28.          'd9d25d4075acc50c0050c7a4f244c7cb')
  29.  
  30. if [[ $CARCH = i686 ]]; then
  31.   source[0]="$_bigver.i386.rpm"
  32.   md5sums[0]='7f1f490407b267ca8b41130dfc73baa0'
  33. fi
  34.  
  35. build() {
  36.   cd "$srcdir"
  37.  
  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)
  52.  
  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
  59. }
  60.  
  61. package() {
  62.   install -Dm755 $pkgname.sh "$pkgdir/etc/profile.d/$pkgname.sh"
  63.  
  64.   mkdir -p "$pkgdir/etc/ld.so.conf.d" "$pkgdir/usr/share" "$pkgdir/opt/nessus"
  65.  
  66.   # path to libraries
  67.   echo /opt/nessus/lib > "$pkgdir/etc/ld.so.conf.d/nessus.conf"
  68.  
  69.   # man pages
  70.   cp -a opt/nessus/man "$pkgdir/usr/share/man"
  71.  
  72.   # main files
  73.   cp -a opt/nessus/{bin,com,etc,lib,sbin,var} "$pkgdir/opt/nessus"
  74.  
  75.   # daemon script
  76.   install -Dm755 nessusd "$pkgdir/etc/rc.d/nessusd"
  77.  
  78.   # license
  79.   install -Dm644 LICENSE.NESSUS "$pkgdir/usr/share/licenses/nessus/LICENSE.NESSUS"
  80. }
clone this paste RAW Paste Data