Ticket #43256: patch-tftp-hpa-Portfile.2.diff

File patch-tftp-hpa-Portfile.2.diff, 4.7 KB (added by jul_bsd@…, 10 years ago)
  • net/tftp-hpa/Portfile

    old new  
    22
    33PortSystem 1.0
    44
    5 name            tftp-hpa
    6 version         0.48
    7 revision        2
    8 categories      net
    9 maintainers     markd
    10 description     Enhanced port of the BSD TFTP server
    11 platforms       darwin
    12 long_description        tftp-hpa is an enhanced version of the BSD TFTP client \
    13                 and server,  possessing a number of bugfixes and enhancements \
    14                 over the  original. It has been made portable and will work on \
    15                 pretty much any modern Unix variant.
    16 
    17 homepage        http://www.kernel.org/pub/software/network/tftp/
    18 master_sites    ${homepage}
    19 use_bzip2       yes
    20 checksums       md5 f2e0a1ca0c49ae46ecad26a54df3e887
     5name                tftp-hpa
     6version             5.2
     7categories          net
     8maintainers         markd
     9description         Enhanced port of the BSD TFTP server
     10platforms           darwin
     11long_description    tftp-hpa is an enhanced version of the BSD TFTP client \
     12                    and server,  possessing a number of bugfixes and enhancements \
     13                    over the  original. It has been made portable and will work on \
     14                    pretty much any modern Unix variant.
     15license             BSD
     16homepage            http://www.kernel.org/pub/software/network/tftp/
     17master_sites        ${homepage}/tftp-hpa/
     18use_bzip2           yes
    2119
    22 set tftp-root   ${prefix}/var/${name}/
     20checksums           rmd160  dc3935af75f2919c55cac6c04b61488af425918c \
     21                    sha256  0a9f88d4c1c02687b4853b02ab5dd8779d4de4ffdb9b2e5c9332841304d1a269
     22
     23patchfiles          patch-tftpd-recvfrom.c.diff
     24
     25depends_lib         port:readline port:ncurses
     26
     27set tftp-root    ${prefix}/var/${name}/
    2328
    2429variant enable_upload description {If invoked with the server variant, tftp uploads \
    25         are enabled; without the server variant, this variant has no effect} {}
     30    are enabled; without the server variant, this variant has no effect} {}
    2631
    27 startupitem.name        tftpd
     32startupitem.name    tftpd
    2833
    2934variant server description {Install launchd scripts to run tftpd at system boot} {
    30         startupitem.create      yes
    31                 if { ! [variant_isset enable_upload] } {
    32                         startupitem.executable  ${prefix}/sbin/tftpd -L -s ${tftp-root}
    33                 } else {
    34                         startupitem.executable  ${prefix}/sbin/tftpd -L -c -s ${tftp-root}
    35                 }
     35    startupitem.create    yes
     36        if { ! [variant_isset enable_upload] } {
     37            startupitem.executable    ${prefix}/sbin/tftpd -L -s ${tftp-root}
     38        } else {
     39            startupitem.executable  ${prefix}/sbin/tftpd -L -c -s ${tftp-root}
     40        }
    3641}
    3742
    38 configure.args  --mandir=\\\${prefix}/share/man
     43configure.args    --mandir=\\\${prefix}/share/man
    3944
    40 destroot.destdir        prefix=${destroot}${prefix}
     45destroot.destdir    prefix=${destroot}${prefix}
    4146
    42 post-destroot   {
    43         file rename ${destroot}${prefix}/sbin/in.tftpd \
    44                 ${destroot}${prefix}/sbin/tftpd
     47post-destroot    {
     48    file rename ${destroot}${prefix}/sbin/in.tftpd \
     49        ${destroot}${prefix}/sbin/tftpd
    4550
    46         file delete ${destroot}${prefix}/share/man/man8/tftpd.8
    47         file rename ${destroot}${prefix}/share/man/man8/in.tftpd.8 \
    48                 ${destroot}${prefix}/share/man/man8/tftpd.8
     51    file delete ${destroot}${prefix}/share/man/man8/tftpd.8
     52    file rename ${destroot}${prefix}/share/man/man8/in.tftpd.8 \
     53        ${destroot}${prefix}/share/man/man8/tftpd.8
    4954
    50         reinplace "s|in.tftpd|tftpd|g" \
    51                 ${destroot}${prefix}/share/man/man8/tftpd.8
     55    reinplace "s|in.tftpd|tftpd|g" \
     56        ${destroot}${prefix}/share/man/man8/tftpd.8
    5257
    53         xinstall -m 777 -d ${tftp-root}
    54         destroot.keepdirs ${tftp-root}
     58    xinstall -m 777 -d ${tftp-root}
     59    destroot.keepdirs ${tftp-root}
    5560}
    5661
    5762# tftp-ha setup instructions
    58 post-install {
    59         ui_msg "\n
     63notes "
    6064
    6165***** Setup Instructions *****
    6266
     
    6468      on all local addresses.
    6569
    6670To run tftpd manually for download only access, use this command:
    67         sudo tftpd -L -s <tftp-root-dir>
     71    sudo tftpd -L -s <tftp-root-dir>
    6872
    6973To run tftpd manually and support tftp uploads, add \"-c\" to the command:
    70         sudo tftpd -L -c -s <tftp-root-dir>
     74    sudo tftpd -L -c -s <tftp-root-dir>
    7175
    7276You may run tftpd at system boot using the startupitem if you installed tftp-hpa
    7377using the server variant.  To load the startupitem using launchctl:
    74         sudo launchctl load -w /Library/LaunchDaemons/org.macports.tftpd.plist
     78    sudo launchctl load -w /Library/LaunchDaemons/org.macports.tftpd.plist
    7579
    7680NOTE: When loading tftp-hpa using launchctl, make sure to place the files you want to serve
    7781in ${tftp-root}, because that is the location set in the StartupItem.
     
    8286file and replace the one installed by MacPorts in /Library/LaunchDaemons.  You
    8387may use /System/Library/LaunchDaemons/tftp.plist as a template.
    8488
    85 \n"
    86 }
     89"
    8790