Changeset View
Changeset View
Standalone View
Standalone View
databases/mongodb40-tools/Makefile
Show All 16 Lines | |||||
USES= compiler:c++14-lang go localbase | USES= compiler:c++14-lang go localbase | ||||
USE_GITHUB= yes | USE_GITHUB= yes | ||||
GH_ACCOUNT= mongodb | GH_ACCOUNT= mongodb | ||||
GH_PROJECT= mongo-tools | GH_PROJECT= mongo-tools | ||||
GO_BUILDFLAGS= -tags "${USE_MY_TAGS}" | GO_BUILDFLAGS= -tags "${USE_MY_TAGS}" | ||||
GO_PKGNAME= github.com/${GH_ACCOUNT}/${GH_PROJECT} | GO_PKGNAME= github.com/${GH_ACCOUNT}/${GH_PROJECT} | ||||
GO_TARGET= ${TOOL_BUILD:C,(.*),github.com/${GH_ACCOUNT}/${GH_PROJECT}/\1/\1,} | |||||
CONFLICTS_INSTALL= mongodb3[46] mongodb3[46]-tools | CONFLICTS_INSTALL= mongodb3[46] mongodb3[46]-tools | ||||
OPTIONS_DEFINE= DOCS | OPTIONS_DEFINE= DOCS | ||||
OPTIONS_DEFAULT= MONGODUMP MONGOEXPORT MONGOFILES MONGOIMPORT \ | OPTIONS_DEFAULT= MONGODUMP MONGOEXPORT MONGOFILES MONGOIMPORT \ | ||||
MONGORESTORE SASL SSL | MONGORESTORE SASL SSL | ||||
OPTIONS_MULTI= SECURITY TOOLS | OPTIONS_MULTI= SECURITY TOOLS | ||||
OPTIONS_MULTI_TOOLS= BSONDUMP MONGODUMP MONGOEXPORT MONGOFILES MONGOIMPORT \ | OPTIONS_MULTI_TOOLS= BSONDUMP MONGODUMP MONGOEXPORT MONGOFILES MONGOIMPORT \ | ||||
MONGOREPLAY MONGORESTORE MONGOSTAT MONGOTOP | MONGOREPLAY MONGORESTORE MONGOSTAT MONGOTOP | ||||
OPTIONS_MULTI_SECURITY= SASL SSL | OPTIONS_MULTI_SECURITY= SASL SSL | ||||
OPTIONS_SUB= yes | OPTIONS_SUB= yes | ||||
BSONDUMP_DESC= BSON files into human-readable formats | BSONDUMP_DESC= BSON files into human-readable formats | ||||
MONGOSTAT_DESC= Status of a running mongod or mongos instance | MONGOSTAT_DESC= Status of a running mongod or mongos instance | ||||
MONGOFILES_DESC= Interface to GridFS in a MongoDB instance | MONGOFILES_DESC= Interface to GridFS in a MongoDB instance | ||||
MONGOEXPORT_DESC= JSON or CSV export of MongoDB instance data | MONGOEXPORT_DESC= JSON or CSV export of MongoDB instance data | ||||
MONGOIMPORT_DESC= Importing JSON, CSV, or TSV into a MongoDB instance | MONGOIMPORT_DESC= Importing JSON, CSV, or TSV into a MongoDB instance | ||||
MONGORESTORE_DESC= BSON data to a MongoDB instance | MONGORESTORE_DESC= BSON data to a MongoDB instance | ||||
MONGODUMP_DESC= BSON data from the contents of a MongoDB instance | MONGODUMP_DESC= BSON data from the contents of a MongoDB instance | ||||
MONGOTOP_DESC= Track the amount of data I/O time | MONGOTOP_DESC= Track the amount of data I/O time | ||||
MONGOREPLAY_DESC= Traffic capture and replay tool | MONGOREPLAY_DESC= Traffic capture and replay tool | ||||
BSONDUMP_VARS= tool_build+=bsondump | BSONDUMP_VARS= go_target+=./bsondump/main:bsondump | ||||
MONGOSTAT_VARS= tool_build+=mongostat | MONGOSTAT_VARS= go_target+=./mongostat/main:mongostat | ||||
MONGOFILES_VARS= tool_build+=mongofiles | MONGOFILES_VARS= go_target+=./mongofiles/main:mongofiles | ||||
MONGOEXPORT_VARS= tool_build+=mongoexport | MONGOEXPORT_VARS= go_target+=./mongoexport/main:mongoexport | ||||
MONGOIMPORT_VARS= tool_build+=mongoimport | MONGOIMPORT_VARS= go_target+=./mongoimport/main:mongoimport | ||||
MONGORESTORE_VARS= tool_build+=mongorestore | MONGORESTORE_VARS= go_target+=./mongorestore/main:mongorestore | ||||
MONGODUMP_VARS= tool_build+=mongodump | MONGODUMP_VARS= go_target+=./mongodump/main:mongodump | ||||
MONGOTOP_VARS= tool_build+=mongotop | MONGOTOP_VARS= go_target+=./mongotop/main:mongotop | ||||
MONGOREPLAY_VARS= tool_build+=mongoreplay | MONGOREPLAY_VARS= go_target+=./mongoreplay/main:mongoreplay | ||||
SASL_LIB_DEPENDS= libsasl2.so:security/cyrus-sasl2 | SASL_LIB_DEPENDS= libsasl2.so:security/cyrus-sasl2 | ||||
SASL_USE= my_tags=sasl | SASL_USE= my_tags=sasl | ||||
SSL_USES= ssl | SSL_USES= ssl | ||||
SSL_USE= my_tags=ssl | SSL_USE= my_tags=ssl | ||||
.include <bsd.port.options.mk> | |||||
# Rename 'main' directories to the tool names so that the binaries | |||||
# are not all named 'main' and we do not have to hack around USES=go. | |||||
post-patch: | |||||
.for tool in ${TOOL_BUILD} | |||||
@${MV} ${WRKSRC}/${tool}/main ${WRKSRC}/${tool}/${tool} | |||||
.endfor | |||||
post-install-DOCS-on: | post-install-DOCS-on: | ||||
@${MKDIR} ${STAGEDIR}${DOCSDIR} | @${MKDIR} ${STAGEDIR}${DOCSDIR} | ||||
.for doc in README.md CONTRIBUTING.md THIRD-PARTY-NOTICES | .for doc in README.md CONTRIBUTING.md THIRD-PARTY-NOTICES | ||||
${INSTALL_MAN} ${WRKSRC}/${doc} ${STAGEDIR}${DOCSDIR} | ${INSTALL_MAN} ${WRKSRC}/${doc} ${STAGEDIR}${DOCSDIR} | ||||
.endfor | .endfor | ||||
.include <bsd.port.mk> | .include <bsd.port.mk> |