summaryrefslogtreecommitdiff
path: root/security/acme.sh/Makefile
blob: eaf345c97051d4e562ea2eaa6df0a8b657235cae (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
PORTNAME=	acme.sh
PORTVERSION=	2.8.8
CATEGORIES=	security

MAINTAINER=	dvl@FreeBSD.org
COMMENT=	ACME protocol client written in shell

LICENSE=	GPLv3+

USE_GITHUB=	yes
GH_ACCOUNT=	Neilpang

USERS=	acme
GROUPS=	acme

OPTIONS_DEFINE=	BINDTOOLS DOCS EXAMPLES IDN STANDALONE
OPTIONS_SINGLE=	HTTP
OPTIONS_SINGLE_HTTP=	CURL WGET
OPTIONS_DEFAULT=	CURL STANDALONE
BINDTOOLS_DESC=	Depend on bind-tools for nsupdate
BINDTOOLS_RUN_DEPENDS=	nsupdate:dns/bind-tools
IDN_RUN_DEPENDS=	idn2:dns/libidn2
STANDALONE_DESC=	Standalone mode requires SOCAT
STANDALONE_RUN_DEPENDS=	socat>0:net/socat

CURL_DESC=	Depend on cURL for HTTP(S) queries
WGET_DESC=	Depend on Wget for HTTP(S) queries

NO_ARCH=	yes
NO_BUILD=	yes

CURL_RUN_DEPENDS=	curl:ftp/curl
WGET_RUN_DEPENDS=	wget:ftp/wget

PORTDOCS=	README.md

SUB_FILES=	pkg-message

post-patch-IDN-on:
	${REINPLACE_CMD} -e 's|^ *idn |      idn2 |'\
		-e 's|_exists idn|_exists idn2|' ${WRKSRC}/acme.sh

do-install:
	${INSTALL_SCRIPT} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/sbin/${PORTNAME}
	${MKDIR} ${STAGEDIR}/var/db/acme/.acme.sh ${STAGEDIR}/var/db/acme/certs
	${INSTALL_DATA} ${FILESDIR}/account.conf.sample ${STAGEDIR}/var/db/acme/.acme.sh

do-install-DOCS-on:
	${MKDIR} ${STAGEDIR}${DOCSDIR}
	${INSTALL_DATA} ${WRKSRC}/README.md ${STAGEDIR}${DOCSDIR}

do-install-EXAMPLES-on:
	${MKDIR} ${STAGEDIR}${EXAMPLESDIR}/deploy ${STAGEDIR}${EXAMPLESDIR}/dnsapi
	( cd ${WRKSRC} && ${COPYTREE_BIN} deploy ${STAGEDIR}${EXAMPLESDIR} )
	( cd ${WRKSRC} && ${COPYTREE_BIN} dnsapi ${STAGEDIR}${EXAMPLESDIR} )
	( cd ${WRKSRC} && ${COPYTREE_BIN} notify ${STAGEDIR}${EXAMPLESDIR} )
	${INSTALL_DATA} ${FILESDIR}/acme.sh.conf ${STAGEDIR}${EXAMPLESDIR}
	${RLN} ${STAGEDIR}/${EXAMPLESDIR}/deploy ${STAGEDIR}/var/db/acme/.acme.sh
	${RLN} ${STAGEDIR}/${EXAMPLESDIR}/dnsapi ${STAGEDIR}/var/db/acme/.acme.sh
	${RLN} ${STAGEDIR}/${EXAMPLESDIR}/notify ${STAGEDIR}/var/db/acme/.acme.sh

.include <bsd.port.mk>