summaryrefslogtreecommitdiff
path: root/www/yaws/Makefile
blob: 0d9a73ef1b2333edfb64ca1a801ebd7d43892b6f (plain)
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
# $NetBSD: Makefile,v 1.24 2022/10/23 13:45:57 nros Exp $
#

DISTNAME=		yaws-2.1.1
CATEGORIES=		www
MASTER_SITES=		${MASTER_SITE_GITHUB:=erlyaws/}
GITHUB_TAG=		${DISTNAME}

MAINTAINER=		bartosz.kuzma@gmail.com
HOMEPAGE=		http://yaws.hyber.org/
COMMENT=		High perfomance HTTP 1.1 webserver written in Erlang
LICENSE=		modified-bsd

WRKSRC=			${WRKDIR}/yaws-${DISTNAME}

BUILD_DEFS+=		VARBASE

USE_LIBTOOL=		yes
USE_TOOLS+=		aclocal autoconf automake autoreconf gmake perl tar
GNU_CONFIGURE=		yes

PKG_SYSCONFSUBDIR=	yaws

.include "../../mk/bsd.prefs.mk"

CONFIGURE_ARGS+=	--localstatedir=${VARBASE}
CONFIGURE_ARGS+=	--with-extrainclude=${PAMBASE}/include/security
CONFIGURE_ARGS+=	ERLANG_INSTALL_LIB_DIR_yaws=${PREFIX}/lib/yaws
CONFIGURE_ARGS+=	wwwdir=${WWWDIR}

# supress generation of pdf and ps files
CONFIGURE_ENV+=		ac_cv_prog_DVIPS=

# Not compatible with SunOS PAM headers
.if ${OPSYS} == "SunOS"
CONFIGURE_ARGS+=	--disable-pam
.endif

EGDIR=			${PREFIX}/share/examples/yaws
CONF_FILES=		${EGDIR}/yaws.conf ${PKG_SYSCONFDIR}/yaws.conf
RCD_SCRIPTS=		yaws
RCD_SCRIPT_SRC.yaws=	${WRKSRC}/scripts/netbsd/yaws.sh

WWWDIR=			${PREFIX}/share/yaws/www

OWN_DIRS=		${VARBASE}/log/yaws

REPLACE_PYTHON=		www/cgi-bin/foo.py
CHECK_INTERPRETER_SKIP=	share/yaws/www/cgi-bin/foo.py

INSTALL_MAKE_FLAGS+=	sysconfdir=${PREFIX}/share/examples

FILES_SUBST+=		PKG_SYSCONFDIR=${PKG_SYSCONFDIR}

post-extract:
	cd ${WRKSRC} && ${CHMOD} -R g-w www
	${RM} -Rf ${WRKSRC}/www/testdir

pre-configure:
	cd ${WRKSRC} && autoreconf -fi

post-configure:
	${SED} -e "s|@PKG_SYSCONFDIR@|${PKG_SYSCONFDIR}|g" \
		-e "s|@PREFIX@|${PREFIX}|g" \
		-e "s|@VARBASE@|${VARBASE}|g" \
		${FILESDIR}/yaws.conf > ${WRKDIR}/yaws.conf

post-install:
	${RM} -f ${DESTDIR}${WWWDIR}/code/Makefile*
	${RM} -f ${DESTDIR}${WWWDIR}/shoppingcart/Makefile*

.include "../../lang/erlang/buildlink3.mk"
.include "../../mk/pam.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"