1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-25 04:43:33 +00:00
freebsd-ports/textproc/jshon/Makefile
Tobias C. Berner 81babc4b18 Update textproc/jshon to 20160111.2
PR:		223280
Submitted by:	kalten@gmx.at
2017-10-28 05:56:54 +00:00

49 lines
1.1 KiB
Makefile

# $FreeBSD$
PORTNAME= jshon
DISTVERSION= 20160111.2
CATEGORIES= textproc
MAINTAINER= ports@FreeBSD.org
COMMENT= JSON parser for the shell
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE
LIB_DEPENDS= libjansson.so:devel/jansson
COMMIT_HASH= 783d3bf
GH_TAGNAME= ${COMMIT_HASH}
USES= gmake
USE_GITHUB= yes
GH_ACCOUNT= keenerd
OPTIONS_DEFINE= ZSH
OPTIONS_DEFAULT=
CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
PLIST_FILES= bin/jshon man/man1/jshon.1.gz
ZSH_PLIST_FILES= share/zsh/site-functions/jshon_zsh_completion
pre-configure:
@${REINPLACE_CMD} -e 's|^\(#define JSHONVER \).*|\1"${PORTVERSION}-${COMMIT_HASH}"|' \
-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:
${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
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>