aboutsummaryrefslogtreecommitdiffstats
path: root/www/cherokee/Makefile
blob: 9b6390b0b79e02300d03f1c11d3b625f0af10965 (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
69
70
71
72
73
74
75
76
77
78
79
# New ports collection makefile for:    cherokee
# Date created:         01 Jun 2002
# Whom:             silence <oksala@videotron.ca>
#
# $FreeBSD$
#

PORTNAME=   cherokee
PORTVERSION=    0.4.19
CATEGORIES= www
MASTER_SITES=   http://www.0x50.org/download/%SUBDIR%/
MASTER_SITE_SUBDIR= ${PORTVERSION:R}/${PORTVERSION}

MAINTAINER= ports@FreeBSD.org
COMMENT=    An extremely fast and flexible web server

LIB_DEPENDS=    pcre.0:${PORTSDIR}/devel/pcre

USE_GNOME=  gnomehack gnometarget pkgconfig
USE_GETOPT_LONG=    yes
USE_REINPLACE=  yes
USE_GMAKE=  yes
USE_LIBTOOL_VER=    15
CONFIGURE_ENV=  CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
CONFIGURE_ARGS= --with-wwwroot=${PREFIX}/www
INSTALLS_SHLIB= yes

MAN1=       cherokee-config.1 cherokee.1

CPPFLAGS=   -I${LOCALBASE}/include ${PTHREAD_CFLAGS}
LDFLAGS=    -L${LOCALBASE}/lib ${PTHREAD_LIBS}

.if defined(WITHOUT_GNUTLS)
USE_OPENSSL=    yes
CONFIGURE_ARGS+=    --enable-tls=openssl
LDFLAGS+=   -lssl -lcrypto
.else
LIB_DEPENDS+=   gnutls.12:${PORTSDIR}/security/gnutls
CONFIGURE_ARGS+=    --enable-tls=gnutls
.endif

.include <bsd.port.pre.mk>

.if ${OSVERSION} < 500000
PLIST_SUB+= PAM="" PAM5="@comment "
.else
PLIST_SUB+= PAM="@comment " PAM5=""
.endif

post-patch:
    @${REINPLACE_CMD} -e 's|$$(top_builddir)/sherokee_reinplace|true|g' \
        ${WRKSRC}/Makefile.in

pre-build:
.for file in advanced.conf cherokee.conf mods-ssl sites-default sites-example
    @cd ${BUILD_WRKSRC} && ${SED} -e \
        's:%sysconfdir%:${PREFIX}/etc:g ; \
         s:%datadir%:${PREFIX}/share:g ; \
         s:%wwwroot%:${PREFIX}/www:g ; \
         s:%prefix%:${PREFIX}:g' < ${file}.sample.pre > ${file}.sample
.endfor

pre-install:
    @if [ ! -f ${PREFIX}/www ]; then \
        ${MKDIR} ${PREFIX}/www;\
    fi
    @if [ ! -f ${PREFIX}/www/data ] ; then \
        ${MKDIR} ${PREFIX}/www/data;\
    fi
    @${ECHO_MSG} " `pwd` "

post-install:
    ${INSTALL_DATA} ${WRKSRC}/doc/Intro.txt ${DATADIR}
    @${ECHO_MSG} " "
    @${ECHO_MSG} " Dont forget to read the doc "
    @${ECHO_MSG} " ${PREFIX}/share/cherokee/Intro.txt"
    @${ECHO_MSG} " "

.include <bsd.port.post.mk>