aboutsummaryrefslogtreecommitdiffstats
path: root/www/pserv/Makefile
blob: 9cb0e71abd5d144cf8a99b67ebbf1f017125479a (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
# New ports collection makefile for:    pserv
# Date created:             Wed Oct 15 14:16:14 CEST 2003
# Whom:                 Alex Dupre <sysadmin@alexdupre.com>
#
# $FreeBSD$
#

PORTNAME=   pserv
PORTVERSION=    3.3
CATEGORIES= www
MASTER_SITES=   ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}

MAINTAINER= ale@FreeBSD.org
COMMENT=    A portable and small webserver written in C

USE_REINPLACE=  yes
GNU_CONFIGURE=  yes

OPTIONS=    LOG "Enable logging" on \
        PHP "Enable PHP support" on

.include <bsd.port.pre.mk>

post-patch:
    @${REINPLACE_CMD} "s|%%PREFIX%%|${PREFIX}|g;s|%%LOCALBASE%%|${LOCALBASE}|g" \
        ${WRKSRC}/defaults/pserv.conf ${WRKSRC}/sources/main.h
.if defined(WITHOUT_LOG)
    @${REINPLACE_CMD} "s|define LOG|undef LOG|" \
        ${WRKSRC}/sources/main.h
.endif
.if defined(WITHOUT_PHP)
    @${REINPLACE_CMD} "s|define PHP|undef PHP|" \
        ${WRKSRC}/sources/main.h
.endif

do-install:
    ${INSTALL_PROGRAM} ${WRKSRC}/sources/pserv ${PREFIX}/sbin/
    ${MKDIR} ${PREFIX}/etc/pserv
    ${INSTALL_DATA} ${WRKSRC}/defaults/mime_types.dat ${PREFIX}/etc/pserv/mime.types
    ${INSTALL_DATA} ${WRKSRC}/defaults/pserv.conf ${PREFIX}/etc/pserv/
    ${INSTALL_SCRIPT} ${FILESDIR}/pserv.sh ${PREFIX}/etc/rc.d/

.include <bsd.port.post.mk>