From cacf09cf21a6b18fdb050aaf6fa21f758d73ebbe Mon Sep 17 00:00:00 2001 From: Pav Lucistnik Date: Mon, 6 Jun 2005 22:44:54 +0000 Subject: [PATCH] NCID is a network based Caller ID package that contains a server to obtain the CID information from a modem, and a client to display the CID information on a computer, TiVo, text pager, or cell phone. Multiple clients are permitted. PR: ports/81954 Submitted by: David --- comms/Makefile | 1 + comms/ncid/Makefile | 36 +++++++++++++++++++ comms/ncid/distinfo | 2 ++ comms/ncid/files/patch-ncidd.c | 46 +++++++++++++++++++++++++ comms/ncid/files/patch-scripts_Makefile | 17 +++++++++ comms/ncid/files/patch-tools_Makefile | 17 +++++++++ comms/ncid/files/pkg-message.in | 5 +++ comms/ncid/pkg-descr | 8 +++++ comms/ncid/pkg-plist | 14 ++++++++ 9 files changed, 146 insertions(+) create mode 100644 comms/ncid/Makefile create mode 100644 comms/ncid/distinfo create mode 100644 comms/ncid/files/patch-ncidd.c create mode 100644 comms/ncid/files/patch-scripts_Makefile create mode 100644 comms/ncid/files/patch-tools_Makefile create mode 100644 comms/ncid/files/pkg-message.in create mode 100644 comms/ncid/pkg-descr create mode 100644 comms/ncid/pkg-plist diff --git a/comms/Makefile b/comms/Makefile index 2c648852fa26..fe55726d8f47 100644 --- a/comms/Makefile +++ b/comms/Makefile @@ -59,6 +59,7 @@ SUBDIR += mserver SUBDIR += mwavem SUBDIR += nasawash + SUBDIR += ncid SUBDIR += nokryptia SUBDIR += obexapp SUBDIR += openobex diff --git a/comms/ncid/Makefile b/comms/ncid/Makefile new file mode 100644 index 000000000000..846adcf408c0 --- /dev/null +++ b/comms/ncid/Makefile @@ -0,0 +1,36 @@ +# New ports collection makefile for: ncid +# Date created: 06 June 2005 +# Whom: David +# +# $FreeBSD$ +# + +PORTNAME= ncid +PORTVERSION= 0.50 +CATEGORIES= comms +MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} +MASTER_SITE_SUBDIR= ${PORTNAME} +DISTNAME= ${PORTNAME}-${PORTVERSION} + +MAINTAINER= david@freshports.org +COMMENT= Network based Caller ID package + +LIB_DEPENDS= tk84.1:${PORTSDIR}/x11-toolkits/tk84 + +WRKSRC= ${WRKDIR}/${PORTNAME} + +MAN1= ncid.1 ncidscripts.1 ncidtools.1 +MAN5= ncidd.conf.5 +MAN8= ncidd.8 + +USE_GMAKE= yes +ALL_TARGET= freebsd +INSTALL_TARGET= install-freebsd + +PKGMESSAGE= ${WRKDIR}/pkg-message +SUB_FILES= pkg-message + +post-install: + @${CAT} ${PKGMESSAGE} + +.include diff --git a/comms/ncid/distinfo b/comms/ncid/distinfo new file mode 100644 index 000000000000..5f545d5cfeeb --- /dev/null +++ b/comms/ncid/distinfo @@ -0,0 +1,2 @@ +MD5 (ncid-0.50.tar.gz) = 7b6e0ec1eb019dbb086d2a55e9e50d5e +SIZE (ncid-0.50.tar.gz) = 105852 diff --git a/comms/ncid/files/patch-ncidd.c b/comms/ncid/files/patch-ncidd.c new file mode 100644 index 000000000000..e427a2392ac6 --- /dev/null +++ b/comms/ncid/files/patch-ncidd.c @@ -0,0 +1,46 @@ +*** ncidd.c Wed Nov 24 03:44:55 2004 +--- ncidd.c Fri Jun 3 17:24:58 2005 +*************** +*** 359,376 **** + + strcat(strncpy(buf, ptr, BUFSIZ - 2), CR); + if (write(ttyfd, buf, strlen(buf)) < 0) return -1; +! do + { +! if ((num = read(ttyfd, buf + size, BUFSIZ - size - 1)) < 0) return -1; +! size += num; +! } while (num); + +! if (debug && size) write(STDOUT, buf, size); +! buf[size] = 0; +! if ((bufp = strrchr(buf, 'O')) != 0) +! if (!strncmp(bufp, "OK", 2)) return 0; +! if ((bufp = strrchr(buf, 'E')) != 0) +! if (!strncmp(bufp, "ERROR", 5)) return 1; + + return 2; + } +--- 359,381 ---- + + strcat(strncpy(buf, ptr, BUFSIZ - 2), CR); + if (write(ttyfd, buf, strlen(buf)) < 0) return -1; +! +! do + { +! do +! { +! if ((num = read(ttyfd, buf + size, BUFSIZ - size - 1)) < 0) return -1; +! size += num; +! } while (num); +! +! if (debug && size) write(STDOUT, buf, size); +! buf[size] = 0; + +! if ((bufp = strrchr(buf, 'O')) != 0) +! if (!strncmp(bufp, "OK", 2)) return 0; +! if ((bufp = strrchr(buf, 'E')) != 0) +! if (!strncmp(bufp, "ERROR", 5)) return 1; +! } while(1); + + return 2; + } diff --git a/comms/ncid/files/patch-scripts_Makefile b/comms/ncid/files/patch-scripts_Makefile new file mode 100644 index 000000000000..d830104ce863 --- /dev/null +++ b/comms/ncid/files/patch-scripts_Makefile @@ -0,0 +1,17 @@ +*** scripts/Makefile.ori Mon Jun 6 16:05:09 2005 +--- scripts/Makefile Mon Jun 6 16:05:29 2005 +*************** +*** 21,32 **** + @if test ! -d $(SHARE); then mkdir $(SHARE); fi + install -m 755 $(SCRIPTS) $(SHARE) + install -m 644 README $(SHARE)/. +- touch install-script + + install-man: $(MAN) + cd $(MAN1); rm -f $(MANSRC) + install -m 644 $(MANSRC) $(MAN1) +- touch install-man + + clean: + +--- 21,30 ---- diff --git a/comms/ncid/files/patch-tools_Makefile b/comms/ncid/files/patch-tools_Makefile new file mode 100644 index 000000000000..724479ed278d --- /dev/null +++ b/comms/ncid/files/patch-tools_Makefile @@ -0,0 +1,17 @@ +*** tools/Makefile.ori Mon Jun 6 16:04:37 2005 +--- tools/Makefile Mon Jun 6 16:04:53 2005 +*************** +*** 31,42 **** + + install-script: $(SCRIPT) + install -m 755 $(SCRIPT) $(BIN) +- touch install-script + + install-man: $(MAN) + cd $(MAN1); rm -f ncidtools.1 + install -m 644 ncidtools.1 $(MAN1) +- touch install-man + + clean: + +--- 31,40 ---- diff --git a/comms/ncid/files/pkg-message.in b/comms/ncid/files/pkg-message.in new file mode 100644 index 000000000000..12127adf5d2c --- /dev/null +++ b/comms/ncid/files/pkg-message.in @@ -0,0 +1,5 @@ +******************************************************************************** + + Edit %%PREFIX%%/etc/ncidd.conf to configure your modem. + +******************************************************************************** diff --git a/comms/ncid/pkg-descr b/comms/ncid/pkg-descr new file mode 100644 index 000000000000..927c32d3f0b7 --- /dev/null +++ b/comms/ncid/pkg-descr @@ -0,0 +1,8 @@ +NCID is a network based Caller ID package that contains a server to obtain the +CID information from a modem, and a client to display the CID information on a +computer, TiVo, text pager, or cell phone. Multiple clients are permitted. + +WWW: http://ncid.sourceforge.net + +- David + diff --git a/comms/ncid/pkg-plist b/comms/ncid/pkg-plist new file mode 100644 index 000000000000..0cb8fba46858 --- /dev/null +++ b/comms/ncid/pkg-plist @@ -0,0 +1,14 @@ +sbin/ncidd +bin/ncid +bin/cidalias +bin/cidlog +bin/cidlogupd +etc/ncidd.conf +etc/rc.d/ncidd.sh +etc/rc.d/ncid.sh +share/ncid/ncidrotate +share/ncid/ncid-page +share/ncid/ncid-samba +share/ncid/ncid-speak +share/ncid/README +@dirrm share/ncid