summaryrefslogtreecommitdiffstats
path: root/net-analyzer/metasploit/metasploit-9999.ebuild
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2012-08-13 02:51:59 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2012-08-13 02:51:59 +0200
commitf468664f4b315ff796b47d1f3ff90dcac55770d4 (patch)
tree0793310ff4a558b5dffdc90ed144621070eea8fb /net-analyzer/metasploit/metasploit-9999.ebuild
parentFix libotr flaw. (diff)
downloadportage-f468664f4b315ff796b47d1f3ff90dcac55770d4.tar.xz
portage-f468664f4b315ff796b47d1f3ff90dcac55770d4.zip
Add a metasploit that doesn't make revdep rebuild fail.
Diffstat (limited to '')
-rw-r--r--net-analyzer/metasploit/metasploit-9999.ebuild112
1 files changed, 112 insertions, 0 deletions
diff --git a/net-analyzer/metasploit/metasploit-9999.ebuild b/net-analyzer/metasploit/metasploit-9999.ebuild
new file mode 100644
index 0000000..207c813
--- /dev/null
+++ b/net-analyzer/metasploit/metasploit-9999.ebuild
@@ -0,0 +1,112 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/metasploit/metasploit-9999.ebuild,v 1.2 2012/06/08 09:28:04 patrick Exp $
+
+EAPI="3"
+inherit eutils subversion
+
+ESVN_REPO_URI="https://metasploit.com/svn/framework3/trunk"
+
+DESCRIPTION="Advanced open-source framework for developing, testing, and using vulnerability exploit code"
+HOMEPAGE="http://www.metasploit.org/"
+
+LICENSE="BSD"
+SLOT="4.0"
+KEYWORDS=""
+IUSE="gui mysql postgres"
+
+# Note we use bundled gems (see data/msfweb/vendor/rails/) as upstream voted for
+# such solution, bug #247787
+RDEPEND="dev-lang/ruby
+ dev-ruby/rubygems
+ gui? ( virtual/jre )
+ mysql? ( dev-ruby/mysql-ruby
+ dev-ruby/activerecord[mysql] )
+ postgres? ( dev-ruby/ruby-postgres
+ dev-ruby/activerecord[postgres] )"
+DEPEND=""
+
+QA_PRESTRIPPED="
+ usr/lib/${PN}${SLOT}/data/msflinker_linux_x86.bin
+ usr/lib/${PN}${SLOT}/data/templates/template_armle_linux.bin
+ usr/lib/${PN}${SLOT}/data/templates/template_x86_linux.bin"
+
+QA_EXECSTACK="
+ usr/lib/${PN}${SLOT}/data/meterpreter/msflinker_linux_x86.bin"
+QA_WX_LOAD="
+ usr/lib/${PN}${SLOT}/data/templates/template_*_linux.bin"
+
+S=${WORKDIR}/msf3
+
+src_unpack() {
+ subversion_fetch
+}
+
+src_configure() {
+ [[ "${ESVN_REVISION}" == "" ]] \
+ && find "${S}" -type d -name ".svn" -print0 | xargs -0 -n1 rm -R
+
+ rm "${S}"/msfupdate
+ chmod +x "${S}"/msf*
+
+ use gui || rm msfgui
+}
+
+src_install() {
+ # should be as simple as copying everything into the target...
+ dodir /usr/lib/${PN}${SLOT}
+ cp -R "${S}"/* "${D}"/usr/lib/${PN}${SLOT}
+ chown -R root:0 "${D}"
+
+ # do not remove LICENSE, bug #238137
+ dodir /usr/share/doc/${PF}
+ cp "${S}"/{README,HACKING} "${D}"/usr/share/doc/${PF}
+ dosym /usr/lib/${PN}${SLOT}/documentation /usr/share/doc/${PF}/documentation
+
+ dodir /usr/bin/
+ for file in msf*; do
+ dosym /usr/lib/${PN}${SLOT}/${file} /usr/bin/${file}${SLOT}
+ done
+
+ newinitd "${FILESDIR}"/msfrpcd-${SLOT}-initd msfrpcd${SLOT} || die
+ newconfd "${FILESDIR}"/msfrpcd-${SLOT}-conf msfrpcd${SLOT} || die
+
+ use gui && make_desktop_entry msfgui${SLOT} \
+ "Metasploit Framework" \
+ metasploit \
+ 'GNOME;System;Network;' &&
+ doicon "${FILESDIR}"/metasploit.icon
+
+ echo "SEARCH_DIRS_MASK=\"${EPREFIX}/usr/lib*/${PN}4.0\"" > "${T}/80${PN}" || die
+ insinto "/etc/revdep-rebuild" && doins "${T}/80${PN}" || die
+}
+
+pkg_postinst() {
+ if use gui; then
+ elog "You will need to create a /usr/bin/msfrpcd symlink pointing to"
+ elog "the version of msfrpcd if you want to be able to start msfrpcd"
+ elog "from the java gui."
+ elog
+ elog "ln /usr/bin/msfrpcd${SLOT} /usr/bin/msfrpcd"
+ elog
+ fi
+
+ elog "If you wish to update ${PN} manually simply run:"
+ elog
+ elog "ESVN_REVISION=<rev> emerge =${PF}"
+ elog
+ elog "where <rev> is either HEAD (in case you wish to get all updates)"
+ elog "or specific revision number. But NOTE, this update will vanish"
+ elog "next time you reemerge ${PN}. To make update permanent either"
+ elog "create ebuild with specific revision number inside your overlay"
+ elog "or report revision bump bug at http://bugs.gentoo.org ."
+ elog
+ elog "In case you use portage it's also possible to create"
+ elog "/etc/portage/env/${CATEGORY}/${PN} file with ESVN_REVISION=<rev>"
+ elog "content. Then each time you run emerge ${PN} you'll have said"
+ elog "<rev> installed. For example, if you run"
+ elog " # mkdir -p /etc/portage/env/${CATEGORY}"
+ elog " # echo ESVN_REVISION=HEAD >> /etc/portage/env/${CATEGORY}/${PN}"
+ elog "each time you reemerge ${PN} it'll be updated to get all possible"
+ elog "updates for framework-${PV%_p*} branch."
+}