blob: 8726191201597904cbbe1216adac6dee1311fa2d (
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
|
# New ports collection makefile for: telnet8
# Date created: 13 Feb 1999
# Whom: Ching-Hong Wu <woju@freebsd.ntu.edu.tw>
#
# $FreeBSD$
#
PORTNAME= telnet
PORTVERSION= 1.0
PORTREVISION= 1
CATEGORIES= chinese
MASTER_SITES= # none
DISTFILES= # none
MAINTAINER= leeym@FreeBSD.org
COMMENT= 8bit compatible telnet client for Chinese input
USE_REINPLACE= yes
MAN1= zh-telnet.1
PLIST_FILES= bin/zh-telnet
.include <bsd.port.pre.mk>
SRCBASE?= ${PORTSDIR}/../src
.if exists (${SRCBASE}/contrib/telnet/telnet)
SRCDIR= ${SRCBASE}/contrib/telnet/telnet
CONTRIB_TELNET= yes
.elif exists (${SRCBASE}/usr.bin/telnet)
SRCDIR= ${SRCBASE}/usr.bin/telnet
.else
IGNORE= "You need to build this port with the source code of telnet"
.endif
do-extract:
@${MKDIR} ${WRKDIR}
@${CP} -R ${SRCDIR} ${WRKSRC}
.if defined(CONTRIB_TELNET)
@${CP} -R ${SRCDIR}/../libtelnet ${SRCDIR}/../../../usr.bin/telnet/Makefile ${WRKSRC}
@${CP} ${SRCDIR}/../arpa/telnet.h ${SRCDIR}/../../../lib/libtelnet/Makefile ${WRKSRC}/libtelnet
.else
@${CP} -R ${SRCDIR}/../../lib/libtelnet ${WRKSRC}
.endif
pre-patch:
.if defined(CONTRIB_TELNET)
@${REINPLACE_CMD} -e 's,/../../contrib/telnet,,g' ${WRKSRC}/Makefile ${WRKSRC}/libtelnet/Makefile
@${REINPLACE_CMD} -e 's,${TELNETDIR}/telnet,${TELNETDIR},g' ${WRKSRC}/Makefile
@${REINPLACE_CMD} -e 's,/arpa,,g' ${WRKSRC}/libtelnet/Makefile
.endif
@${REINPLACE_CMD} -e 's,/../../lib,,g' ${WRKSRC}/Makefile
pre-build:
@cd ${WRKSRC}/libtelnet && ${MAKE}
do-install:
@${INSTALL_PROGRAM} ${WRKSRC}/telnet ${PREFIX}/bin/zh-telnet
@${INSTALL_MAN} ${WRKSRC}/telnet.1 ${PREFIX}/man/man1/${MAN1}
.include <bsd.port.post.mk>
|