aboutsummaryrefslogtreecommitdiff
path: root/devel/rbenv/Makefile
blob: f1a9326fa1f2e281b3e69ce0685dbb50fe02d96d (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=	rbenv
PORTVERSION=	1.2.0
DISTVERSIONPREFIX=	v
CATEGORIES=	devel ruby

MAINTAINER=	ruby@FreeBSD.org
COMMENT=	Manage multiple versions of ruby

LICENSE=	MIT
LICENSE_FILE=	${WRKSRC}/LICENSE

RUN_DEPENDS=	bash:shells/bash

USES=		cpe

USE_GITHUB=	yes

NO_BUILD=	yes

REINPLACE_ARGS=	-i ''

CPE_VENDOR=	rbenv_project

post-patch:
	@${REINPLACE_CMD} -e "s|\$${root}/completions|${DATADIR}/completions|g" \
		${WRKSRC}/libexec/rbenv-init

do-install:
	CC="${CC}" ${WRKSRC}/src/${CONFIGURE_CMD}
	${SETENV} ${MAKE_ENV} ${MAKE_CMD} -C ${WRKSRC}/src
	( ${INSTALL_SCRIPT} ${WRKSRC}/libexec/* ${STAGEDIR}${PREFIX}/libexec/ )
	@${LN} -sf ../libexec/rbenv ${STAGEDIR}${PREFIX}/bin/rbenv
	@${MKDIR} ${STAGEDIR}${DATADIR}/completions
	( cd ${WRKSRC}/completions && ${COPYTREE_BIN} . ${STAGEDIR}${DATADIR}/completions )
	@${MKDIR} ${STAGEDIR}${PREFIX}/etc/rbenv.d
	( cd ${WRKSRC}/rbenv.d && ${COPYTREE_BIN} . ${STAGEDIR}${PREFIX}/etc/rbenv.d )

post-install:
	${STRIP_CMD} ${STAGEDIR}${PREFIX}/libexec/rbenv-realpath.dylib

.include <bsd.port.mk>