summaryrefslogtreecommitdiff
path: root/news/fidogate4/Makefile
blob: ca76abbdf6cb00f25951e4cf98e5ddea5e5fe257 (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
74
75
76

PORTNAME=	fidogate
PORTVERSION=	4.4.10
PORTREVISION=	1
CATEGORIES=	news mail
MASTER_SITES=	SF \
		ftp://ftp.fu-berlin.de/unix/news/fidogate/
PKGNAMESUFFIX?=	4${PKGNAMESUFFIX2}

MAINTAINER=	dinoex@FreeBSD.org
COMMENT=	Fido-Internet Gateway and Tosser

LICENSE=	GPLv2
LICENSE_FILE=	${WRKSRC}/COPYING

CONFLICTS=	fidogate-5*
MAKE_JOBS_UNSAFE=	yes

USES=		gmake perl5
MAKE_ARGS=	OWNER=${UID} GROUP=$$(id -g)
PLIST_SUB=	FIDOGATE_USER=${FIDOGATE_RUNAS}

FIXDEST=	. doc doc/gatebau doc/html scripts/areas \
		scripts/maintenance scripts/misc scripts/nodelist \
		scripts/outbound scripts/run scripts/www src/areafix \
		src/charset src/ffx src/gate src/tick src/toss src/util
DOCLIST=	fidogate.texi fidogate.txt gatebau94.txt kludge-rfc.doc \
		msgid.doc qmail.txt texinfo.tex dirs.html index.html \
		template.html fido howto misc rfc gatebau/msgid.sgml \
		gatebau/msgid.tex gatebau/msgid.txt

OPTIONS_DEFINE=	DOCS EXAMPLES

FIDOGATE_RUNAS?=	news

.include <bsd.port.options.mk>

post-patch:
	${REINPLACE_CMD} -e 's| .(PREFIX)| $$(DESTDIR)$$(PREFIX)|g' \
		${FIXDEST:S,$,/Makefile,S,^,${WRKSRC}/,}

pre-configure:
	${TOUCH} ${WRKSRC}/doc/fidogate.info
	${RM} ${WRKSRC}/doc/fidogate.info-?
	${RM} ${WRKSRC}/doc/fidogate.txt
	${REINPLACE_CMD} -e "s|[.]info-|.info|" ${WRKSRC}/doc/Makefile
	${REINPLACE_CMD} -e "s|.{PREFIX}|${PREFIX}|g" \
		 -e "s|.{LOCALBASE}|${LOCALBASE}|g" \
		 -e "s|^CC|#CC|" ${WRKSRC}/config.make
.if !${PORT_OPTIONS:MDOCS}
	${REINPLACE_CMD} -e "s|test doc|test|" \
		-e "s|cp ANNOUNCE|#cp ANNOUNCE|" \
		 ${WRKSRC}/Makefile
	${REINPLACE_CMD} -e "s|run www|run|" ${WRKSRC}/scripts/Makefile
.endif

pre-install:
	${MKDIR} ${STAGEDIR}${PREFIX}/libexec/fidogate

pre-install-DOCS-on:
	${MKDIR} ${STAGEDIR}${DOCSDIR}/html \
		${STAGEDIR}${DOCSDIR}/info \
		${STAGEDIR}${DOCSDIR}/fido \
		${STAGEDIR}${DOCSDIR}/howto \
		${STAGEDIR}${DOCSDIR}/misc \
		${STAGEDIR}${DOCSDIR}/gatebau

post-install-DOCS-on:
	${MKDIR} ${STAGEDIR}${DOCSDIR}
	${TAR} -C ${WRKSRC}/doc -cf - ${DOCLIST} | ${TAR} -C ${STAGEDIR}${DOCSDIR} -xf -

post-install-EXAMPLES-on:
	${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
	${TAR} -C ${WRKSRC}/examples -cf - . | ${TAR} -C ${STAGEDIR}${EXAMPLESDIR} -xf -

.include <bsd.port.mk>