source: trunk/dports/net/gnetcat/Portfile

Last change on this file was 76845, checked in by afb@…, 7 years ago

add gnubin manpages (#27434)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.1 KB
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
2# $Id: Portfile 76845 2011-03-10 14:01:14Z ryandesign@macports.org $
3
4PortSystem      1.0
5
6name            gnetcat
7set my_name     netcat
8version         0.7.1
9revision        1
10homepage        http://netcat.sourceforge.net/
11description     A rewrite of the well-known networking tool, but more portable, with new features and fully GNU compliant.
12long_description \
13    Netcat is a featured networking utility which reads and writes data \
14    across network connections, using the TCP/IP protocol.  It is designed to \
15    be a reliable "back-end" tool that can be used directly or easily driven \
16    by other programs and scripts. At the same time, it is a feature-rich \
17    network debugging and exploration tool, since it can create almost any \
18    kind of connection you would need and has several interesting built-in \
19    capabilities.
20
21categories      net
22platforms       darwin
23maintainers     alum.wpi.edu:arno+macports
24master_sites    sourceforge:${my_name}
25distname        ${my_name}-${version}
26
27checksums \
28    md5 088def25efe04dcdd1f8369d8926ab34 \
29        sha1 b5cbc52a7ceed2fd5c4f5081f5747130b2d0fe01 \
30        rmd160 9eabed2b4b5585a55062b4a82c8c6aee1b01e3b7
31
32depends_lib     \
33        port:gettext \
34        port:getopt \
35        port:libiconv
36
37configure.args \
38    --program-prefix=g \
39    --infodir=${prefix}/share/info \
40    --mandir=${prefix}/share/man
41
42use_parallel_build  yes
43
44set docdir  ${prefix}/share/doc/${my_name}-${version}
45
46test.run    yes
47test.target check
48
49post-configure {
50    # prefix the shortname
51    reinplace "s|netcat_nc = \$(DESTDIR)\$(bindir)/nc|netcat_nc = \$(DESTDIR)\$(bindir)/gnc|" ${worksrcpath}/src/Makefile
52    reinplace "s|ln -s netcat \$(netcat_nc);|ln -s gnetcat \$(netcat_nc);|" ${worksrcpath}/src/Makefile
53}
54
55post-destroot {
56    # prefix the info files
57    foreach {f} [glob -tails -directory ${destroot}${prefix}/share/info *.info] {
58        move ${destroot}${prefix}/share/info/${f} ${destroot}${prefix}/share/info/g${f}
59    }
60    # prefix the locale files
61    foreach {d} [glob -tails -directory ${destroot}${prefix}/share/locale */] {
62        foreach {f} [glob -tails -directory ${destroot}${prefix}/share/locale/${d}/LC_MESSAGES *.mo] {
63            move ${destroot}${prefix}/share/locale/${d}/LC_MESSAGES/${f} ${destroot}${prefix}/share/locale/${d}/LC_MESSAGES/g${f}
64        }
65    }
66
67    xinstall -m 755 -d ${destroot}${prefix}/libexec/gnubin
68    foreach binary [glob -tails -directory ${destroot}${prefix}/bin g*] {
69        ln -s ${prefix}/bin/${binary} ${destroot}${prefix}/libexec/gnubin/[string range $binary 1 end]
70    }
71    xinstall -m 755 -d ${destroot}${prefix}/libexec/gnubin/man/man1
72    foreach manpage [glob -tails -directory ${destroot}${prefix}/share/man/man1 g*] {
73        ln -s ${prefix}/share/man/man1/${manpage}.gz ${destroot}${prefix}/libexec/gnubin/man/man1/[string range $manpage 1 end].gz
74    }
75
76    # create and copy the port docs
77    xinstall -d ${destroot}${docdir}
78    xinstall -m 0644 -W ${worksrcpath} ABOUT-NLS AUTHORS COPYING ChangeLog INSTALL NEWS README TODO \
79        ${destroot}${docdir}
80}
Note: See TracBrowser for help on using the repository browser.