Ticket #13419: Portfile

File Portfile, 2.5 KB (added by ralf@…, 17 years ago)

fixed Portfile

Line 
1# $Id: Portfile 26552 2007-06-28 08:26:14Z mgrimes@macports.org $
2
3PortSystem       1.0
4
5name             blackbag
6version          0.9
7categories       net security
8platforms        darwin
9maintainers      ecronin@gizmolabs.org
10description      A miscelleny of network testing tools.
11long_description Blackbag is Matasano's suite of penetration testing and \
12                 reverse engineering tools. What started as a binary \
13                 interactive netcat, has evolved into our "blackbag" of \
14                 tools to help us understand and attack proprietary \
15                 protocols, find compressed images inside of files and more!
16
17homepage         http://www.matasano.com/tools/blackbag/
18master_sites     http://www.sockpuppet.org/
19extract.suffix   .tgz
20checksums        md5  9603a1c387b1cb0fc7e1a200002b578f \
21                 sha1 7931f258f06853188c052eb2d72a2d4c6fb8f8b1
22
23depends_lib      port:libevent port:libpcap port:openssl port:zlib
24
25use_configure    no
26
27build.env        LFLAGS="-L${prefix}/lib" \
28                 IFLAGS="-I${prefix}/include"
29
30patchfiles       patch-bkb
31
32post-patch {
33    reinplace "s|/usr/local|\$\(DESTDIR\)/${prefix}|g" ${worksrcpath}/Makefile
34    reinplace "s|/usr/local|${prefix}|g" ${worksrcpath}/bkb
35    reinplace "s|/usr/local|${prefix}|g" ${worksrcpath}/sub.c
36    reinplace "s|/usr/local|\$\(DESTDIR\)/${prefix}|g" ${worksrcpath}/asn/Makefile
37    reinplace "s|/usr/local/bin|${prefix}/bin/blackbag|g" ${worksrcpath}/asn/asn
38    reinplace "s|shift|#shift|g" ${worksrcpath}/asn/asn
39    reinplace "s|-I../third-party/libevent-1.0b||g" ${worksrcpath}/Makefile
40    reinplace "s|-L../third-party/libevent-1.0b||g" ${worksrcpath}/Makefile
41    reinplace "s|-g||g" ${worksrcpath}/common.mk
42    reinplace "s|-I\$\(TOP\)/../third-party/libevent-1.0b||g" ${worksrcpath}/common.mk
43    reinplace "s|-L\$\(TOP\)/../third-party/libevent-1.0b||g" ${worksrcpath}/common.mk
44    reinplace "s|-L\$\(TOP\)/../third-party/libevent-1.0b||g" ${worksrcpath}/asn/Makefile
45    system "touch ${worksrcpath}/sub.macros"
46}
47
48post-build {
49    cd ${worksrcpath}/asn
50    system "${build.cmd}"   
51}
52
53post-destroot {
54    cd ${worksrcpath}/asn
55    file rename asn asn1
56    system "${build.cmd} install ${build.target} DESTDIR=${destroot}"
57    xinstall -m 755 -d  ${destroot}${prefix}/share/doc/${name}
58    xinstall -m 0644 ${worksrcpath}/README \
59        ${destroot}${prefix}/share/doc/${name}/README
60}
61
62
63platform darwin 9 {
64    post-patch {
65        reinplace "s|setpgrp|setpgid|g" ${worksrcpath}/tsec.c
66    }
67}