summaryrefslogtreecommitdiff
path: root/www/mod_fastcgi/Makefile
blob: 76b946c1fd14ec9e3a63281057df123af9947358 (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
65
66
67
68
# New ports collection makefile for:    mod_fastcgi ( in apache )
# Date created:         14 Jul 2000
# Whom:                 JunSeon Oh <hollywar@mail.holywar.net>
#
# $FreeBSD$
#

PORTNAME=	mod_fastcgi
PORTVERSION=	2.4.0
CATEGORIES=	www
MASTER_SITES=	ftp://ftp.holywar.net/pub/FreeBSD/ \
		http://www.fastcgi.com/dist/

MAINTAINER=	hollywar@mail.holywar.net
COMMENT=	A fast-cgi module for Apache

BUILD_DEPENDS=	${LOCALBASE}/sbin/apxs:${APACHE_PORT}

.if defined(WITH_APACHE2)
APACHE_PORT?=	${PORTSDIR}/www/apache2
MAKEFILE=	Makefile.AP2
USE_REINPLACE=	YES
MAKE_ARGS=	INCLUDES=-I${PREFIX}/include/apache2
INSTALL_TARGET=	install-modules
PLIST_SUB=	APACHE=2
.else
APACHE_PORT?=	${PORTSDIR}/www/apache13
PLIST_SUB=	APACHE=
.endif

do-patch:
.if defined(WITH_APACHE2)
	@${REINPLACE_CMD} -e "s|/usr/local/apache2|${PREFIX}/share/apache2|g" ${WRKSRC}/${MAKEFILE}
.else
	cd ${WRKSRC} ; ${MV} Makefile.tmpl Makefile ;

do-build:
	cd ${WRKSRC} ; ${LOCALBASE}/sbin/apxs -o mod_fastcgi.so -c *.c

do-install:
	cd ${WRKSRC} ; ${LOCALBASE}/sbin/apxs -i -a -n fastcgi mod_fastcgi.so
.endif

post-install:
.if !defined(NOPORTDOCS)
	@${MKDIR} ${DOCSDIR}
.for file in LICENSE.TERMS mod_fastcgi.html
	${INSTALL_DATA} ${WRKSRC}/docs/${file} ${DOCSDIR}
.endfor
.endif

	@${ECHO_MSG} "************************************************************"
.if !defined(WITH_APACHE2)
	@${ECHO_MSG} "* Fast-cgi modules was included with your apache           *"
	@${ECHO_MSG} "* configuration file                                       *"
	@${ECHO_MSG} "*                                                          *"
.endif
	@${ECHO_MSG} "* You need to add following lines to your apache           *"
	@${ECHO_MSG} "* configuration file. and restart it !                     *"
	@${ECHO_MSG} "*                                                          *"
.if defined(WITH_APACHE2)
	@${ECHO_MSG} "* LoadModule fastcgi_module libexec/apache2/mod_fastcgi.so *"
.endif
	@${ECHO_MSG} "* AddHandler fastcgi-script fcgi fcgi fpl                  *"
	@${ECHO_MSG} "*                                                          *"
	@${ECHO_MSG} "************************************************************"

.include <bsd.port.mk>