Ticket #17831: MetaSploit3-Portfile

File MetaSploit3-Portfile, 2.6 KB (added by paleck@…, 15 years ago)

Updated Metasploit3 Portfile

Line 
1# $Id: Portfile 32352 2007-12-27 07:06:28Z jmpp@macports.org $
2
3PortSystem 1.0
4name            metasploit3
5version         3.0
6revision        0
7categories      security
8maintainers     opendarwin.org@darkart.com
9description     Tools and information for security research and pentesting
10homepage        http://metasploit.com/
11platforms       darwin
12
13long_description \
14                The Metasploit Project goal is to provide useful information to people \
15                who perform penetration testing, IDS signature development, and exploit \
16                research. This framework was created to fill the gaps in the information \
17                publicly available on various exploitation techniques and to create a \
18                useful resource for exploit developers. The tools and information are \
19                provided for legal security research and testing purposes only.
20
21master_sites    http://framework.metasploit.com/releases/
22
23distfiles       framework-${version}.tar.gz
24worksrcdir      framework-${version}
25
26checksums       md5 ab98f0a09b371f9638c7f49f1b83f5c4 \
27                sha1 e6636cb5849f2403c8b6a8812205f4a249d63df3
28
29depends_lib     port:ruby \
30                port:rb-rails \
31                port:readline
32
33patchfiles      patch-data-msfweb-config-environment.rb \
34                patch-msfcli                            \
35                patch-msfconsole                        \
36                patch-msfd                              \
37                patch-msfencode                         \
38                patch-msfgui                            \
39                patch-msfopcode                         \
40                patch-msfpayload                        \
41                patch-msfpescan                         \
42                patch-msfweb                            \
43                patch-tools-module_license.rb           \
44                patch-tools-msf_irb_shell.rb
45
46
47use_configure   no
48build           {
49                        ## remove the .svn/ directories, no need to move them around
50                        system "cd ${worksrcpath} && find . -type d -name '\.svn' | xargs /bin/rm -rf"
51                        foreach file [glob -directory ${worksrcpath} msf*] {
52                                reinplace "s|#!/usr/bin/perl|#!${prefix}/bin/perl|" $file
53                        }
54                }
55destroot        {
56                        set metasploitTargetDir "libexec/metasploit3"
57                        xinstall -d -m 755 ${destroot}/${prefix}/${metasploitTargetDir}
58                        foreach file [glob -directory ${workpath}/${worksrcdir} *]  {
59                                file copy ${file} ${destroot}/${prefix}/${metasploitTargetDir}
60                        }
61##cd appears to have been removed in 1.7 and no on updated the portfile...
62#                       cd ${destroot}/${prefix}/sbin
63##
64                        foreach file [glob -directory ${destroot}/${prefix}/${metasploitTargetDir} msf*]  {
65                                set useFile [file tail ${file}]
66## 'file link' doesn't play nice, it doesn't (seem) to want to do relative paths...
67##                              file link -symbolic ${useFile} ../${metasploitTargetDir}/${useFile}
68## so use 'system "ln -s ..."' instead.
69##Quick and dirty fix for the removal of cd from 1.7 as far as the tcl interpreter is concerned
70#                               system "ln -s ../${metasploitTargetDir}/${useFile} ${useFile}"
71                                system "cd ${destroot}/${prefix}/sbin && ln -s ../${metasploitTargetDir}/${useFile} ${useFile}"
72##
73                        }
74                 }
75
76
77
78#
79##EOF