diff options
Diffstat (limited to 'databases/couchdb/Makefile')
-rw-r--r-- | databases/couchdb/Makefile | 117 |
1 files changed, 70 insertions, 47 deletions
diff --git a/databases/couchdb/Makefile b/databases/couchdb/Makefile index f21e9c1984b..1077e968f76 100644 --- a/databases/couchdb/Makefile +++ b/databases/couchdb/Makefile @@ -1,9 +1,8 @@ -# $NetBSD: Makefile,v 1.36 2016/10/07 18:25:40 adam Exp $ +# $NetBSD: Makefile,v 1.37 2016/11/16 15:59:28 fhajny Exp $ # -DISTNAME= apache-couchdb-1.6.1 +DISTNAME= apache-couchdb-2.0.0 PKGNAME= ${DISTNAME:S/apache-//} -PKGREVISION= 8 CATEGORIES= databases MASTER_SITES= ${MASTER_SITE_APACHE:=couchdb/source/${PKGVERSION_NOREV}/} @@ -12,20 +11,22 @@ HOMEPAGE= http://couchdb.apache.org/ COMMENT= Document database server, accessible via a RESTful JSON API LICENSE= apache-2.0 -GNU_CONFIGURE= yes +HAS_CONFIGURE= yes USE_LANGUAGES= c c++ -USE_TOOLS+= gmake +USE_TOOLS+= gmake install-info pax pkg-config USE_LIBTOOL= yes INFO_FILES= yes BUILD_DEFS+= VARBASE BUILD_DEPENDS+= help2man-[0-9]*:../../converters/help2man +BUILD_DEPENDS+= rebar>=2.6.0<3:../../devel/rebar .include "../../mk/bsd.prefs.mk" COUCH_DBDIR?= ${VARBASE}/db/couchdb COUCH_EGDIR= ${PREFIX}/share/examples/couchdb COUCH_LOGDIR?= ${VARBASE}/log/couchdb +COUCH_RUNDIR?= ${VARBASE}/run/couchdb COUCH_USER?= couchdb COUCH_GROUP?= ${COUCH_USER} @@ -35,16 +36,11 @@ PKG_GECOS.${COUCH_USER}=CouchDB Server User PKG_HOME.${COUCH_USER}= ${COUCH_DBDIR} PKG_SHELL.${COUCH_USER}=${COMMAND_SHELL} -# Solaris /var/run is root only -.if ${OPSYS} == "SunOS" -COUCH_RUNDIR?= ${VARBASE}/spool/couchdb -.else -COUCH_RUNDIR?= ${VARBASE}/run/couchdb -.endif - FILES_SUBST+= COUCH_USER=${COUCH_USER} FILES_SUBST+= COUCH_GROUP=${COUCH_GROUP} FILES_SUBST+= COUCH_DBDIR=${COUCH_DBDIR} +FILES_SUBST+= COUCH_RUNDIR=${COUCH_RUNDIR} +FILES_SUBST+= ERTS_VERSION=${VERSION.erts} OWN_DIRS= ${COUCH_LOGDIR} ${COUCH_DBDIR} ${COUCH_RUNDIR} ${PKG_SYSCONFDIR} OWN_DIRS_PERMS+= ${COUCH_DBDIR} ${COUCH_USER} ${COUCH_GROUP} 0770 @@ -53,46 +49,73 @@ OWN_DIRS_PERMS+= ${COUCH_RUNDIR} ${COUCH_USER} ${COUCH_GROUP} 0770 PKG_SYSCONFSUBDIR= couchdb PKG_SYSCONFDIR_PERMS= ${COUCH_USER} ${COUCH_GROUP} 0775 -CONF_FILES_PERMS+= ${COUCH_EGDIR}/default.ini ${PKG_SYSCONFDIR}/default.ini ${COUCH_USER} ${COUCH_GROUP} 0660 -CONF_FILES_PERMS+= ${COUCH_EGDIR}/local.ini ${PKG_SYSCONFDIR}/local.ini ${COUCH_USER} ${COUCH_GROUP} 0660 - -CONFIGURE_ARGS+= --disable-init -CONFIGURE_ARGS+= --localstatedir=${VARBASE} -CONFIGURE_ARGS+= --with-erlang=${BUILDLINK_PREFIX.erlang}/lib/erlang/usr/include -CONFIGURE_ARGS+= --with-js-include=${BUILDLINK_PREFIX.spidermonkey} -CONFIGURE_ARGS+= --with-js-lib=${BUILDLINK_PREFIX.spidermonkey} - -.if ${OPSYS} == "SunOS" -REPLACE_INTERPRETER+= sh -REPLACE.sh.old= /bin/sh -REPLACE.sh.new= /bin/ksh -REPLACE_FILES.sh= bin/couchdb.tpl.in -.endif +CONF_FILES_PERMS+= ${COUCH_EGDIR}/default.ini ${PKG_SYSCONFDIR}/default.ini\ + ${COUCH_USER} ${COUCH_GROUP} 0660 +CONF_FILES_PERMS+= ${COUCH_EGDIR}/local.ini ${PKG_SYSCONFDIR}/local.ini \ + ${COUCH_USER} ${COUCH_GROUP} 0660 +CONF_FILES_PERMS+= ${COUCH_EGDIR}/vm.args ${PKG_SYSCONFDIR}/vm.args \ + ${COUCH_USER} ${COUCH_GROUP} 0660 SUBST_CLASSES+= paths SUBST_MESSAGE.paths= Setting standard paths SUBST_STAGE.paths= pre-configure -SUBST_FILES.paths+= configure bin/couchdb.tpl.in -SUBST_VARS.paths= COUCH_EGDIR COUCH_DBDIR COUCH_LOGDIR COUCH_RUNDIR -SUBST_SED.paths= -e 's,@ERLANG_PREFIX@,${BUILDLINK_PREFIX.erlang},g' - -# This works around libtool abuse installing "couchspawnkillable". Will -# hopefully get fixed properly upstream. -SUBST_CLASSES+= unstrip -SUBST_MESSAGE.unstrip= Avoiding trying to strip a shell script -SUBST_STAGE.unstrip= post-configure -SUBST_FILES.unstrip+= src/couchdb/priv/Makefile -SUBST_SED.unstrip= -e '/^INSTALL_PROGRAM =/s, -s,,' - -PLIST_SUBST+= VERSION.ejson=${VERSION.ejson} -PLIST_SUBST+= VERSION.ibrowse=${VERSION.ibrowse} -PLIST_SUBST+= VERSION.mochiweb=${VERSION.mochiweb} -PLIST_SUBST+= VERSION.snappy=${VERSION.snappy} - -.include "Makefile.versions" - +SUBST_FILES.paths= configure +SUBST_FILES.paths+= rel/overlay/bin/couchdb +SUBST_FILES.paths+= rel/overlay/etc/default.ini +SUBST_FILES.paths+= src/config/src/config_app.erl +SUBST_VARS.paths= COUCH_DBDIR COUCH_LOGDIR COUCH_RUNDIR PREFIX PKG_SYSCONFDIR + +CONFIGURE_ARGS+= --rebar\ ${PREFIX}/bin/rebar +CONFIGURE_ARGS+= --user\ ${COUCH_USER} +CONFIGURE_ARGS+= --skip-deps +CONFIGURE_ARGS+= --with-curl + +BUILD_TARGET= release + +INSTALLATION_DIRS+= bin couchdb/lib +INSTALLATION_DIRS+= couchdb/share/server couchdb/share/www/docs +INSTALLATION_DIRS+= ${PKGINFODIR} ${PKGMANDIR}/man1 +INSTALLATION_DIRS+= share/doc/couchdb share/examples/couchdb + +RCD_SCRIPTS+= couchdb + +# This is silly, but the rebar release target embeds the Erlang VM +# into the tree, including existing Erlang module versions that might +# differ from those included in the tarball. We use a dynamic PLIST +# for the parts that may change. +GENERATE_PLIST= cd ${DESTDIR}${PREFIX}; ${FIND} \ + couchdb/erts-* couchdb/lib \ + \( -type f -o -type l \) -print | \ + ${SORT} -u; + +# We need to know the version of erts and subst it inside the SMF manifest +.include "../../lang/erlang/Makefile.versions" + +do-install: + cd ${WRKSRC}/rel/couchdb && \ + ${PAX} -rw -pp erts-${VERSION.erts} lib releases \ + ${DESTDIR}${PREFIX}/couchdb + ${INSTALL_SCRIPT} ${WRKSRC}/rel/couchdb/bin/couchdb \ + ${DESTDIR}${PREFIX}/bin + ${INSTALL_PROGRAM} ${WRKSRC}/rel/couchdb/bin/couchjs \ + ${DESTDIR}${PREFIX}/bin + ${INSTALL_INFO} ${WRKSRC}/rel/couchdb/share/docs/CouchDB.info \ + ${DESTDIR}${PREFIX}/${PKGINFODIR}/CouchDB.info + ${INSTALL_MAN} ${WRKSRC}/rel/couchdb/share/docs/couchdb.1 \ + ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1 + ${INSTALL_DATA} ${WRKSRC}/share/docs/pdf/CouchDB.pdf \ + ${DESTDIR}${PREFIX}/share/doc/couchdb + cd ${WRKSRC}/rel/couchdb/share && ${PAX} -rw -pp server www \ + ${DESTDIR}${PREFIX}/couchdb/share + cd ${WRKSRC}/rel/couchdb/etc && ${PAX} -rw -pp *.ini vm.args \ + ${DESTDIR}${COUCH_EGDIR} + +# The erlang VM gets embedded, but it may still need the curses lib +BUILDLINK_DEPMETHOD.erlang= build +.include "../../mk/termcap.buildlink3.mk" .include "../../lang/erlang/buildlink3.mk" -.include "../../lang/spidermonkey/buildlink3.mk" + +.include "../../lang/spidermonkey185/buildlink3.mk" .include "../../security/openssl/buildlink3.mk" .include "../../textproc/icu/buildlink3.mk" .include "../../www/curl/buildlink3.mk" |