summaryrefslogtreecommitdiff
path: root/devel/ocaml-react/Makefile
blob: 6530c1dfa63b1119b0e5abef119ada44cc5d71aa (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
# $NetBSD: Makefile,v 1.8 2015/01/20 15:22:53 jaapb Exp $

DISTNAME=	react-1.2.0
PKGREVISION=	1
CATEGORIES=	devel
MASTER_SITES=	http://erratique.ch/software/react/releases/
EXTRACT_SUFX=	.tbz

MAINTAINER=	jaapb@NetBSD.org
HOMEPAGE=	http://erratique.ch/software/react
COMMENT=	OCaml module for functional reactive programming
LICENSE=	modified-bsd

CONFIGURE_ARGS+=	--prefix "${PREFIX}" --destdir "${DESTDIR}"
INSTALLATION_DIRS+=	${OCAML_SITELIBDIR}/react

#SUBST_CLASSES+=   destdir
#SUBST_STAGE.destdir=  post-configure
#SUBST_MESSAGE.destdir=  Changing install location to DESTDIR
#SUBST_FILES.destdir=  setup.ml
#SUBST_SED.destdir=      -e 's,"install" :: findlib_name,"install" :: "-destdir ${DESTDIR}${PREFIX}/lib/ocaml/site-lib" :: "-ldconf /dev/null" :: findlib_name,'

.include "../../mk/ocaml.mk"

do-build:
.if ${OCAML_USE_OPT_COMPILER} == yes
	cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ocaml pkg/build.ml native=true native-dynlink=true
.else
	cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ocaml pkg/build.ml
.endif

do-install:
	for i in react.cma react.cmi react.mli react_top.cma; do \
		${INSTALL_DATA} ${WRKSRC}/_build/src/$$i \
			${DESTDIR}${PREFIX}/${OCAML_SITELIBDIR}/react; \
	done
.if ${OCAML_USE_OPT_COMPILER} == yes
	for i in react.a react.cmx react.cmxa react.cmxs react_top.a react_top.cmxa \
	react_top.cmxs; do \
		${INSTALL_DATA} ${WRKSRC}/_build/src/$$i \
			${DESTDIR}${PREFIX}/${OCAML_SITELIBDIR}/react; \
	done
.endif
	${INSTALL_DATA} ${WRKSRC}/_build/pkg/META \
		${DESTDIR}${PREFIX}/${OCAML_SITELIBDIR}/react

.include "../../devel/ocaml-findlib/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"