diff options
author | 2012-02-28 08:09:31 +0000 | |
---|---|---|
committer | 2012-02-28 08:09:31 +0000 | |
commit | 26909204042fdb8694d4bf632f9f5f48c932eadb (patch) | |
tree | b85c73855b9ec4817adcbe789a26772621fb28e7 /net-analyzer/metasploit/metasploit-4.2.0.ebuild | |
parent | Version bump, CVE-2012-0840, bug 403731 (diff) | |
download | gentoo-2-26909204042fdb8694d4bf632f9f5f48c932eadb.tar.gz gentoo-2-26909204042fdb8694d4bf632f9f5f48c932eadb.tar.bz2 gentoo-2-26909204042fdb8694d4bf632f9f5f48c932eadb.zip |
Bump, remove old
(Portage version: 2.2.0_alpha89/cvs/Linux x86_64)
Diffstat (limited to 'net-analyzer/metasploit/metasploit-4.2.0.ebuild')
-rw-r--r-- | net-analyzer/metasploit/metasploit-4.2.0.ebuild | 91 |
1 files changed, 91 insertions, 0 deletions
diff --git a/net-analyzer/metasploit/metasploit-4.2.0.ebuild b/net-analyzer/metasploit/metasploit-4.2.0.ebuild new file mode 100644 index 000000000000..dd5ade5883b3 --- /dev/null +++ b/net-analyzer/metasploit/metasploit-4.2.0.ebuild @@ -0,0 +1,91 @@ +# 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-4.2.0.ebuild,v 1.1 2012/02/28 08:09:31 patrick Exp $ + +EAPI="3" +inherit eutils + +SRC_URI="http://updates.metasploit.com/data/releases/framework-${PV}.tar.bz2" + +DESCRIPTION="Advanced open-source framework for developing, testing, and using vulnerability exploit code" +HOMEPAGE="http://www.metasploit.org/" + +LICENSE="BSD" +SLOT="4.1" +KEYWORDS="~amd64 ~ppc ~sparc ~x86" +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}/msf + +src_configure() { + # upstream makes weird tarbllz + 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.xpm + + # Avoid useless revdep-rebuild trigger #377617 + dodir /etc/revdep-rebuild/ + echo "SEARCH_DIRS_MASK=\"/usr/lib*/${PN}${SLOT}/data/john\"" > \ + "${D}"/etc/revdep-rebuild/70-${PN}-${SLOT} +} + +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 +} |