summaryrefslogtreecommitdiff
path: root/sysutils/digdag/Makefile
blob: dc356f3b47f2e0b39d84d441fb3e0c195f8bda73 (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
PORTNAME=	digdag
DISTVERSION=	0.10.5
CATEGORIES=	sysutils java
MASTER_SITES=	https://github.com/treasure-data/digdag/releases/download/v${DISTVERSION}/ \
		LOCAL/ehaupt
EXTRACT_SUFX=	.jar

MAINTAINER=	ehaupt@FreeBSD.org
COMMENT=	Workload Automation System
WWW=		https://www.digdag.io/

LICENSE=	APACHE20

USE_JAVA=	yes
JAVA_VERSION=	8+
JAVA_VENDOR=	openjdk
JAVA_RUN=	yes
USE_RC_SUBR=	${PORTNAME}

NO_ARCH=	yes
NO_BUILD=	yes

SUB_LIST=	JAVA=${JAVA} \
		PORTNAME=${PORTNAME} \
		USERS=${USERS}
USERS=		digdag
PLIST_SUB=	USERS=${USERS} \
		VERSION=${DISTVERSION}

VARRUN=		/var/run/${PORTNAME}

do-extract:
	@${MKDIR} ${WRKSRC}
	@${PRINTF} "#!/bin/sh\nexec \"${JAVA}\" -jar \
		\"${JAVAJARDIR}/${PORTNAME}/${PORTNAME}-${PORTVERSION}.jar\" \"\$$@\"\n" \
		> ${WRKSRC}/${PORTNAME}

do-install:
	@${MKDIR} ${STAGEDIR}${JAVAJARDIR}/${PORTNAME}
	${INSTALL_DATA} ${DISTDIR}/${DISTFILES} \
		${STAGEDIR}${JAVAJARDIR}/${PORTNAME}/
	${INSTALL_SCRIPT} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin
	${INSTALL_DATA} ${FILESDIR}/${PORTNAME}.conf.sample \
		${STAGEDIR}${PREFIX}/etc

	@${MKDIR} ${STAGEDIR}${VARRUN}

cklatest:
	@${ECHO} "Port: ${DISTVERSION}"
	@${ECHO} -n "Upstream: "
	@curl -s -I https://dl.digdag.io/digdag-latest | \
		${SED} -n 's|.*digdag-\([0-9.]*\).jar|\1|p'

.include <bsd.port.mk>