pkgsrc-wip/varnish/Makefile.common

85 lines
2.2 KiB
Makefile

# $NetBSD$
# used by wip/varnish/Makefile
# used by wip/varnish4/Makefile
CATEGORIES= www
MASTER_SITES= http://repo.varnish-cache.org/source/
MAINTAINER?= pkgsrc-users@NetBSD.org
HOMEPAGE= http://varnish-cache.org/
COMMENT= High-performace HTTP accelerator
LICENSE= modified-bsd
BUILD_DEPENDS+= ${PYPKGPREFIX}-docutils>=0.12:../../textproc/py-docutils
GNU_CONFIGURE= yes
USE_LIBTOOL= yes
USE_TOOLS+= pkg-config gmake
BUILD_DEFS+= VARBASE
BUILD_DEFS+= PKG_SYSCONFBASE
CONF_FILES= share/examples/varnish/builtin.vcl \
${PKG_SYSCONFDIR}/builtin.vcl
CONF_FILES+= share/examples/varnish/example.vcl \
${PKG_SYSCONFDIR}/example.vcl
.include "../../mk/bsd.prefs.mk"
VRNUSER?= varnish
VRNGROUP?= ${VRNUSER}
STATEDIR= ${VARBASE}/db
VRNDIR= ${STATEDIR}/${PKGBASE}
OWN_DIRS+= ${VRNDIR}
OWN_DIRS_PERMS+= ${VRNDIR} ${VRNUSER} ${VRNGROUP} 0770
PKG_GROUPS+= ${VRNGROUP}
PKG_USERS+= ${VRNUSER}:${VRNGROUP}
PKG_HOME.${VRNUSER}= ${VRNDIR}
PKG_SHELL.${VRNUSER}= ${SH}
PKG_GECOS.${VRNUSER}= Varnish daemon user
PKG_SYSCONFSUBDIR= varnish
FILES_SUBST+= VRNUSER=${VRNUSER}
FILES_SUBST+= VRNGROUP=${VRNGROUP}
REPLACE_PYTHON+= lib/libvcc/vmodtool.py
CONFIGURE_ARGS+= --localstatedir=${STATEDIR}
CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFBASE}
CONFIGURE_ARGS+= --with-rst2html=${PREFIX}/bin/rst2html-${PYVERSSUFFIX}.py
CONFIGURE_ARGS+= --with-rst2man=${PREFIX}/bin/rst2man-${PYVERSSUFFIX}.py
# Explicitly disable epoll on illumos, provided for Linux compat only.
CONFIGURE_ARGS.SunOS+= --disable-epoll
.include "../../mk/compiler.mk"
# Fixes build on at least SunOS/i386
# See https://github.com/varnishcache/varnish-cache/issues/1875
.if !empty(CC_VERSION:Mgcc*)
CFLAGS+= -fexcess-precision=standard
.endif
INSTALL_MAKE_FLAGS+= sysconfdir=${PREFIX}/share/examples/varnish
# not signed/unsigned char safe
BUILDLINK_TRANSFORM+= rm:-Werror
PKGCONFIG_OVERRIDE+= varnishapi.pc.in
RCD_SCRIPTS= varnishd varnishlog varnishncsa
TEST_TARGET= check
PYTHON_FOR_BUILD_ONLY= yes
.include "../../devel/pcre/buildlink3.mk"
.include "../../devel/libexecinfo/buildlink3.mk"
.include "../../lang/python/application.mk"
.include "../../mk/curses.buildlink3.mk"
.include "../../mk/pthread.buildlink3.mk"
.include "../../mk/readline.buildlink3.mk"