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