summaryrefslogtreecommitdiff
path: root/textproc/tdhkit/Makefile
blob: d531a07fd2ee524e1e827a0baf6510086d8fa2dc (plain)
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
# Created by: corky1951@comcast.net
# $FreeBSD$

PORTNAME=	tdhkit
PORTVERSION=	1.0
CATEGORIES=	textproc
MASTER_SITES=	http://quisp.sourceforge.net/${PORTNAME}/
DISTNAME=	${PORTNAME}${PORTVERSION:C/\.//1}

MAINTAINER=	ports@FreeBSD.org
COMMENT=	Set of programs for working with tabular ASCII data

OPTIONS_DEFINE=	LIBCHRON DOCS
LIBCHRON_DESC=	Install libchron

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MLIBCHRON}
PLIST_SUB+=	LIBCHRON=""
.else
PLIST_SUB+=	LIBCHRON="@comment "
.endif

.if !defined(NO_INSTALL_MANPAGES)
MAN1=		dateconvert.1 \
		fldfmt.1 \
		fldmap.1 \
		fldsel.1 \
		pjoin.1 \
		recsel.1 \
		tabo.1 \
		tdhfunction.1 \
		xlcells.1 \
		xlcleaner.1

.if ${PORT_OPTIONS:MLIBCHRON}
MAN3=		libchron.3
.endif
MANCOMPRESSED=	no
.endif

do-build:
	cd ${WRKSRC}/libsrc && ${SETENV} ${MAKE_ENV} \
		${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS}
	cd ${WRKSRC}/src && ${SETENV} ${MAKE_ENV} \
		${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS}
.if ${PORT_OPTIONS:MLIBCHRON}
	cd ${WRKSRC}/libsrc && ${SETENV} ${MAKE_ENV} \
		${MAKE} ${MAKE_FLAGS} ${MAKEFILE} libchron
.endif

do-install:
	${INSTALL_PROGRAM} ${WRKSRC}/bin/* ${PREFIX}/bin

.if ${PORT_OPTIONS:MLIBCHRON}
	${INSTALL_PROGRAM} ${WRKSRC}/libchron.a ${PREFIX}/lib
.endif

.if !defined(NO_INSTALL_MANPAGES)
.for manpage in ${MAN1}
	${INSTALL_MAN} ${WRKSRC}/man/mantdh/${manpage} ${MAN1PREFIX}/man/man1
.endfor
.if ${PORT_OPTIONS:MLIBCHRON}
	${INSTALL_MAN} ${WRKSRC}/man/mantdh/${MAN3} ${MAN3PREFIX}/man/man3
.endif
.endif

.if ${PORT_OPTIONS:MDOCS}
	${MKDIR} ${DOCSDIR}
	${INSTALL_DATA} ${WRKSRC}/man/html/* ${DOCSDIR}
.endif

.include <bsd.port.mk>