diff options
-rw-r--r-- | net/Makefile | 1 | ||||
-rw-r--r-- | net/nph/Makefile | 80 | ||||
-rw-r--r-- | net/nph/distinfo | 3 | ||||
-rw-r--r-- | net/nph/pkg-descr | 14 | ||||
-rw-r--r-- | net/nph/pkg-install | 57 | ||||
-rw-r--r-- | net/nph/pkg-plist | 7 |
6 files changed, 162 insertions, 0 deletions
diff --git a/net/Makefile b/net/Makefile index dfc0144ad3e1..1fd675d0065f 100644 --- a/net/Makefile +++ b/net/Makefile @@ -345,6 +345,7 @@ SUBDIR += nocatauth-server SUBDIR += nocatsplash SUBDIR += nos-ttb + SUBDIR += nph SUBDIR += ns SUBDIR += nss_ldap SUBDIR += ntalk diff --git a/net/nph/Makefile b/net/nph/Makefile new file mode 100644 index 000000000000..1e91a1ca2808 --- /dev/null +++ b/net/nph/Makefile @@ -0,0 +1,80 @@ +# New ports collection makefile for: nph +# Date created: 13 May 2006 +# Whom: Jim Pirzyk <pirzyk@freebsd.org> +# +# $FreeBSD$ +# + +PORTNAME= nph +PORTVERSION= 1.2.3 +CATEGORIES= net +MASTER_SITES= ftp://ftp.feep.net/pub/software/nph/ + +MAINTAINER= pirzyk@freebsd.org +COMMENT= New PH Client and API Library + +HAS_CONFIGURE= YES +CONFIGURE_ARGS= --disable-encap --disable-epkg-install + +MANCOMPRESSED= no + +MAN1= nph.1 +MAN3= ph_add.3 \ + ph_advertised_email.3 \ + ph_advertised_www.3 \ + ph_change.3 \ + ph_close.3 \ + ph_decode_field_attributes.3 \ + ph_delete.3 \ + ph_email_resolve.3 \ + ph_encode_selector.3 \ + ph_external.3 \ + ph_fieldinfo_iterate.3 \ + ph_free_entries.3 \ + ph_free_selectors.3 \ + ph_free_serverlist.3 \ + ph_get_fieldinfo.3 \ + ph_get_option.3 \ + ph_get_siteinfo.3 \ + ph_id.3 \ + ph_login.3 \ + ph_logout.3 \ + ph_open.3 \ + ph_option_iterate.3 \ + ph_passwd.3 \ + ph_query.3 \ + ph_retrieve_fieldinfo.3 \ + ph_retrieve_options.3 \ + ph_retrieve_siteinfo.3 \ + ph_rfd.3 \ + ph_serverlist_add.3 \ + ph_serverlist_iterate.3 \ + ph_serverlist_merge.3 \ + ph_set_hookdata.3 \ + ph_set_option.3 \ + ph_set_recvhook.3 \ + ph_set_sendhook.3 \ + ph_siteinfo_iterate.3 \ + ph_status.3 \ + ph_suser.3 \ + ph_wfd.3 \ + ph_whoami.3 \ + ph_www_resolve.3 + +.include <bsd.port.pre.mk> + +.if ${OSVERSION} < 500000 +BROKEN= doesn't compile on FreeBSD < 5.x +.endif + +do-install: + @(cd ${BUILD_WRKSRC}; ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} install-recurse) + + -@${MKDIR} ${PREFIX}/etc + @${CP} ${WRKSRC}/nphrc ${PREFIX}/etc/nphrc.sample + PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL + +post-clean: + @${RM} -f ${PREFIX}/etc/ph_server + +.include <bsd.port.post.mk> diff --git a/net/nph/distinfo b/net/nph/distinfo new file mode 100644 index 000000000000..9c1afbee68c5 --- /dev/null +++ b/net/nph/distinfo @@ -0,0 +1,3 @@ +MD5 (nph-1.2.3.tar.gz) = cf37d27d3ddd411948583766880a637a +SHA256 (nph-1.2.3.tar.gz) = ef01f4fccbd1af3650833f1adc47ecee9fd8e76660d655b08e977339d62d70b2 +SIZE (nph-1.2.3.tar.gz) = 191436 diff --git a/net/nph/pkg-descr b/net/nph/pkg-descr new file mode 100644 index 000000000000..f6816d7180a1 --- /dev/null +++ b/net/nph/pkg-descr @@ -0,0 +1,14 @@ +New PH Client and API Library + +nph offers the following features: + Complete PH API + - your applications will never need to talk directly to the PH server + Solid API design + - designed to prevent memory or file descriptor leaks for applications + which use asynchronous event timers + Interactively usable PH client + - the nph client supports readline command editting, history, and completion + +The PH protocol is described in RFC 2378 + +WWW: http://www.feep.net/nph/ diff --git a/net/nph/pkg-install b/net/nph/pkg-install new file mode 100644 index 000000000000..df19b74cb06b --- /dev/null +++ b/net/nph/pkg-install @@ -0,0 +1,57 @@ +#!/bin/sh + +PKG_PREFIX=${PKG_PREFIX:-/usr/local} + +if [ $# -ne 2 ]; then + echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2 + exit 1 +fi + +case $2 in + POST-INSTALL) + + grep csnet-ns /etc/services > /dev/null 2>&1 + if [ $? -ne 0 ]; then + echo "adding csnet-ns to /etc/services..." + cp /etc/services /etc/services.pre.$1 + echo "csnet-ns 105/tcp ns # PH" >> /etc/services + fi + + if [ ! -d "${PKG_PREFIX}/etc" ]; then + echo "creating directory ${PKG_PREFIX}/etc..."; + mkdir -p "${PKG_PREFIX}/etc"; + fi + + PH_SERVER=`hostname | awk -F. '(NF > 1) { printf "ns.%s.%s\n", $(NF - 1), $NF; }'`; + + if [ -z "${PH_SERVER}" ]; then + if [ -x /usr/sbin/nslookup ]; then + NSLOOKUP=/usr/sbin/nslookup; + elif [ -x /usr/bin/nslookup ]; then + NSLOOKUP=/usr/bin/nslookup; + fi + + if [ -n "${NSLOOKUP}" ]; then + PH_SERVER=`hostname | xargs ${NSLOOKUP} | awk '/^Name:/ { print $2; exit; }' | awk -F. '{ printf("ns.%s.%s\n", $(NF - 1), $NF); }'`; + fi + fi + + if [ -n "${PH_SERVER}" ]; then + echo "${PH_SERVER}" > ${PKG_PREFIX}/etc/ph_server.sample; + elif [ ! -f "${PKG_PREFIX}/etc/ph_server" ]; then + echo "WARNING: cannot determine PH server name - you must create ${PKG_PREFIX}/etc/ph_server manually"; + fi + + if [ ! -f "${PKG_PREFIX}/etc/ph_server" ]; then + echo "creating default ${PKG_PREFIX}/etc/ph_server file..."; + cp ${PKG_PREFIX}/etc/ph_server.sample ${PKG_PREFIX}/etc/ph_server; + fi + + if [ ! -f "${PKG_PREFIX}/etc/nphrc" ]; then + echo "installing default ${PKG_PREFIX}/etc/nphrc file..."; + cp ${PKG_PREFIX}/etc/nphrc.sample ${PKG_PREFIX}/etc/nphrc; + fi + ;; +esac + +exit 0 diff --git a/net/nph/pkg-plist b/net/nph/pkg-plist new file mode 100644 index 000000000000..7a7b62ca96e8 --- /dev/null +++ b/net/nph/pkg-plist @@ -0,0 +1,7 @@ +@unexec cmp %D/etc/nphrc.sample %D/etc/nphrc && rm %D/etc/nphrc +@unexec cmp %D/etc/ph_server.sample %D/etc/ph_server && rm %D/etc/ph_server +bin/nph +etc/nphrc.sample +etc/ph_server.sample +include/phclient.h +lib/libphclient.a |