aboutsummaryrefslogtreecommitdiffstats
path: root/comms/minicom/Makefile
blob: 6aa32b768f6603c2bd08100a39bc2f9345322e31 (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
# ex:ts=8
# Ports collection makefile for:  minicom
# Date created:           Fri Dec 01, 1995
# Whom:               obrien@cs.ucdavis.edu
#
# $FreeBSD$
#

PORTNAME=   minicom
PORTVERSION=    2.3
PORTREVISION=   2
CATEGORIES= comms
MASTER_SITES=   http://alioth.debian.org/frs/download.php/2332/ \
        ftp://ftp.nuug.no/pub/anders/distfiles/ \
        http://atreides.freenix.no/~anders/

MAINTAINER= anders@FreeBSD.org
COMMENT=    An MS-DOS Telix serial communication program "workalike"

RUN_DEPENDS=    lrz:${PORTSDIR}/comms/lrzsz \
        lsz:${PORTSDIR}/comms/lrzsz

WRKSRC=     ${WRKDIR}/${DISTNAME:S/.src//}
.if defined(WITHOUT_NLS)
CONFIGURE_ARGS+=    --disable-nls
PLIST_SUB+= NLS="@comment "
.else
USE_GETTEXT=    yes
CONFIGURE_ARGS+=    --with-libiconv-prefix=${LOCALBASE} \
            --without-included-gettext
PLIST_SUB+= NLS=""
.endif
GNU_CONFIGURE=  yes
CONFIGURE_ARGS+=    --enable-dfl-baud=57600 \
            --sysconfdir=${PREFIX}/etc/minicom \
            --enable-lock-dir=/var/spool/lock

CONFIGURE_ARGS+=    --enable-dfl-port=${MINICOM_DEFAULT_PORT}

MAN1=       minicom.1 runscript.1 ascii-xfr.1 xminicom.1

.include <bsd.port.pre.mk>

.if ${OSVERSION} < 800045
MINICOM_DEFAULT_PORT?=  /dev/cuad0
.else
MINICOM_DEFAULT_PORT?=  /dev/cuau0
.endif

post-patch:
    ${REINPLACE_CMD} -e "s@/usr/local/bin/@${LOCALBASE}/bin/@; \
        s@/sz@/lsz@;s@/sb@/lsb@;s@/sx@/lsx@;s@/rz@/lrz@; \
        s@/rb@/lrb@;s@/rx@/lrx@" ${WRKSRC}/src/rwconf.c
    ${REINPLACE_CMD} -E -e "s@^(SUBDIRS = .*) intl@\1@" \
        ${WRKSRC}/Makefile.in

post-install:
    ${CHOWN} uucp:dialer ${PREFIX}/bin/minicom
    ${CHMOD} 4511 ${PREFIX}/bin/minicom
    ${INSTALL} -d -o root -g wheel -m 0755 ${PREFIX}/etc/minicom
.if !exists(${PREFIX}/etc/minicom/minicom.users)
    ${INSTALL_DATA} ${WRKSRC}/doc/minicom.users ${PREFIX}/etc/minicom/
.endif
    ${CHOWN} uucp ${PREFIX}/etc/minicom
.if !defined(NOPORTDOCS)
    ${INSTALL} -d -o root -g wheel -m 0755 ${DOCSDIR}
    ${INSTALL_DATA} ${WRKSRC}/AUTHORS ${DOCSDIR}/
    ${INSTALL_DATA} ${WRKSRC}/COPYING ${DOCSDIR}/
    ${INSTALL_DATA} ${WRKSRC}/ChangeLog ${DOCSDIR}/
    (umask 022 && cd ${WRKSRC} && ${TAR} --exclude '*/Makefile*' \
         --exclude '*.orig' -chf - extras doc | ${TAR}  -xf - -C \
        ${DOCSDIR})
.endif

.include <bsd.port.post.mk>