summaryrefslogtreecommitdiffstats
path: root/mail/ftrack/Makefile
blob: 1f34d3045f938b85d295d2c4aa47116c27ac6293 (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
# New ports collection makefile for:    ftrack
# Date created:         Thu Dec 21 14:20:49 MSK 2000
# Whom:                 Sergey Samoyloff <gonza@techline.ru>
#
# $FreeBSD$
#

PORTNAME=	ftrack
PORTVERSION=	3.1
PORTEPOCH=	1
PORTREVISION=	1
CATEGORIES=	mail
MASTER_SITES=	http://ufm.kgb.ru/files/ \
		http://forsite.ibch.ru/ports/
DISTNAME=	ftr${PORTVERSION:S/.//g}sr

MAINTAINER=	forsite@spamtest.ru
COMMENT=	FTN Messages tracker

LIB_DEPENDS=	smapi.2:${PORTSDIR}/news/husky-smapi

USE_ZIP=	yes
USE_REINPLACE=	yes
USE_GMAKE=	yes
ALL_TARGET=	ftrack
MAKEFILE=	${WRKSRC}/MakeFiles/FreeBSD/Makefile
EXTRACT_AFTER_ARGS=	-d ${WRKSRC}
USE_GCC=	2.95
USE_PERL5=	yes

PORTDOCS=	ftrack.faq readme report.err

pre-patch:
	${REINPLACE_CMD} -e "s@-I../../hpp -I../../.. -O3@-Ihpp -I${LOCALBASE}/include ${CFLAGS}@g; \
			s@../../src/@src/@g; s@g\+\+@${CC}@g; \
			s@-L../../../smapi -lsmapibsd@-L${LOCALBASE}/lib -lsmapi@g" ${WRKSRC}/MakeFiles/FreeBSD/Makefile
	${REINPLACE_CMD} -e "s@ftrack.cfg@${PREFIX}/etc/ftrack/ftrack.cfg@g" ${WRKSRC}/hpp/constant.hpp
.for DIR in MakeFiles/FreeBSD src hpp doc/eng samples/tpl
	for FILE in ${WRKSRC}/${DIR}/*; do \
		${TR} -d '\015' < $${FILE} > $${FILE}.new; \
		${MV} $${FILE}.new $${FILE}; \
	done
.endfor
.for DIR in hpp src
	for FILE in ${WRKSRC}/${DIR}/*; do \
		${MV} $${FILE} `${ECHO} $${FILE} | ${TR} "[:upper:]" "[:lower:]"`; \
	done
.endfor

pre-configure:
	${CP} ${WRKSRC}/MakeFiles/FreeBSD/Makefile ${WRKSRC}

do-install:
	${INSTALL_PROGRAM} ${WRKSRC}/ftrack ${PREFIX}/bin
	${MKDIR} ${PREFIX}/etc/ftrack
	${INSTALL_DATA} ${WRKSRC}/samples/node.cfg ${PREFIX}/etc/ftrack/ftrack.cfg-dist
	${INSTALL_DATA} ${WRKSRC}/samples/tpl/* ${PREFIX}/etc/ftrack
.for FILE in alt2koi.tbl koi2alt.tbl
	${INSTALL_DATA} ${WRKSRC}/samples/${FILE} ${PREFIX}/etc/ftrack
.endfor
.if !defined(NOPORTDOCS)
	@${MKDIR} ${DOCSDIR}
	${INSTALL_DATA} ${WRKSRC}/doc/eng/* ${DOCSDIR}
.endif

.include <bsd.port.mk>
OpenPOWER on IntegriCloud