source: trunk/dports/security/ophcrack/Portfile @ 120831

Last change on this file since 120831 was 120831, checked in by ryandesign@…, 5 years ago

ophcrack: use a patchfile instead of just a reinplace

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.6 KB
Line 
1# $Id: Portfile 120831 2014-06-09 05:48:58Z ryandesign@macports.org $
2
3PortSystem          1.0
4
5name                ophcrack
6version             3.3.1
7revision            2
8categories          security
9maintainers         nomaintainer
10description         Microsoft Windows password cracker
11long_description    Ophcrack is a free Windows password cracker based on \
12                    rainbow tables. It is a very efficient implementation \
13                    of rainbow tables done by the inventors of the method.
14
15homepage            http://ophcrack.sourceforge.net
16platforms           darwin
17master_sites        sourceforge
18
19use_bzip2           yes
20checksums           ${distname}${extract.suffix} md5 740eef54e9082f26851e15c1cb4ef55c \
21                    ${distname}${extract.suffix} sha1 65982407f0b7738940d5444530492ce1d81899f9 \
22                    ${distname}${extract.suffix} rmd160 3a4562e861eb90030c68b067a02cc41271ee8c66
23
24configure.args      --disable-gui --disable-graph
25
26set hasMoreThan512MBofRAM 0
27catch {set hasMoreThan512MBofRAM [expr [sysctl hw.memsize] >= 536870912]}
28
29post-extract {
30    if {[variant_isset tables]} {
31        set tables_dir ${destroot}${prefix}/share/${name}/tables
32       
33        if ${hasMoreThan512MBofRAM} {
34            xinstall -m 755 -d ${tables_dir}/xp_free_fast
35            system "unzip ${distpath}/tables_xp_free_fast.zip -d ${tables_dir}/xp_free_fast"
36        } else {
37            xinstall -m 755 -d ${tables_dir}/xp_free_small
38            system "unzip ${distpath}/tables_xp_free_small.zip -d ${tables_dir}/xp_free_small"
39        }
40       
41        xinstall -m 755 -d ${tables_dir}/vista_free
42        system "unzip ${distpath}/tables_vista_free.zip -d ${tables_dir}/vista_free"
43    }
44}
45
46destroot {
47    if {[variant_isset gui]} {
48        xinstall -m 755 -d ${destroot}${applications_dir}
49        copy ${worksrcpath}/src/${name}.app ${destroot}${applications_dir}
50    } else {
51        xinstall -m 755 -d ${destroot}${prefix}/bin
52        copy ${worksrcpath}/src/${name} ${destroot}${prefix}/bin
53    }
54}
55
56post-activate {
57    if {[variant_isset tables]} {
58        ui_msg "****************************************************"
59        ui_msg ""
60        ui_msg "  Free rainbow tables have been installed into"
61        ui_msg "  ${prefix}/share/${name}/tables"
62        ui_msg ""
63        ui_msg "  Visit http://ophcrack.sourceforge.net/tables.php"
64        ui_msg "  to get more (non-free) rainbow tables."
65        ui_msg ""
66        ui_msg "****************************************************"
67    }
68}
69
70variant gui description {Builds the GUI version instead of the CLI version, requires the qt4-mac port} {
71    PortGroup qt4 1.0
72    configure.args-delete --disable-gui
73    configure.args-append --with-libqt4=${qt_dir}
74}
75
76variant tables description {Installs the free rainbow tables for Windows XP and Vista (700+ MB)} {
77    if ${hasMoreThan512MBofRAM} {
78        distfiles-append tables_xp_free_fast.zip
79        checksums-append tables_xp_free_fast.zip sha1 141b8be045055068e8bae6542d484fffdd452641
80    } else {
81        distfiles-append tables_xp_free_small.zip
82        checksums-append tables_xp_free_small.zip sha1 2933bc9e483f79966ee02569d3d91b4d0ecc5a8d
83    }
84   
85    distfiles-append tables_vista_free.zip
86    checksums-append tables_vista_free.zip sha1 31425c6b35679df53ba67cb1cc3807501eec3ced
87   
88    extract.only ${distname}${extract.suffix}
89   
90    patchfiles-append patch-src-gui-tabledialog.cpp.diff
91   
92    post-patch {
93        reinplace "s|@TABLES_DIR@|${prefix}/share/${name}/tables|g" ${worksrcpath}/src/gui/tabledialog.cpp
94    }
95}
96
97livecheck.type  regex
98livecheck.url   ${homepage}/download.php?type=ophcrack
99livecheck.regex The latest version of ophcrack is (\\d(\\.\\d+)*)
Note: See TracBrowser for help on using the repository browser.