aboutsummaryrefslogtreecommitdiffstats
path: root/comms/qpage/Makefile
blob: cc7497149ad40d93ac93008b60ae0b40041fd94d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# 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."
.  if !(defined(PACKAGE_BUILDING) || defined(BATCH))
    @sleep 2
.  endif
.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>