description A network library oriented towards developers.
long_description Netwib is a network library providing network features \
such as address conversion, udp/tcp clients/servers, packet \
encoding/decoding/displaying, spoofing, sniffing, etc., and \
general features such as data conversion, linked list and \
hash, portable threads, etc. Using all these functions, a \
network program can be quickly created.
homepage http://www.laurentconstantin.com/
master_sites ${homepage}common/netw/${name}/download/v5/ \
http://www.mirrors.wiretapped.net/security/packet-construction/${name}
distfiles ${distname}-src${extract.suffix} \
${distname}-doc_html${extract.suffix}
checksums ${distname}-src${extract.suffix} md5 dcd41f26fc8a0ea381c48940c072ef61 \
${distname}-doc_html${extract.suffix} md5 cb56b8844c3a2322e365e265e30d37fd
depends_lib port:libpcap \
worksrcdir ${distname}-src/src
reinplace "s|/usr/local|${prefix}|g" ${worksrcpath}/config.dat
reinplace "s|\\(NETWIBDEF_PROGCC_INC=\\)\"\"|\\1-I${prefix}/include|g" ${worksrcpath}/config.dat
reinplace "s|\\(NETWIBDEF_PROGCC_LIB=\\)\"\"|\\1-L${prefix}/lib|g" ${worksrcpath}/config.dat
reinplace "s|/man|/share/man|g" ${worksrcpath}/config.dat
reinplace "s|/share/man3|/man3|g" ${worksrcpath}/config.dat
reinplace "s|/usr/include/pcap/|${prefix}/include/pcap|g" ${worksrcpath}/genemake
xinstall -d -m 755 ${destroot}${prefix}/share/doc/${name}
file copy ${workpath}/${distname}-doc_html ${destroot}${prefix}/share/doc/${name}/html
xinstall -m 644 -v -W ${worksrcpath}/../doc/ changelog.txt credits.txt \
guidestyle.txt todo.txt ${destroot}${prefix}/share/doc/${name}/
ui_msg "\nFull html documentation is installed as part of the port at:\n
${prefix}/share/doc/${name}/html/\n"