summaryrefslogtreecommitdiff
path: root/www/caddy-custom/Makefile
blob: 59e1170f247540cc447ea90f7f37927058ad4275 (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
# READ pkg-descr FOR INSTRUCTIONS!
# This port will NOT build in poudriere without (simple) manual
# intervention.

PORTNAME=	caddy-custom
PORTVERSION=	${CADDY_VERSION}.${XCADDY_VERSION}
PORTREVISION=	18
CATEGORIES=	www
DISTFILES=	# none

MAINTAINER=	adamw@FreeBSD.org
COMMENT=	Caddy (www/caddy) with customized plugins
WWW=		https://caddyserver.com

LICENSE=	APACHE20

BUILD_DEPENDS=	xcaddy:www/xcaddy

USES=		go:no_targets

NO_PACKAGE=	Requires network access (see pkg-descr)

CONFLICTS_INSTALL=	caddy

USE_RC_SUBR=	caddy
SUB_FILES=	caddy

PLIST_FILES=	bin/caddy

CADDY_VERSION!=	${MAKE} -C ${.CURDIR}/../caddy  -V '$${DISTVERSION}.$${PORTREVISION}'
XCADDY_VERSION!=${MAKE} -C ${.CURDIR}/../xcaddy -V '$${DISTVERSION}.$${PORTREVISION}'

.for plugin in ${CADDY_CUSTOM_PLUGINS}
PLUGINS+=	--with ${plugin}
.endfor

XCADDY_GO_BUILD_FLAGS?=	${GO_BUILDFLAGS}

XCADDY_ENV+=	XCADDY_WHICH_GO="${GO_CMD}" \
		XCADDY_GO_BUILD_FLAGS="${XCADDY_GO_BUILD_FLAGS}"

do-build:
	${MKDIR} ${WRKSRC}
	cd ${WRKSRC} && ${XCADDY_ENV} ${LOCALBASE}/bin/xcaddy build ${PLUGINS}

do-install:
	${INSTALL_PROGRAM} ${WRKSRC}/caddy ${STAGEDIR}${PREFIX}/bin

.include <bsd.port.mk>