aboutsummaryrefslogtreecommitdiffstats
path: root/devel/erlang-mustache/Makefile
blob: 78bf1204d888afacad83090471a9309e4509b088 (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
42
43
44
45
46
47
# $FreeBSD$

PORTNAME=   mustache
PORTVERSION=    0.3.2
DISTVERSIONPREFIX=v
CATEGORIES= devel
PKGNAMEPREFIX=  erlang-

MAINTAINER= olgeni@FreeBSD.org
COMMENT=    Mustache template engine for Erlang

LICENSE=    MIT

BUILD_DEPENDS=  ${LOCALBASE}/bin/erl:${PORTSDIR}/lang/erlang
RUN_DEPENDS:=   ${BUILD_DEPENDS}

PLIST_SUB=  VERSION="${PORTVERSION}"

USE_GITHUB= yes
GH_ACCOUNT= soranoba

ALL_TARGET= compile

.include <bsd.port.options.mk>

post-extract:
    @${RM} ${WRKSRC}/rebar.lock

post-patch:
    @${REINPLACE_CMD} -e "s/%%PORTVERSION%%/${PORTVERSION}/" ${WRKSRC}/src/mustache.app.src
    @${RM} ${WRKSRC}/src/*.bak ${WRKSRC}/src/*.orig

post-build:
    ${LN} -s ${WRKSRC}/_build/default/lib/mustache/ebin ${WRKSRC}

do-install:
.if ${PORT_OPTIONS:MDOCS}
    @${MKDIR} ${STAGEDIR}${DOCSDIR}
    ${INSTALL_DATA} ${WRKSRC}/README.md ${STAGEDIR}${DOCSDIR}
.endif
    @${MKDIR} ${STAGEDIR}${PREFIX}/lib/erlang/lib/${PORTNAME}-${PORTVERSION}
    @${MKDIR} ${STAGEDIR}${PREFIX}/lib/erlang/lib/${PORTNAME}-${PORTVERSION}/ebin
    @${MKDIR} ${STAGEDIR}${PREFIX}/lib/erlang/lib/${PORTNAME}-${PORTVERSION}/src
    ${INSTALL_DATA} ${WRKSRC}/ebin/* ${STAGEDIR}${PREFIX}/lib/erlang/lib/${PORTNAME}-${PORTVERSION}/ebin
    ${INSTALL_DATA} ${WRKSRC}/src/* ${STAGEDIR}${PREFIX}/lib/erlang/lib/${PORTNAME}-${PORTVERSION}/src

.include <bsd.port.mk>