summaryrefslogtreecommitdiff
path: root/devel/wrangler/Makefile
blob: 6669dd4a6742ffd5f7392df039c20bb235433c54 (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
PORTNAME=	wrangler
DISTVERSIONPREFIX=	v
DISTVERSION=	1.19.12
PORTREVISION=	6
CATEGORIES=	devel

MAINTAINER=	antranigv@freebsd.am
COMMENT=	Cloudflare Workers CLI Tool
WWW=		https://developers.cloudflare.com/workers/cli-wrangler/

LICENSE=	APACHE20 MIT
LICENSE_COMB=	dual
LICENSE_FILE_APACHE20=	${WRKSRC}/LICENSE-APACHE
LICENSE_FILE_MIT=	${WRKSRC}/LICENSE-MIT

LIB_DEPENDS=	libcurl.so:ftp/curl

USES=		cargo gmake ssl
USE_GITHUB=	yes
GH_ACCOUNT=	cloudflare

CARGO_FEATURES=	--no-default-features sys-openssl

PLIST_FILES=	bin/${PORTNAME}
PORTDOCS=	CHANGELOG.md README.md

OPTIONS_DEFINE=		DOCS
OPTIONS_DEFAULT=	DOCS

# sys-info-0.9.1 crate fix: https://github.com/FillZpp/sys-info-rs/issues/80
post-patch:
	@${REINPLACE_CMD} \
	-e '/get_cpu/s|unsigned long|uint64_t|' \
	-e '/get_proc_total/s|unsigned long|uint64_t|' \
	${WRKSRC}/cargo-crates/sys-info-0.9.1/c/*.[ch]

post-install:
	${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/${PORTNAME}

post-install-DOCS-on:
	${MKDIR} ${STAGEDIR}${DOCSDIR}
	${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}

.include <bsd.port.mk>