aboutsummaryrefslogblamecommitdiffstats
path: root/community/openvas-scanner/APKBUILD
blob: 7b2ee5a3e6f043ccf1c4c183f121277462cb664b (plain) (tree)
1
2
3
4
5
6
7
8
9



                                                           
            
        
                                                 

                             
                 
                                                 
                       

                                                            
                                                      
                                          
                                                                                              

                       
                      
                           
                               

                               
 
                                   

         
                      




                                             
            

 




                      
           
                      
                                      


                                                                                        
                                                                                      

                                                               
 







                                                                                                            
                         







                                                                                                                     
 
                                                                                                                                                                          

                                                                                                                                                 
                                                                                                                                                
                                                                                                                                                     
                                                                                                                                                         

                                                                                                                                                         
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=openvas-scanner
_pkgname=openvassd
pkgver=6.0.0
pkgrel=3
pkgdesc="OpenVAS remote network security scanner"
url="http://www.openvas.org/"
arch="all"
license="GPL-2.0"
depends="redis nmap coreutils openssl util-linux"
checkdepends="cppcheck"
makedepends="cmake bison gvm-libs-dev glib-dev libgcrypt-dev
	doxygen xmltoman graphviz libpcap-dev gpgme-dev
	clang-dev libssh-dev libksba-dev net-snmp-dev"
subpackages="$pkgname-doc $pkgname-openrc"
source="$pkgname-$pkgver.tar.gz::https://github.com/greenbone/$pkgname/archive/v$pkgver.tar.gz
	$_pkgname.initd
	$_pkgname.confd
	$_pkgname.conf
	$_pkgname.logrotate
	greenbone-nvt-sync.cron
	execinfo-musl-fix.patch
	malloc-trim.patch"

builddir="$srcdir"/$pkgname-$pkgver

build() {
	cd "$builddir"
	cmake -DCMAKE_BUILD_TYPE=Release \
		-DSBINDIR=/usr/bin \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DSYSCONFDIR=/etc \
		-DLOCALSTATEDIR=/var .
	make
}

check() {
	cd "$builddir"
	make check
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
	install -Dm644 "$srcdir/$_pkgname.logrotate" "$pkgdir/etc/logrotate.d/$_pkgname"
	install -m755 -D "$srcdir"/$_pkgname.initd "$pkgdir"/etc/init.d/$_pkgname
	install -m755 -D "$srcdir"/$_pkgname.confd "$pkgdir"/etc/conf.d/$_pkgname
	install -m755 -D "$srcdir"/$_pkgname.conf "$pkgdir"/etc/openvas/$_pkgname.conf
	install -Dm744 "$srcdir"/greenbone-nvt-sync.cron \
		"$pkgdir"/etc/periodic/daily/greenbone-nvt-sync

	mkdir -p "$pkgdir"/usr/share/doc/$_pkgname
	cat >"$pkgdir"/usr/share/doc/$_pkgname/README.alpine <<EOF
	** In order to make openvas-scanner daemon start, redis server needs to run and  listen to a socket.
	** This is a part of redis.conf that should be adjusted:

		unixsocket /tmp/redis.sock
		unixsocketperm 700
		port 0 # prevent redis from listening on a TCP socket
		timeout 0
		#DB = 1 + (#of parallel tasks) * (#of parallel hosts)
		databases 128
		#CLI = 1 + (#of parallel tasks) * (#of parallel hosts) * (#of concurrent NVTs)
		maxclients 512
	** Further info can be found to:
		https://svn.wald.intevation.org/svn/openvas/tags/openvas-scanner-release-$pkgver/doc/redis_config.txt

EOF
}
sha512sums="5d538476275ffc9f31f4f2934f2f57b741043728c9d107c07a88970f0d7a158baf3f40f1d8abb96dbb33f173c4fc21158be08c58de477857ff08cf897955c7b9  openvas-scanner-6.0.0.tar.gz
fe8f81ac4d326611d077dc2c81d74f8e1e2c7b9e10eaaf3d30b2dcd8d2ede40ec060ff70678bda7445b5c1d8d758e164ab8bb9c06258afde2b10a0c241927cc3  openvassd.initd
47304976c18f1a561aec8e21406864d086898153b307dcc8e92117c400c9379e448920c2bbebc4b0b18fbb65c19a3d00d4d3e24a1a9a81d788a59fdc40bc0154  openvassd.confd
2d0d2321412fc87d1479494de9ed947c905df9e022a90f95b5d52e4c2838dc254e968aa61eb6660dd5543d4f681b9d165915570d5e5c6cd39b623ec88234807d  openvassd.conf
5934a31ef4b7267fd741c41bb97fe2e1e42735d2324cce07145de1942efae3f5e42e8652ec0c3482dd53477be420a58124eae943f254105547abf065febb9046  openvassd.logrotate
da53e5c5e3ab70749249c2bf6c4fe0e0d17a2afb39d4519eb7fdf873c3fedf925183db050ab5395a3fe7f1ce79d95bf4f55c69611205d00dc519ce15418bd915  greenbone-nvt-sync.cron
c4bdd5bb78c729b08b491ccc1f083ce62699fbaf6f780ef51f1ba6e85261f362bc394ee0a831c63a2ae9b1bbeeb75e17032aff3abf5130b70b9e1f5026eb3dcc  execinfo-musl-fix.patch
ae4f35ba0705eb16e98765f370a3225bbca6de4bcffeff20cde1d6d1a3487036ff5f683d9e38f0df3308770656876e240fc75c62ba9e2bb1d2e4998ac80e6395  malloc-trim.patch"