Ticket #11067: metasploit2.diff

File metasploit2.diff, 3.3 KB (added by pmq@…, 18 years ago)
  • Portfile

     
    11# $Id$
    22
    33PortSystem 1.0
     4
    45name            metasploit2
    5 version         2.5
    6 revision        0
    7 categories      security
     6version         2.7
     7categories      security net
     8platforms       darwin
    89maintainers     opendarwin.org@darkart.com
    9 description     its metasploit...
    10 homepage        http://metasploit.com/
    11 platforms       darwin
    1210
    13 long_description A framework for, ahem, testing software.
     11description     Tools and information for security research and pentesting
     12long_description \
     13    The Metasploit Project goal is to provide useful information to people \
     14    who perform penetration testing, IDS signature development, and exploit \
     15    research. This framework was created to fill the gaps in the information \
     16    publicly available on various exploitation techniques and to create a \
     17    useful resource for exploit developers. The tools and information are \
     18    provided for legal security research and testing purposes only.
    1419
    15 master_sites    http://www.metasploit.com/tools/
     20homepage        http://metasploit.com
     21master_sites    ${homepage}/tools
    1622
    1723distfiles       framework-${version}.tar.gz
    1824worksrcdir      framework-${version}
    1925
    20 checksums       md5 af317c1c673a1ce4523c6fa7b651e1c5 \
    21                 sha1 16d2d3efb2c3930b95913693f01ebf35653fe737
     26checksums       sha1 da5d41dfa13e549aacd4fbf2994877cbe80ceed9 \
     27                rmd160 cfdf2705522c845bb4405413207a7df0f3873b94
    2228
    2329depends_lib     port:perl5.8 \
    2430                port:p5-term-readline-gnu \
    2531                port:p5-net-ssleay
    2632
    27 configure       {}
    28 build           {
    29                         foreach file [glob -directory ${worksrcpath} msf*] {
    30                                 reinplace "s|#!/usr/bin/perl|#!${prefix}/bin/perl|" $file
    31                         }
    32                 }
    33 destroot        {
    34                         set metasploitTargetDir "libexec/metasploit2"
    35                         xinstall -d -m 755 ${destroot}/${prefix}/${metasploitTargetDir}
    36                         foreach file [glob -directory ${workpath}/${worksrcdir} *]  {
    37                                 file copy ${file} ${destroot}/${prefix}/${metasploitTargetDir}
    38                         }
    39                         cd ${destroot}/${prefix}/sbin
    40                         foreach file [glob -directory ${destroot}/${prefix}/${metasploitTargetDir} msf*]  {
    41                                 set useFile [file tail ${file}]
    42 ## 'file link' doesn't play nice, it doesn't (seem) to want to do relative paths...
    43 ##                              file link -symbolic ${useFile} ../${metasploitTargetDir}/${useFile}
    44 ## so use 'system "ln -s ..."' instead.
    45                                 system "ln -s ../${metasploitTargetDir}/${useFile} ${useFile}"
    46                         }
    47                  }
     33use_configure   no
    4834
     35build {
     36    # remove all .svn/
     37    system "cd ${worksrcpath} && find . -type d -iname '\.svn' -print | xargs rm -rf"
    4938
     39    foreach file [glob -directory ${worksrcpath} msf*] {
     40        reinplace "s|#!/usr/bin/perl|#!${prefix}/bin/perl|" $file
     41    }
     42}
    5043
    51 #
    52 ##EOF
     44destroot {
     45    set metasploitTargetDir "libexec/metasploit2"
     46    set metasploitDestroot ${destroot}/${prefix}/${metasploitTargetDir}
     47
     48    xinstall -d -m 755 ${metasploitDestroot}
     49    foreach file [glob -directory ${worksrcpath} *]  {
     50        file copy ${file} ${metasploitDestroot}
     51    }
     52
     53    cd ${destroot}/${prefix}/sbin
     54    foreach file [glob -directory ${metasploitDestroot} msf*]  {
     55        set useFile [file tail ${file}]
     56        # 'file link' doesn't play nice, it doesn't (seem) to want to do relative paths...
     57        # file link -symbolic ${useFile} ../${metasploitTargetDir}/${useFile}
     58        # so use 'system "ln -s ..."' instead.
     59        system "ln -s ../${metasploitTargetDir}/${useFile} ${useFile}"
     60    }
     61}