summaryrefslogtreecommitdiff
path: root/www/varnish/Makefile
blob: 244621d9443ee642a252fd51c056ac1816b4684b (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
# $NetBSD: Makefile,v 1.8 2010/12/06 14:25:44 wiz Exp $
#

DISTNAME=	varnish-2.1.4
CATEGORIES=	www
MASTER_SITES=	http://www.varnish-software.com/sites/default/files/

MAINTAINER=	pkgsrc-users@NetBSD.org
HOMEPAGE=	http://varnish-cache.org/
COMMENT=	High-performace HTTP accelerator
LICENSE=	modified-bsd

PKG_DESTDIR_SUPPORT=	user-destdir

GNU_CONFIGURE=	yes
USE_LIBTOOL=	yes
USE_TOOLS+=	autoconf pkg-config gmake
BUILD_DEFS+=	VARBASE

EGDIR=			${PREFIX}/share/examples/varnish
PKG_SYSCONFSUBDIR=	varnish
CONF_FILES=		${EGDIR}/default.vcl ${PKG_SYSCONFDIR}/default.vcl

VRNUSER?=		varnish
VRNGROUP?=		${VRNUSER}
STATEDIR=		${VARBASE}/db
VRNDIR=			${STATEDIR}/${PKGBASE}

CONFIGURE_ARGS+=	--localstatedir=${STATEDIR}
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

RCD_SCRIPTS=            varnishd varnishlog varnishncsa

.include "../../lang/python/pyversion.mk"
BUILD_DEPENDS+=       ${PYPKGPREFIX}-docutils>=0.5:../../textproc/py-docutils

.include "../../devel/pcre/buildlink3.mk"
.include "../../mk/bsd.prefs.mk"

.if ${OPSYS} == "SunOS"
.  if ${PKGSRC_COMPILER} == "sunpro"
CONFIGURE_ENV+=	VCC="cc -Kpic -G -o %o %s"
.  else
CONFIGURE_ENV+=	VCC_CC="gcc -fpic -shared -o %o %s"
.  endif
.endif

pre-configure:
	cd ${WRKSRC} && autoconf

.include "../../mk/pthread.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"