aboutsummaryrefslogtreecommitdiffstats
path: root/www/obhttpd/Makefile
blob: 68a03e95fb0681c26e1caa6af97e3c2525569685 (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
# $FreeBSD$

PORTNAME=   obhttpd
PORTVERSION=    6.0.20161006
CATEGORIES= www

MAINTAINER= koue@chaosophia.net
COMMENT=    OpenBSD http server

LICENSE=    BSD3CLAUSE

WRKSRC_SUBDIR=  src

USE_GITHUB= yes
GH_ACCOUNT= koue
GH_PROJECT= httpd

USE_RC_SUBR=    obhttpd
USES=       ssl uidfix

CFLAGS+=    -Wall

MAKE_ARGS+= BINDIR=${PREFIX}/sbin MANDIR=${PREFIX}/man/man

USERS=      www
GROUPS=     www

post-patch:
    ${REINPLACE_CMD} -e 's|httpd$$|obhttpd|g' \
             -e 's|httpd.conf.5|obhttpd.conf.5|g' \
             -e 's|httpd.8|obhttpd.8|g' ${WRKSRC}/usr.sbin/httpd/Makefile
    ${REINPLACE_CMD} -e 's|htpasswd$$|obhtpasswd|g' \
             -e 's|htpasswd.1|obhtpasswd.1|g' ${WRKSRC}/usr.bin/htpasswd/Makefile
    ${MV} ${WRKSRC}/usr.bin/htpasswd/htpasswd.1 ${WRKSRC}/usr.bin/htpasswd/obhtpasswd.1
    ${MV} ${WRKSRC}/usr.sbin/httpd/httpd.conf.5 ${WRKSRC}/usr.sbin/httpd/obhttpd.conf.5
    ${MV} ${WRKSRC}/usr.sbin/httpd/httpd.8 ${WRKSRC}/usr.sbin/httpd/obhttpd.8
    ${REINPLACE_CMD} -e 's|/etc/httpd.conf|${PREFIX}/etc/obhttpd.conf|g' \
        ${WRKSRC}/usr.sbin/httpd/httpd.h

post-install:
    ${INSTALL_DATA} ${WRKSRC}/etc/examples/httpd.conf \
        ${STAGEDIR}${PREFIX}/etc/obhttpd.conf.sample

.include <bsd.port.pre.mk>

.if empty(SSL_DEFAULT:Mlibressl*)
IGNORE=     needs LibreSSL to build. Set DEFAULT_VERSIONS+=ssl=libressl and rebuild everything
.endif

.include <bsd.port.post.mk>