freebsd-ports/textproc/jshon/Makefile
Mateusz Piotrowski bf6ac4b88b textproc/jshon: Update to 20170302.1
- Take over MAINTAINER'ship.
- Sort variables.
- Remove the COMMIT_HASH variable. Use only GH_TAGNAME instead.
- Add ZSH to OPTIONS_DEFAULT as suggested by the handbook.
- Do not strip in post-install since INSTALL_PROGRAM is already used in
  do-install.
- Improve pkg-descr.

Reviewed by:	krion
Approved by:	krion (mentor)
Differential Revision:	https://reviews.freebsd.org/D18422
2018-12-03 17:38:16 +00:00

43 lines
1 KiB
Makefile

# $FreeBSD$
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>