comms/qpage: Resurrect port
- New MASTER_SITE - New MAINTAINER - Change to USES=tar:Z - Regenerate patches PR: 206321
This commit is contained in:
parent
f88d0883b8
commit
b3909d5c4d
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=411079
@ -142,6 +142,7 @@
|
||||
SUBDIR += py-serial
|
||||
SUBDIR += pyla
|
||||
SUBDIR += qico
|
||||
SUBDIR += qpage
|
||||
SUBDIR += qrq
|
||||
SUBDIR += qsstv
|
||||
SUBDIR += qt5-connectivity
|
||||
|
74
comms/qpage/Makefile
Normal file
74
comms/qpage/Makefile
Normal file
@ -0,0 +1,74 @@
|
||||
# Created by: joes@seaport.net
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= qpage
|
||||
PORTVERSION= 3.3
|
||||
PORTREVISION= 8
|
||||
CATEGORIES= comms
|
||||
MASTER_SITES= http://www.qpage.org/download/
|
||||
MASTER_SITES= http://tomiii.com/qpage/qpage.org/download/
|
||||
|
||||
MAINTAINER= rand@iteris.com
|
||||
COMMENT= SNPP client/server for sending messages to an alphanumeric pager
|
||||
|
||||
USES=tar:Z
|
||||
USE_RC_SUBR= qpage
|
||||
GNU_CONFIGURE= yes
|
||||
|
||||
OPTIONS_DEFINE= IDENT_PATCH
|
||||
IDENT_PATCH_DESC= Disable libwrap ident lookups
|
||||
|
||||
IDENT_PATCH_EXTRA_PATCHES=${FILESDIR}/libwrap_ident_patch-srvrsnpp.c
|
||||
|
||||
.if !defined(WITH_QPAGE_SYSLOG_FACILITY) || !defined(WITH_QPAGE_USER)
|
||||
.if !defined(WITH_QPAGE_SYSLOG_FACILITY) && !defined(WITH_QPAGE_USER)
|
||||
_QPAGE_MSG= You may set the following configuration options:
|
||||
.else
|
||||
_QPAGE_MSG= The following additional configuration options are available:
|
||||
.endif
|
||||
.if !defined(WITH_QPAGE_SYSLOG_FACILITY)
|
||||
WITH_QPAGE_SYSLOG_FACILITY= LOG_DAEMON
|
||||
_QPAGE_SYSLOG_MSG=1
|
||||
.endif
|
||||
.if !defined(WITH_QPAGE_USER)
|
||||
WITH_QPAGE_USER= uucp
|
||||
_QPAGE_USER_MSG=1
|
||||
.endif
|
||||
pre-patch:
|
||||
@${ECHO_MSG} ""
|
||||
@${ECHO_MSG} ${_QPAGE_MSG}
|
||||
@if [ -n "${_QPAGE_SYSLOG_MSG}" ]; then \
|
||||
${ECHO_MSG} ""; \
|
||||
${ECHO_MSG} " WITH_QPAGE_SYSLOG_FACILITY=syslog_facility"; \
|
||||
${ECHO_MSG} " Default is LOG_DAEMON"; \
|
||||
fi
|
||||
@if [ -n "${_QPAGE_USER_MSG}" ]; then \
|
||||
${ECHO_MSG} ""; \
|
||||
${ECHO_MSG} " WITH_QPAGE_USER=userid"; \
|
||||
${ECHO_MSG} " Default is \"uucp\"; recommended that user be in group \"dialer\""; \
|
||||
fi
|
||||
@${ECHO_MSG} ""
|
||||
@${ECHO_MSG} "Press ^C now to stop the build and set make options."
|
||||
@${ECHO_MSG} "You may find it necessary to 'make clean' before restarting the build."
|
||||
@sleep 2
|
||||
.endif
|
||||
|
||||
post-patch:
|
||||
${REINPLACE_CMD} -e 's,%%PREFIX%%,${PREFIX},g' \
|
||||
${WRKSRC}/qpage.man \
|
||||
${WRKSRC}/config.input \
|
||||
${WRKSRC}/config.h.in
|
||||
${REINPLACE_CMD} \
|
||||
-e 's,%%WITH_QPAGE_SYSLOG_FACILITY%%,${WITH_QPAGE_SYSLOG_FACILITY},' \
|
||||
-e 's,%%WITH_QPAGE_USER%%,${WITH_QPAGE_USER},' \
|
||||
${WRKSRC}/config.input
|
||||
|
||||
do-install:
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/qpage ${STAGEDIR}${PREFIX}/bin
|
||||
${INSTALL_MAN} ${WRKSRC}/qpage.man \
|
||||
${STAGEDIR}${MAN1PREFIX}/man/man1/qpage.1
|
||||
${INSTALL_DATA} ${WRKSRC}/example.cf \
|
||||
${STAGEDIR}${PREFIX}/etc/qpage.conf.sample
|
||||
${MKDIR} ${STAGEDIR}/var/spool/qpage
|
||||
|
||||
.include <bsd.port.mk>
|
2
comms/qpage/distinfo
Normal file
2
comms/qpage/distinfo
Normal file
@ -0,0 +1,2 @@
|
||||
SHA256 (qpage-3.3.tar.Z) = 0bbecd2908380c5d28b8beeee0d0238854162128db5ef4ea603614d52ee7d24c
|
||||
SIZE (qpage-3.3.tar.Z) = 225689
|
16
comms/qpage/files/libwrap_ident_patch-srvrsnpp.c
Normal file
16
comms/qpage/files/libwrap_ident_patch-srvrsnpp.c
Normal file
@ -0,0 +1,16 @@
|
||||
--- srvrsnpp.c.orig 2008-10-20 10:30:57.539127452 -0400
|
||||
+++ srvrsnpp.c 2008-10-20 10:35:43.096529509 -0400
|
||||
@@ -1066,7 +1066,12 @@
|
||||
|
||||
fromhost(&request);
|
||||
|
||||
- ptr = eval_user(&request);
|
||||
+ /*
|
||||
+ ** If we aren't doing an ident request, don't ask
|
||||
+ ** TCP Wrappers to do it either
|
||||
+ */
|
||||
+ if (IdentTimeout) ptr = eval_user(&request);
|
||||
+ else ptr = NULL;
|
||||
|
||||
if (ptr && strcmp(ptr, STRING_UNKNOWN) != 0)
|
||||
p->ident = strdup(ptr);
|
10
comms/qpage/files/patch-config.c
Normal file
10
comms/qpage/files/patch-config.c
Normal file
@ -0,0 +1,10 @@
|
||||
--- config.c.orig 1999-01-02 03:14:50 UTC
|
||||
+++ config.c
|
||||
@@ -1407,7 +1407,6 @@ free_pagers(pager_t *list)
|
||||
my_free(list->name);
|
||||
my_free(list->text);
|
||||
my_free(list->pagerid);
|
||||
- my_free(list->service);
|
||||
free(list);
|
||||
}
|
||||
}
|
11
comms/qpage/files/patch-config.h.in
Normal file
11
comms/qpage/files/patch-config.h.in
Normal file
@ -0,0 +1,11 @@
|
||||
--- config.h.in.orig 1998-07-26 19:38:35 UTC
|
||||
+++ config.h.in
|
||||
@@ -17,7 +17,7 @@
|
||||
#undef SNPP_SERVER_FILE
|
||||
|
||||
/* Define as the location of the qpage configuration file. */
|
||||
-#define QPAGE_CONFIG "/etc/qpage.cf"
|
||||
+#define QPAGE_CONFIG "/usr/local/etc/qpage.conf"
|
||||
|
||||
/* Define as the location of the lock directory. */
|
||||
#undef DEFAULT_LOCKDIR
|
29
comms/qpage/files/patch-config.input
Normal file
29
comms/qpage/files/patch-config.input
Normal file
@ -0,0 +1,29 @@
|
||||
--- config.input.orig 1998-11-05 06:05:36 UTC
|
||||
+++ config.input
|
||||
@@ -20,7 +20,7 @@
|
||||
# See the QuickPage documentation for complete details about
|
||||
# the syntax of the configuration file.
|
||||
#
|
||||
-QPAGE_CONFIG="/etc/qpage.cf"
|
||||
+QPAGE_CONFIG="/usr/local/etc/qpage.conf"
|
||||
|
||||
|
||||
#
|
||||
@@ -41,7 +41,7 @@ SNPP_SERVER="localhost"
|
||||
# copies of the configuration file. Only one filename
|
||||
# may be specified.
|
||||
#
|
||||
-SNPP_SERVER_FILE="/etc/qpage.servers"
|
||||
+SNPP_SERVER_FILE="/usr/local/etc/qpage.servers"
|
||||
|
||||
|
||||
#
|
||||
@@ -51,7 +51,7 @@ SNPP_SERVER_FILE="/etc/qpage.servers"
|
||||
# for that user, QuickPage will assume all group privileges
|
||||
# assigned to that user.
|
||||
#
|
||||
-DAEMON_USER="daemon"
|
||||
+DAEMON_USER="uucp"
|
||||
|
||||
|
||||
#
|
10
comms/qpage/files/patch-ixo.c
Normal file
10
comms/qpage/files/patch-ixo.c
Normal file
@ -0,0 +1,10 @@
|
||||
--- ixo.c.orig 1999-01-02 01:59:33 UTC
|
||||
+++ ixo.c
|
||||
@@ -368,7 +368,6 @@ hangup_modem(int fd)
|
||||
if (tcsetattr(fd, TCSANOW, &ti) < 0) {
|
||||
qpage_log(LOG_DEBUG, "tcsetattr(): %s", strerror(errno));
|
||||
closemodem(fd);
|
||||
- return;
|
||||
}
|
||||
|
||||
/*
|
11
comms/qpage/files/patch-qpage.man
Normal file
11
comms/qpage/files/patch-qpage.man
Normal file
@ -0,0 +1,11 @@
|
||||
--- qpage.man.orig 1999-05-08 22:07:31 UTC
|
||||
+++ qpage.man
|
||||
@@ -867,7 +867,7 @@ if more than one paging service is used
|
||||
must be able to detect when it's safe to send dial commands to the modem.
|
||||
.LP
|
||||
.SH FILES
|
||||
-/etc/qpage.cf
|
||||
+/usr/local/etc/qpage.conf
|
||||
.SH SEE ALSO
|
||||
.B RFC-1861
|
||||
.SH KNOWN BUGS
|
28
comms/qpage/files/patch-srvrsnpp.c
Normal file
28
comms/qpage/files/patch-srvrsnpp.c
Normal file
@ -0,0 +1,28 @@
|
||||
--- srvrsnpp.c.orig 2016-01-16 20:44:37 UTC
|
||||
+++ srvrsnpp.c
|
||||
@@ -523,6 +523,7 @@ snpp(PAGE *p)
|
||||
char *errmsg;
|
||||
char *a;
|
||||
char *b;
|
||||
+ char *m;
|
||||
int i;
|
||||
int badarg;
|
||||
int gotpager;
|
||||
@@ -701,7 +702,16 @@ snpp(PAGE *p)
|
||||
|
||||
p->created = time(NULL);
|
||||
(void)sprintf(buff, "%d", pagecount++);
|
||||
- (void)strcat(p->messageid, buff);
|
||||
+ m = (void *)malloc(sizeof(*m) * (strlen(p->messageid) + strlen(buff) + 1));
|
||||
+ if ( m == NULL ) {
|
||||
+ message("554 Message failed (out of memory)");
|
||||
+ qpage_log(LOG_ERR, "snpp(): cannot allocate memory for p->messageid");
|
||||
+ clear_page(p, TRUE);
|
||||
+ break;
|
||||
+ }
|
||||
+ (void)sprintf(m, "%s%s", p->messageid, buff);
|
||||
+ my_free(p->messageid);
|
||||
+ p->messageid = m;
|
||||
|
||||
qpage_log(LOG_ALERT, "page submitted, id=%s, from=%s",
|
||||
p->messageid,
|
11
comms/qpage/files/patch-util.c
Normal file
11
comms/qpage/files/patch-util.c
Normal file
@ -0,0 +1,11 @@
|
||||
--- util.c.orig 1998-10-25 19:55:11 UTC
|
||||
+++ util.c
|
||||
@@ -537,7 +537,7 @@ msgcpy(char *dst, char *src, int n)
|
||||
** Now make sure we didn't chop a word in the middle.
|
||||
*/
|
||||
if (*src && end) {
|
||||
- *end++ = '\0';
|
||||
+ *++end = '\0';
|
||||
src = start;
|
||||
}
|
||||
|
54
comms/qpage/files/qpage.in
Normal file
54
comms/qpage/files/qpage.in
Normal file
@ -0,0 +1,54 @@
|
||||
#!/bin/sh
|
||||
|
||||
# PROVIDE: qpage
|
||||
# REQUIRE: NETWORKING
|
||||
# KEYWORD: shutdown
|
||||
#
|
||||
# Add the following lines to /etc/rc.conf to enable/configure this service:
|
||||
#
|
||||
# qpage_enable (bool): Set to NO by default.
|
||||
# Set it to YES to enable qpage.
|
||||
# qpage_queue_interval (int): Set to 10 (seconds) by default.
|
||||
# qpage_cfg_file (path): Set it to an alternate configuration file path
|
||||
# if desired.
|
||||
# qpage_flags (str): Set it to a list of additional command-line
|
||||
# parameters if desired.
|
||||
#
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name="qpage"
|
||||
rcvar=qpage_enable
|
||||
|
||||
command=%%PREFIX%%/bin/${name}
|
||||
|
||||
load_rc_config $name
|
||||
|
||||
: ${qpage_enable="NO"}
|
||||
: ${qpage_queue_interval="10"}
|
||||
|
||||
stop_cmd=${name}_stop
|
||||
extra_commands="reload"
|
||||
reload_cmd=${name}_reload
|
||||
|
||||
command_args="-q ${qpage_queue_interval} ${qpage_flags}"
|
||||
if [ -n "${qpage_cfg_file}" ]; then
|
||||
command_args="${command_args} -C ${qpage_cfg_file}"
|
||||
fi
|
||||
|
||||
qpage_stop() {
|
||||
/usr/bin/killall qpage
|
||||
}
|
||||
|
||||
qpage_reload() {
|
||||
# awk pattern matches master daemon process only (PPID 1 in 3rd column)
|
||||
pid=`/bin/ps alcxww | /usr/bin/awk "/^ *[0-9]+ +[0-9]+ +1 .* ${name}\$/{print \\\$2}"`
|
||||
|
||||
if [ -n "$pid" ]; then
|
||||
kill -HUP $pid
|
||||
else
|
||||
echo "$0: no qpage daemon found" >& 2
|
||||
fi
|
||||
}
|
||||
|
||||
run_rc_command "$1"
|
11
comms/qpage/pkg-descr
Normal file
11
comms/qpage/pkg-descr
Normal file
@ -0,0 +1,11 @@
|
||||
QuickPage sends messages to a paging terminal using the SNPP and IXO
|
||||
(also known as TAP) protocols. It is normally used with no options
|
||||
other than a recipient and the message text, in which case the message
|
||||
is sent to the SNPP server where it is submitted to a page queue to be
|
||||
sent by a separate daemon process.
|
||||
|
||||
Page groups and duty schedules are supported. Status notification
|
||||
messages indicating the success or failure of a page are sent via
|
||||
e-mail to submitters of high-priority (level 0) pages.
|
||||
|
||||
WWW: http://www.qpage.org/
|
4
comms/qpage/pkg-plist
Normal file
4
comms/qpage/pkg-plist
Normal file
@ -0,0 +1,4 @@
|
||||
bin/qpage
|
||||
@sample etc/qpage.conf.sample
|
||||
man/man1/qpage.1.gz
|
||||
@dir(uucp,dialer,0775) /var/spool/qpage
|
Loading…
Reference in New Issue
Block a user