aboutsummaryrefslogtreecommitdiffstats
path: root/www/middleman/Makefile
blob: 4da26d2b35d935473e326373f94fb86ed2852db5 (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
# Created by: Kirill Ponomarew <ponomarew@oberon.net>
# $FreeBSD$

PORTNAME=   middleman
PORTVERSION=    1.9.1
PORTREVISION=   2
CATEGORIES= www
MASTER_SITES=   SF/middle-man/Source/${PORTNAME}

MAINTAINER= ports@FreeBSD.org
COMMENT=    Robust proxy server

OPTIONS_DEFINE= SYSLOG DEBUG MTIME DOCS

SYSLOG_DESC=    Enable syslog support
DEBUG_DESC= Enable debugging support
MTIME_DESC= Enable mtime support

SYSLOG_CONFIGURE_ON=    --enable-syslog
DEBUG_CONFIGURE_ON= --enable-debug
MTIME_CONFIGURE_ON= --enable-mtime

WRKSRC=     ${WRKDIR}/${PORTNAME}
GNU_CONFIGURE=  yes
USES=       gmake

CPPFLAGS+=  -I${LOCALBASE}/include
LDFLAGS+=   -L${LOCALBASE}/lib -pthread

MAKE_JOBS_UNSAFE=   yes

MMAN_CACHE= /var/cache/mman
PLIST_SUB+= MMAN_CACHE=${MMAN_CACHE}

post-patch:
    @${REINPLACE_CMD} -e \
    's|/usr/bin/mman|${PREFIX}/bin/mman|g ; \
    s|/etc/mman/config.xml|${PREFIX}/etc/mman.xml|g' \
        ${WRKSRC}/scripts/mman.init \
        ${WRKSRC}/man/mman.8

do-install:
    @${MKDIR} ${STAGEDIR}${MMAN_CACHE}
    ${INSTALL_MAN} ${WRKSRC}/man/mman.8 ${STAGEDIR}${MANPREFIX}/man/man8
    ${INSTALL_PROGRAM} ${WRKSRC}/mman ${STAGEDIR}${PREFIX}/bin
    ${INSTALL_DATA} ${WRKSRC}/config.xml \
        ${STAGEDIR}${PREFIX}/etc/mman.xml.sample
    ${INSTALL_DATA} ${WRKSRC}/scripts/mman.init \
        ${STAGEDIR}${PREFIX}/etc/rc.d/mman.sh.sample
    @${MKDIR} ${STAGEDIR}${DOCSDIR}
    ${INSTALL_DATA} ${WRKSRC}/scripts/filter.pl ${STAGEDIR}${DOCSDIR}
    ${INSTALL_DATA} ${WRKSRC}/README.html ${STAGEDIR}${DOCSDIR}

.include <bsd.port.mk>