dev-ruby/actioncable: add rails 5.1.1
[gentoo.git] / net-analyzer / nessus-bin / nessus-bin-6.10.5.ebuild
1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 inherit rpm pax-utils systemd
7
8 MY_P="Nessus-${PV}-es7"
9
10 DESCRIPTION="A remote security scanner for Linux"
11 HOMEPAGE="https://www.tenable.com/"
12 SRC_URI="${MY_P}.x86_64.rpm"
13
14 LICENSE="GPL-2 Nessus-EULA"
15 SLOT="0"
16 KEYWORDS="~amd64"
17
18 RESTRICT="mirror fetch strip"
19
20 QA_PREBUILT="opt/nessus/bin/nasl
21         opt/nessus/bin/ndbg
22         opt/nessus/bin/nessus-mkrand
23         opt/nessus/lib/nessus/libjemalloc.so.${PV}
24         opt/nessus/lib/nessus/libnessus-glibc-fix.so
25         opt/nessus/sbin/nessus-check-signature
26         opt/nessus/sbin/nessus-service
27         opt/nessus/sbin/nessuscli
28         opt/nessus/sbin/nessusd"
29
30 S="${WORKDIR}"
31
32 pkg_nofetch() {
33         einfo "Please download ${A} from ${HOMEPAGE}/download"
34         einfo "The archive should then be placed into ${DISTDIR}."
35 }
36
37 src_install() {
38         # Using doins -r would strip executable bits from all binaries
39         cp -pPR "${S}"/opt "${D}"/ || die "Failed to copy files"
40
41         pax-mark m "${D}"/opt/nessus/sbin/nessusd
42
43         # Make sure these originally empty directories do not vanish,
44         # Nessus will not run properly without them
45         keepdir /opt/nessus/com/nessus/CA
46         keepdir /opt/nessus/etc/nessus
47         keepdir /opt/nessus/lib/nessus/plugins
48         keepdir /opt/nessus/var/nessus/logs
49         keepdir /opt/nessus/var/nessus/tmp
50         keepdir /opt/nessus/var/nessus/users
51
52         newinitd "${FILESDIR}"/nessusd-initd nessusd-bin
53         systemd_newunit usr/lib/systemd/system/nessusd.service nessusd-bin.service
54 }
55
56 pkg_postinst() {
57         if [[ -z "${REPLACING_VERSIONS}" ]]; then
58                 elog "To get started launch the nessusd-bin service, then point your Web browser to"
59                 elog "  https://<yourhost>:8834/"
60         else
61                 elog "You may want to restart the nessusd-bin service to use"
62                 elog "the new version of Nessus."
63         fi
64 }