Line 0
Link Here
|
|
|
1 |
# Created by: Reshad Patuck <reshadpatuck1@gmail.com> |
2 |
# $FreeBSD$ |
3 |
|
4 |
PORTNAME= couchdb2 |
5 |
PORTVERSION= 2.1.1 |
6 |
CATEGORIES= databases |
7 |
MASTER_SITES= APACHE/couchdb/source/${PORTVERSION} |
8 |
DISTNAME= apache-couchdb-${PORTVERSION} |
9 |
|
10 |
MAINTAINER= reshadpatuck1@gmail.com |
11 |
COMMENT= JSON document database with HTTP API and scalable multi-master sync |
12 |
|
13 |
LICENSE= APACHE20 BSD3CLAUSE ISCL WTFPL OFL11 |
14 |
LICENSE_COMB= multi |
15 |
|
16 |
LIB_DEPENDS= libicudata.so:devel/icu \ |
17 |
libmozjs185.so:lang/spidermonkey185 |
18 |
BUILD_DEPENDS= ${LOCALBASE}/bin/rebar:devel/rebar |
19 |
|
20 |
#CONFLICTS= couchdb-1* |
21 |
|
22 |
USERS= couchdb |
23 |
GROUPS= couchdb |
24 |
|
25 |
USES= cpe gmake libtool ssl |
26 |
USE_RC_SUBR= couchdb2 |
27 |
CPE_VENDOR= apache |
28 |
HAS_CONFIGURE= yes |
29 |
USE_LDCONFIG= yes |
30 |
|
31 |
CONFIGURE_ARGS = --skip-deps --user couchdb |
32 |
|
33 |
ALL_TARGET= release |
34 |
|
35 |
PLIST=${WRKDIR}/couchdb2-pkg-plist |
36 |
|
37 |
OPTIONS_DEFINE= DOCS WITH_CURL FAUXTON |
38 |
OPTIONS_SUB= yes |
39 |
OPTIONS_DEFAULT=DOCS FAUXTON |
40 |
DOCS_DESC= Build documentation and manpages |
41 |
WITH_CURL_DESC= Request that couchjs is linked to cURL |
42 |
FAUXTON_DESC= Build Fauxton |
43 |
OTPVER20_DESC= Use Erlang OTP20 instead of OTP19 |
44 |
OPTIONS_GROUP= ENV |
45 |
OPTIONS_GROUP_ENV = OTPVER20 |
46 |
|
47 |
WITH_CURL_BUILD_DEPENDS=${LOCALBASE}/lib/libcurl.so:ftp/curl |
48 |
|
49 |
OTPVER20_BUILD_DEPENDS=${LOCALBASE}/lib/erlang20/bin/erlc:lang/erlang-runtime20 |
50 |
OTPVER20_BUILD_DEPENDS_OFF=${LOCALBASE}/lib/erlang19/bin/erlc:lang/erlang-runtime19 |
51 |
|
52 |
.include <bsd.port.options.mk> |
53 |
|
54 |
.if ! ${PORT_OPTIONS:MDOCS} |
55 |
CONFIGURE_ARGS+=--disable-docs |
56 |
.endif |
57 |
|
58 |
.if ! ${PORT_OPTIONS:MFAUXTON} |
59 |
CONFIGURE_ARGS+=--disable-fauxton |
60 |
.endif |
61 |
|
62 |
.if ${PORT_OPTIONS:MWITH_CURL} |
63 |
CONFIGURE_ARGS+=-c |
64 |
.endif |
65 |
|
66 |
.if ${PORT_OPTIONS:MOTPVER20} |
67 |
MAKE_ENV= PATH=${LOCALBASE}/lib/erlang20/bin:${PATH} |
68 |
.else |
69 |
MAKE_ENV= PATH=${LOCALBASE}/lib/erlang19/bin:${PATH} |
70 |
.endif |
71 |
|
72 |
pre-install: |
73 |
# Cleanup source |
74 |
${FIND} ${WRKSRC} -type f -name '*.a' -exec ${RM} {} + |
75 |
${FIND} ${WRKSRC} -type f -name '*.c' -exec ${RM} {} + |
76 |
${FIND} ${WRKSRC} -type f -name '*.o' -exec ${RM} {} + |
77 |
|
78 |
${CP} pkg-plist ${PLIST} |
79 |
@${MKDIR} ${STAGEDIR}${ETCDIR} |
80 |
${MV} ${WRKSRC}/rel/couchdb/etc/local.ini ${STAGEDIR}/${ETCDIR}/local.ini.sample |
81 |
${FIND} ${WRKSRC}/rel/couchdb -type f | ${SED} 's|^${WRKSRC}/rel/couchdb|libexec/couchdb2|' >> ${PLIST} |
82 |
|
83 |
do-install: |
84 |
|
85 |
# Make required staging directories |
86 |
@${MKDIR} \ |
87 |
${STAGEDIR}/var/db/couchdb2 \ |
88 |
${STAGEDIR}/var/log/couchdb2 \ |
89 |
${STAGEDIR}/var/run/couchdb2 |
90 |
|
91 |
.if ${PORT_OPTIONS:MDOCS} |
92 |
${INSTALL_MAN} ${WRKSRC}/share/docs/man/apachecouchdb.1 \ |
93 |
${STAGEDIR}${MANPREFIX}/man/man1 |
94 |
.endif |
95 |
|
96 |
# Copy configs |
97 |
${CP} ${WRKSRC}/rel/couchdb/etc/vm.args ${STAGEDIR}/${ETCDIR}/vm.args.sample |
98 |
|
99 |
# Copy couchdb files. |
100 |
${CP} -R -p ${WRKSRC}/rel/couchdb ${STAGEDIR}${PREFIX}/libexec/couchdb2 |
101 |
|
102 |
.include <bsd.port.mk> |