blob: cb3f99420974eb1128839cd504141ab9c0b8ebf6 (
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
|
PORTNAME= jshon
DISTVERSION= 20170302.1
CATEGORIES= textproc
MAINTAINER= 0mp@FreeBSD.org
COMMENT= JSON parser for the shell
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE
LIB_DEPENDS= libjansson.so:devel/jansson
USES= gmake
USE_GITHUB= yes
GH_ACCOUNT= keenerd
GH_TAGNAME= d919aea
CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
PLIST_FILES= bin/jshon man/man1/jshon.1.gz
OPTIONS_DEFINE= ZSH
OPTIONS_DEFAULT=ZSH
ZSH_PLIST_FILES= share/zsh/site-functions/jshon_zsh_completion
pre-configure:
@${REINPLACE_CMD} -e 's|^\(#define JSHONVER \).*|\1"${PORTVERSION}-${GH_TAGNAME}"|' \
-e 's|\({printf("%\)i\(\\n", JSHONVER); exit(0);}\)|\1s\2|' \
${WRKSRC}/jshon.c
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin
${INSTALL_MAN} ${WRKSRC}/${PORTNAME}.1 ${STAGEDIR}${MANPREFIX}/man/man1
post-install-ZSH-on:
@${MKDIR} ${STAGEDIR}${PREFIX}/share/zsh/site-functions
${INSTALL_DATA} ${WRKSRC}/jshon_zsh_completion ${STAGEDIR}${PREFIX}/share/zsh/site-functions/
.include <bsd.port.mk>
|