Skip to content
Permalink
Browse files

Added a notification about saft ports and fix the prefix in sfconf an…

…d sfdconf

git-svn-id: https://svn.macports.org/repository/macports/trunk/dports@4112 d073be05-634f-4543-b044-5fe20cf6d1d6
  • Loading branch information
Matt Anton
Matt Anton committed Dec 5, 2003
1 parent 955f737 commit 10cad3843986103e9fefd889d9068511740592c7
Showing with 21 additions and 15 deletions.
  1. +21 −15 net/sendfile/Portfile
@@ -1,8 +1,9 @@
# $Id: Portfile,v 1.1 2003/11/21 18:46:32 matt Exp $
# $Id: Portfile,v 1.2 2003/12/05 22:56:13 matt Exp $

PortSystem 1.0
name sendfile
version 2.1a
revision 1
categories net
platforms darwin
maintainers matt@opendarwin.org
@@ -22,29 +23,31 @@ 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
configure {}

pre-build { reinplace "s|/var/spool|${prefix}/var/spool|" ${worksrcpath}/makeconfig
reinplace "s|/usr/local|${prefix}|g" ${worksrcpath}/makeconfig
reinplace "s|/var/log|${prefix}/var/log|" ${worksrcpath}/makeconfig
reinplace "s|/opt/bin|${prefix}/bin|" ${worksrcpath}/etc/sendfile.cf
}


configure {}
build.args config

post-build { reinplace "s|/var/spool|${prefix}/var/spool|" ${worksrcpath}/etc/sfconf
reinplace "s|/var/spool|${prefix}/var/spool|g" ${worksrcpath}/etc/sfdconf
reinplace "s|/usr/local|${prefix}|g" ${worksrcpath}/etc/sfdconf
}

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

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

@@ -64,5 +67,8 @@ post-install { ui_msg "\nFor being able to receive files, you'll have to use ei
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"
ui_msg "If you're running Mac OS X 10.2 or Darwin 6.x, you should"
ui_msg "add an entry in /etc/services to allow connections from and to"
ui_msg "port 487 both udp and tcp.\n"
}

0 comments on commit 10cad38

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