aboutsummaryrefslogtreecommitdiffstats
path: root/www/xshttpd-devel/Makefile
blob: b07098179a9b29be507853d86697e2fba5d6bd3b (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
# Created by: Ed Schouten <ed@fxq.nl>
# $FreeBSD$

PORTNAME=   xshttpd
DISTVERSION=    3.7b31
CATEGORIES= www ipv6
MASTER_SITES=   ftp://ftp.stack.nl/pub/xs-httpd/release/ \
        ftp://mud.stack.nl/pub/xs-httpd/release/
PKGNAMESUFFIX=  -devel
DISTNAME=   ${PORTNAME}-${DISTVERSION:S/.//}

MAINTAINER= johans@FreeBSD.org
COMMENT=    Webserver with CGI as own user and SSL support

RUN_DEPENDS=    run-mailcap:${PORTSDIR}/misc/mime-support \
        ppmtogif:${PORTSDIR}/graphics/netpbm
LIB_DEPENDS=    libpcre.so:${PORTSDIR}/devel/pcre

CONFLICTS_INSTALL=  xshttpd-[0-9]* publicfile-[0-9]*

USES=       tar:bzip2
USE_OPENSSL=    yes
USE_RC_SUBR=    xshttpd
GNU_CONFIGURE=  yes
CONFIGURE_ARGS= --enable-hier=bsd --with-userid=${WWWOWN}:${WWWGRP}

OPTIONS_DEFINE=     LDAP CURL M4 PERL BDB
OPTIONS_DEFAULT=    CURL M4 BDB
OPTIONS_SUB=        yes
LDAP_USE=       openldap
LDAP_CONFIGURE_WITH=    ldap
M4_DESC=        Enable configuration preprocessor (m4)
M4_CONFIGURE_WITH=  preprocessor
PERL_DESC=      Enable persistent Perl interpreter
PERL_USES=      perl5
PERL_CONFIGURE_WITH=    perl
CURL_LIB_DEPENDS=   libcurl.so:${PORTSDIR}/ftp/curl
CURL_CONFIGURE_WITH=    curl
BDB_USE=        BDB=5+
BDB_CONFIGURE_ON=   --with-db-libdir=${BDB_LIB_DIR} \
            --with-db-include-dir=${BDB_INCLUDE_DIR}
BDB_CONFIGURE_WITH= db

PORTDOCS=   README ChangeLog

post-patch:
    @${REINPLACE_CMD} \
        -e 's|\(MIME_TYPES\).*|\1 "${LOCALBASE}/etc/mime.types"|' \
        ${WRKSRC}/src/constants.h
    @${REINPLACE_CMD} -e 's|mime.types ||g' \
        ${WRKSRC}/config/Makefile.in
    @${REINPLACE_CMD} -e '/libdir/ s|(INSTALL_DATA)|& -s|' \
        ${WRKSRC}/src/Makefile.in
    @${REINPLACE_CMD} -e 's/$$(htmldir)/$$(DESTDIR)&/' \
        ${WRKSRC}/contrib/Makefile.in

post-install:
    @${MKDIR} ${STAGEDIR}${DOCSDIR} ${STAGEDIR}${WWWDIR}/htdocs \
        ${STAGEDIR}/var/log/xshttpd \
        ${STAGEDIR}/var/db/xshttpd/sessions
    ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}

.include <bsd.port.mk>