aboutsummaryrefslogtreecommitdiffstats
path: root/www/nginx-acme/Makefile
blob: 6a8b46db2ac1bbda9257307762d7edfde87e797b (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
51
52
53
54
55
56
57
58
59
60
61
PORTNAME=	acme
PORTVERSION=	0.1.1
PORTREVISION=	2
CATEGORIES=	www
MASTER_SITES=	https://github.com/nginx/nginx-${PORTNAME}/releases/download/v${PORTVERSION}/:acme \
		https://nginx.org/download/:nginx
PKGNAMEPREFIX=	nginx-devel-
DISTFILES=	nginx-${PORTNAME}-${DISTVERSION}.tar.gz:acme \
		nginx-${NGINX_VERSION}.tar.gz

MAINTAINER=	osa@FreeBSD.org
COMMENT=	ACME module for NGINX
WWW=		https://github.com/nginx/nginx-acme

LICENSE=	APACHE20
LICENSE_FILE=	${WRKSRC}/LICENSE

LIB_DEPENDS+=	libpcre2-8.so:devel/pcre2

#FLAVORS=	default devel
#FLAVOR?=	${FLAVORS:[2]}
#default_PKGNAMEPREFIX=	nginx-
#devel_PKGNAMEPREFIX=	nginx-devel-
#default_CONFLICTS_INSTALL=	nginx-devel-${PORTNAME}
#devel_CONFLICTS_INSTALL=	nginx-${PORTNAME}

WRKSRC=		${WRKDIR}/nginx-${PORTNAME}-${PORTVERSION}

#.if ${FLAVOR} == devel
.include "${.CURDIR}/../nginx-devel/version.mk"
RUN_DEPENDS=	${LOCALBASE}/sbin/nginx:www/nginx-devel
#.else
#.include "${.CURDIR}/../nginx/version.mk"
#RUN_DEPENDS=	${LOCALBASE}/sbin/nginx:www/nginx
#.endif

USES=		cargo cpe llvm:lib,noexport ssl

CPE_VENDOR=	f5
CPE_PRODUCT=	nginx-acme

CARGO_ENV+=	NGINX_BUILD_DIR=${WRKDIR}/nginx-${NGINX_VERSION}/objs
NGX_CONFIGURE_ARGS=	--with-compat \
			--with-cc-opt="-I ${LOCALBASE}/include" \
			--with-ld-opt="-L ${LOCALBASE}/lib" \
			--with-http_ssl_module

.include "${.CURDIR}/Makefile.cargo"

PLIST_FILES=	libexec/nginx/ngx_http_acme_module.so

pre-configure:
	( cd ${WRKDIR}/nginx-${NGINX_VERSION} && \
		${SETENV} ${CONFIGURE_ENV} ${CONFIGURE_CMD} ${NGX_CONFIGURE_ARGS} )

do-install:
	${MKDIR} ${STAGEDIR}${PREFIX}/libexec/nginx/
	${INSTALL_DATA} ${WRKDIR}/target/release/libnginx_acme.so \
		${STAGEDIR}${PREFIX}/libexec/nginx/ngx_http_acme_module.so

.include <bsd.port.mk>