source: trunk/dports/security/metasploit2/Portfile

Last change on this file was 151889, checked in by mojca@…, 11 months ago

metasploit2: switch to perl5.24 (#52081)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.8 KB
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
2# $Id: Portfile 151889 2016-08-23 21:31:57Z ryandesign@macports.org $
3
4PortSystem          1.0
5PortGroup           perl5 1.0
6
7name                metasploit2
8conflicts           metasploit3
9version             2.7
10revision            3
11categories          security
12license             {Artistic-1 GPL-2} GPL-2+ APSL-1.1 Noncommercial Restrictive
13maintainers         nomaintainer
14homepage            http://metasploit.com/
15platforms           darwin
16
17description         Tools and information for security research and pentesting
18long_description    The Metasploit Project goal is to provide useful information to people \
19                    who perform penetration testing, IDS signature development, and exploit \
20                    research. This framework was created to fill the gaps in the information \
21                    publicly available on various exploitation techniques and to create a \
22                    useful resource for exploit developers. The tools and information are \
23                    provided for legal security research and testing purposes only.
24
25# This no longer works. New versions are probably available under
26# https://github.com/rapid7/metasploit-framework
27# Maybe it's time to retire version 2 of this port anyway
28#master_sites       http://www.metasploit.com/tools/
29master_sites        macports_distfiles
30
31distname            framework-${version}
32
33checksums           rmd160  cfdf2705522c845bb4405413207a7df0f3873b94 \
34                    sha256  516952772aaa8982628460b927c9119850925f870903c5a131a9c9f0390cf77f
35
36perl5.branches      5.24
37
38depends_run         port:perl${perl5.major} \
39                    port:p${perl5.major}-net-ssleay \
40                    port:p${perl5.major}-term-readline-gnu
41
42use_configure       no
43
44build {
45    ## remove the .svn/ directories, no need to move them around
46    system "cd ${worksrcpath} && find . -type d -name '\.svn' | xargs /bin/rm -rf"
47    foreach file [glob -directory ${worksrcpath} msf*] {
48        reinplace "s|#!/usr/bin/perl|#!${perl5.bin}|" $file
49    }
50}
51
52destroot {
53    set metasploitTargetDir "libexec/${name}"
54    xinstall -d -m 755 ${destroot}${prefix}/${metasploitTargetDir}
55    foreach file [glob -directory ${workpath}/${worksrcdir} *] {
56        file copy ${file} ${destroot}${prefix}/${metasploitTargetDir}
57    }
58    foreach file [glob -directory ${destroot}${prefix}/${metasploitTargetDir} msf*] {
59        set useFile [file tail ${file}]
60## 'file link' doesn't play nice, it doesn't (seem) to want to do relative paths...
61##              file link -symbolic ${useFile} ../${metasploitTargetDir}/${useFile}
62## so use 'system "ln -s ..."' instead.
63        system "cd ${destroot}${prefix}/sbin && /bin/ln -s ../${metasploitTargetDir}/${useFile} ${useFile}"
64    }
65}
Note: See TracBrowser for help on using the repository browser.