summaryrefslogtreecommitdiff
path: root/www/yaws/Makefile
blob: bffcc2f9f7e15a92ceb258e47ed3029de5de1004 (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
# New ports collection makefile for:	yaws
# Date Created:				25 Jan 2004
# Whom:				 	olgeni@FreeBSD.org
#
# $FreeBSD$
#

PORTNAME=	yaws
PORTVERSION=	1.41
CATEGORIES=	www
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR=	erlyaws

MAINTAINER=	olgeni@FreeBSD.org
COMMENT=	A webserver for dynamic content written in Erlang

BUILD_DEPENDS=	erlc:${PORTSDIR}/lang/erlang
RUN_DEPENDS=	erl:${PORTSDIR}/lang/erlang

HAS_CONFIGURE=	yes
USE_GMAKE=	yes
USE_REINPLACE=	yes

MAN1=		yaws.1
MAN5=		yaws.conf.5 yaws_api.5

.include <bsd.port.pre.mk>

.if ${ARCH} != "i386"
BROKEN=		"Does not compile on !i386"
.endif

post-extract:
	@${RM} -r ${WRKSRC}/www/.xvpics ${WRKSRC}/www/testdir
	@${FIND} ${WRKSRC} -name .empty | ${XARGS} ${RM}

post-patch:
	@${REINPLACE_CMD} -e 's|!!PREFIX!!|${PREFIX}|g' \
		${WRKSRC}/man/yaws_api.5 ${WRKSRC}/man/yaws.conf.5 \
		${WRKSRC}/src/yaws_config.erl ${WRKSRC}/scripts/yaws.ss
	@${FIND} ${WRKSRC} -name \*.orig -or -name \*.bak | ${XARGS} ${RM}

do-install:
	@${INSTALL_SCRIPT} ${WRKSRC}/bin/yaws ${PREFIX}/bin
	@${INSTALL_DATA} ${FILESDIR}/yaws.conf.sample ${PREFIX}/etc/
	@${MKDIR} ${PREFIX}/lib/yaws/ebin
	@${MKDIR} ${PREFIX}/lib/yaws/include
	@${MKDIR} ${PREFIX}/lib/yaws/priv
	@${MKDIR} ${PREFIX}/www/yaws
	@${MKDIR} ${EXAMPLESDIR}
	@${INSTALL_DATA} ${WRKSRC}/ebin/* ${PREFIX}/lib/yaws/ebin
	@${INSTALL_DATA} ${WRKSRC}/priv/* ${PREFIX}/lib/yaws/priv
	@${INSTALL_DATA} ${WRKSRC}/include/* ${PREFIX}/lib/yaws/include
	@cd ${WRKSRC}/www && (${FIND} * | ${CPIO} -puv ${PREFIX}/www/yaws)
	@${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${PREFIX}/www/yaws
	@${INSTALL_MAN} ${WRKSRC}/man/*.1 ${MANPREFIX}/man/man1
	@${INSTALL_MAN} ${WRKSRC}/man/*.5 ${MANPREFIX}/man/man5
	@${MKDIR} /var/log/${PORTNAME}
.if !defined(NOPORTDOCS)
	@${MKDIR} ${DOCSDIR}
	@${INSTALL_DATA} ${WRKSRC}/doc/yaws.pdf ${DOCSDIR}
.endif

.include <bsd.port.post.mk>