Changeset View
Changeset View
Standalone View
Standalone View
databases/couchdb/Makefile
# Created by: Ditesh Shashikant Gathani <ditesh@gathani.org> | # Created by: Ditesh Shashikant Gathani <ditesh@gathani.org> | ||||
# $FreeBSD$ | # $FreeBSD$ | ||||
PORTNAME= couchdb | PORTNAME= couchdb | ||||
PORTVERSION= 1.6.1 | DISTVERSION= 1.7.0 | ||||
PORTREVISION= 12 | |||||
PORTEPOCH= 2 | PORTEPOCH= 2 | ||||
CATEGORIES= databases | CATEGORIES= databases | ||||
MASTER_SITES= APACHE/couchdb/source/${PORTVERSION} | MASTER_SITES= APACHE/couchdb/source/${DISTVERSION} | ||||
DISTNAME= apache-couchdb-${PORTVERSION} | DISTNAME= apache-couchdb-${DISTVERSION} | ||||
MAINTAINER= olgeni@FreeBSD.org | MAINTAINER= olgeni@FreeBSD.org | ||||
COMMENT= Document database server, accessible via a RESTful JSON API | COMMENT= Document database server, accessible via a RESTful JSON API | ||||
LICENSE= APACHE20 | LICENSE= APACHE20 BSD3CLAUSE ISCL WTFPL OFL11 | ||||
LICENSE_COMB= multi | |||||
LIB_DEPENDS= libicudata.so:devel/icu \ | LIB_DEPENDS= libicudata.so:devel/icu \ | ||||
libmozjs185.so:lang/spidermonkey185 \ | libmozjs185.so:lang/spidermonkey185 \ | ||||
libcurl.so:ftp/curl | libcurl.so:ftp/curl | ||||
BUILD_DEPENDS= ${LOCALBASE}/bin/help2man:misc/help2man \ | BUILD_DEPENDS= ${LOCALBASE}/bin/help2man:misc/help2man \ | ||||
erlang>=15.b.01,2:lang/erlang | erlang>=15.b.01,2:lang/erlang | ||||
RUN_DEPENDS= erlang>=15.b.01,2:lang/erlang | RUN_DEPENDS= erlang>=15.b.01,2:lang/erlang | ||||
USERS= couchdb | USES= cpe gmake libtool | ||||
GROUPS= couchdb | |||||
USE_RC_SUBR= couchdb | USE_RC_SUBR= couchdb | ||||
SUB_FILES= pkg-message | SUB_FILES= pkg-message | ||||
PLIST_SUB= VERSION=${PORTVERSION} | PLIST_SUB= VERSION=${DISTVERSION} | ||||
USES= cpe gmake libtool | |||||
CPE_VENDOR= apache | CPE_VENDOR= apache | ||||
GNU_CONFIGURE= yes | GNU_CONFIGURE= yes | ||||
USE_LDCONFIG= yes | USE_LDCONFIG= yes | ||||
CONFIGURE_ARGS= --with-erlang=${LOCALBASE}/lib/erlang/usr/include \ | CONFIGURE_ARGS= --with-erlang=${LOCALBASE}/lib/erlang/usr/include \ | ||||
--localstatedir=/var \ | --localstatedir=/var \ | ||||
--disable-init \ | --disable-init \ | ||||
--with-js-include=${LOCALBASE}/include/js \ | --with-js-include=${LOCALBASE}/include/js \ | ||||
--with-js-lib=${LOCALBASE}/lib | --with-js-lib=${LOCALBASE}/lib | ||||
USERS= couchdb | |||||
GROUPS= couchdb | |||||
# Override default value of ${STRIP} because the underlying Makefile | # Override default value of ${STRIP} because the underlying Makefile | ||||
# erroneously tries to install a shell script with ${STRIP}, causing | # erroneously tries to install a shell script with ${STRIP}, causing | ||||
# an install error. | # an install error. | ||||
STRIP= #empty | STRIP= #empty | ||||
INFO= CouchDB | INFO= CouchDB | ||||
.include <bsd.port.options.mk> | .include <bsd.port.options.mk> | ||||
# This stanza could be removed around version 1.7 | |||||
pre-everything:: | |||||
@if [ -f ${PREFIX}/etc/couchdb/local.ini -a \ | |||||
! -f ${PREFIX}/etc/couchdb/local.ini.sample ] && \ | |||||
${PKG_INFO} -qX '${PKGBASE}-[01].[^2-6][0-9]*(\.[0-9a-z]*)*(,1)?'; \ | |||||
then ${ECHO_MSG} Please see UPDATING note 20120702 to avoid loss of your local.ini ; \ | |||||
exit 2 ; \ | |||||
fi | |||||
pre-fetch: | |||||
@${ECHO_MSG} "" | |||||
@${ECHO_MSG} "If you are upgrading CouchDB, please double-check that the datafile is" | |||||
@${ECHO_MSG} "compatible and that you have BACKED UP YOUR DB directory before proceeding!" | |||||
@${ECHO_MSG} "" | |||||
@${ECHO_MSG} "Upgrading also might require you to rebuild your views entirely." | |||||
@${ECHO_MSG} "" | |||||
post-patch: | post-patch: | ||||
# DB files are stored by default in /var/db/couchdb | # DB files are stored by default in /var/db/couchdb | ||||
# Ports framework expects info pages to have an info extension | # Ports framework expects info pages to have an info extension | ||||
@${REINPLACE_CMD} '/localstatelibdir=/s|/lib/|/db/|' \ | @${REINPLACE_CMD} '/localstatelibdir=/s|/lib/|/db/|' \ | ||||
${WRKSRC}/configure | ${WRKSRC}/configure | ||||
@${REINPLACE_CMD} 's|\(info_file_inst = CouchDB\)$$|\1.info|' \ | @${REINPLACE_CMD} 's|\(info_file_inst = CouchDB\)$$|\1.info|' \ | ||||
${WRKSRC}/share/doc/build/Makefile.in | ${WRKSRC}/share/doc/build/Makefile.in | ||||
post-patch-DOCS-off: | post-patch-DOCS-off: | ||||
@${REINPLACE_CMD} -e 's/install-data-am$$//' ${WRKSRC}/Makefile.in | @${REINPLACE_CMD} -e 's/install-data-am$$//' ${WRKSRC}/Makefile.in | ||||
post-configure: | post-configure: | ||||
# Cater for parallel Spidermonkey v1.7 and v1.8.5 installs by ensuring that | # Cater for parallel Spidermonkey v1.7 and v1.8.5 installs by ensuring that | ||||
# jsapi.h gets pulled from /usr/local/include/js/ instead of /usr/local/include | # jsapi.h gets pulled from /usr/local/include/js/ instead of /usr/local/include | ||||
@${FIND} ${WRKSRC} -name Makefile|${XARGS} ${REINPLACE_CMD} -e 's|include -I/usr/local/include/js|include/js -I/usr/local/include|' | @${FIND} ${WRKSRC} -name Makefile|${XARGS} ${REINPLACE_CMD} \ | ||||
-e 's|include -I/usr/local/include/js|include/js -I/usr/local/include|' | |||||
post-install: | post-install: | ||||
@${CP} -p ${WRKSRC}/etc/couchdb/local.ini ${STAGEDIR}${PREFIX}/etc/couchdb/local.ini.sample | @${MV} ${STAGEDIR}${PREFIX}/lib/couchdb/bin/couchjs ${STAGEDIR}${PREFIX}/bin/couchjs | ||||
@${RMDIR} ${STAGEDIR}${PREFIX}/lib/couchdb/bin | |||||
@${MV} ${WRKSRC}/etc/couchdb/local.ini ${STAGEDIR}${PREFIX}/etc/couchdb/local.ini.sample | |||||
.include <bsd.port.mk> | .include <bsd.port.mk> |