Skip to content
Browse files

Portfile for Sendfile-2.1a

git-svn-id: d073be05-634f-4543-b044-5fe20cf6d1d6
  • Loading branch information
Matt Anton
Matt Anton committed Nov 21, 2003
1 parent bc3cf97 commit 3a931efbf1f10ab14b55740f394978030943ed8c
Showing with 68 additions and 0 deletions.
  1. +68 −0 net/sendfile/Portfile
@@ -0,0 +1,68 @@
# $Id: Portfile,v 1.1 2003/11/21 18:46:32 matt Exp $

PortSystem 1.0
name sendfile
version 2.1a
categories net
platforms darwin
homepage http://www.BelWue.DE/projekte/saft/index-us.html
description A saft suite for asynchronous transfers

long_description Sendfile is a SAFT implementation for UNIX and serves as a tool for \
asynchronous sending of files in the internet, conserving their file \
attributes. It consists of the following parts: \
sendfiled - the server daemon \
sendfile - a client for sending files \
sendmsg - a client for sending one-line text messages \
receive - a client for receiving spooled files

checksums md5 a8aa16b9891468a12c674a3e585128c0

patchfiles patch-makeconfig.diff patch-sendfiled.c.diff

pre-build { reinplace "s|SPOOL=/var/spool/sendfile|SPOOL=${prefix}/var/spool/sendfile|" ${worksrcpath}/makeconfig
reinplace "s|BINDIR=/usr/local/bin|BINDIR=${prefix}/bin|" ${worksrcpath}/makeconfig
reinplace "s|MANDIR=/usr/local/man|MANDIR=${prefix}/share/man|" ${worksrcpath}/makeconfig
reinplace "s|CONFIG=/usr/local/etc|CONFIG=${prefix}/etc|" ${worksrcpath}/makeconfig
reinplace "s|SERVERDIR=/usr/local/sbin|SERVERDIR=${prefix}/sbin|" ${worksrcpath}/makeconfig
reinplace "s|/var/log|${prefix}/var/log|" ${worksrcpath}/makeconfig
reinplace "s|/opt/bin|${prefix}/bin|" ${worksrcpath}/etc/

configure {}
build.args config

destroot.destdir ${destroot}${prefix} {}

destroot { system "cd '${worksrcpath}/src' && install -c -o root -m 755 sendfile sendmsg receive fetchfile utf7encode wlock '${destroot}${prefix}/bin'"
system "cd '${worksrcpath}/etc' && install -c -o root -m 644 sendfile.deny '${destroot}${prefix}/etc'"
system "cd '${worksrcpath}/etc' && install -c -o root -m 755 sfconf sfdconf '${destroot}${prefix}/bin'"
system "cd '${worksrcpath}/doc' && install -c -o root -m 644 sendmsg.1 sendfile.1 receive.1 fetchfile.1 utf7encode.1 wlock.1 '${destroot}${prefix}/share/man/man1'"
system "install -c -o root -m 755 '${worksrcpath}/src/sendfiled' '${destroot}${prefix}/sbin'"
system "install -c -o root -m 644 '${worksrcpath}/doc/fetchfile.7' '${destroot}${prefix}/share/man/man7'"
system "install -c -o root -m 644 '${worksrcpath}/doc/sendfiled.8' '${destroot}${prefix}/share/man/man8'"
system "cd '${destroot}${prefix}/bin' && ln -s utf7encode utf7decode"

post-destroot { system "install -d -o root -m 755 '${destroot}${prefix}/var/spool/sendfile'"
system "install -d -o root -m 700 '${destroot}${prefix}/var/spool/sendfile/LOG'"
system "install -d -o root -m 1777 '${destroot}${prefix}/var/spool/sendfile/OUTGOING'"
system "touch '${destroot}${prefix}/var/spool/sendfile/.turd'"
system "touch '${destroot}${prefix}/var/spool/sendfile/LOG/.turd'"
system "touch '${destroot}${prefix}/var/spool/sendfile/OUTGOING/.turd'"
system "install -d -o root -m 755 '${destroot}${prefix}/share/doc/${name}' \
&& install -c -m 644 '${worksrcpath}/doc/README' '${destroot}${prefix}/share/doc/${name}'"

# Notify the user how to launch the sendfile daemon
post-install { ui_msg "\nFor being able to receive files, you'll have to use either"
ui_msg "xinetd or inetd, depending on what you are using.\n"
ui_msg "Use the following line if you'll go for inetd:"
ui_msg "saft stream tcp nowait root /path/to/sendfiled sendfiled\n"
ui_msg "For xinetd, just take a service file as an example.\n"

0 comments on commit 3a931ef

Please sign in to comment.
You can’t perform that action at this time.