aboutsummaryrefslogtreecommitdiff
path: root/databases/mongodb42-tools
diff options
context:
space:
mode:
authorMatthias Fechner <mfechner@FreeBSD.org>2020-06-10 13:25:33 +0000
committerMatthias Fechner <mfechner@FreeBSD.org>2020-06-10 13:25:33 +0000
commite878d182e749b6fa2a1596cad52e51d8efcf8f16 (patch)
treebac5782a46468aa1cf88842328d6d3e48886220b /databases/mongodb42-tools
parent711f3d4e1078d4224c817bd71691750c3b1ac1ff (diff)
downloadports-e878d182e749b6fa2a1596cad52e51d8efcf8f16.tar.gz
ports-e878d182e749b6fa2a1596cad52e51d8efcf8f16.zip
New Port: databases/mongodb42-tools
Update mongo tools to version 4.2 which is required to manage mongodb version 4.2. PR: 247021 Submitted by: Ronald Klop <ronald-lists@klop.ws> Reviewed by: mfechner Relnotes: https://docs.mongodb.com/manual/release-notes/4.2/
Notes
Notes: svn path=/head/; revision=538395
Diffstat (limited to 'databases/mongodb42-tools')
-rw-r--r--databases/mongodb42-tools/Makefile66
-rw-r--r--databases/mongodb42-tools/distinfo3
-rw-r--r--databases/mongodb42-tools/files/patch-vendor_github.com_10gen_openssl_build.go9
-rw-r--r--databases/mongodb42-tools/files/patch-vendor_github.com_10gen_openssl_init__posix.go11
-rw-r--r--databases/mongodb42-tools/pkg-descr15
-rw-r--r--databases/mongodb42-tools/pkg-plist12
6 files changed, 116 insertions, 0 deletions
diff --git a/databases/mongodb42-tools/Makefile b/databases/mongodb42-tools/Makefile
new file mode 100644
index 000000000000..5cd1efd358ad
--- /dev/null
+++ b/databases/mongodb42-tools/Makefile
@@ -0,0 +1,66 @@
+# $FreeBSD$
+
+PORTNAME= mongodb42-tools
+DISTVERSIONPREFIX= r
+DISTVERSION= 4.2.7
+CATEGORIES= databases
+
+MAINTAINER= ronald-lists@klop.ws
+COMMENT= Tools for MongoDB 4.2.x
+
+LICENSE= APACHE20
+LICENSE_FILE= ${WRKSRC}/LICENSE.md
+
+ONLY_FOR_ARCHS= aarch64 amd64 armv7 i386
+ONLY_FOR_ARCHS_REASON= not yet ported to other architectures
+
+USES= compiler:c++14-lang go localbase
+USE_GITHUB= yes
+GH_ACCOUNT= mongodb
+GH_PROJECT= mongo-tools
+
+GO_BUILDFLAGS= -tags "${USE_MY_TAGS}"
+GO_PKGNAME= github.com/${GH_ACCOUNT}/${GH_PROJECT}
+
+CONFLICTS_INSTALL= mongodb36 mongodb40 mongodb36-tools mongodb40-tools
+
+OPTIONS_DEFINE= DOCS
+OPTIONS_DEFAULT= MONGODUMP MONGOEXPORT MONGOFILES MONGOIMPORT \
+ MONGORESTORE SASL SSL
+OPTIONS_MULTI= SECURITY TOOLS
+OPTIONS_MULTI_TOOLS= BSONDUMP MONGODUMP MONGOEXPORT MONGOFILES MONGOIMPORT \
+ MONGOREPLAY MONGORESTORE MONGOSTAT MONGOTOP
+OPTIONS_MULTI_SECURITY= SASL SSL
+OPTIONS_SUB= yes
+
+BSONDUMP_DESC= BSON files into human-readable formats
+MONGOSTAT_DESC= Status of a running mongod or mongos instance
+MONGOFILES_DESC= Interface to GridFS in a MongoDB instance
+MONGOEXPORT_DESC= JSON or CSV export of MongoDB instance data
+MONGOIMPORT_DESC= Importing JSON, CSV, or TSV into a MongoDB instance
+MONGORESTORE_DESC= BSON data to a MongoDB instance
+MONGODUMP_DESC= BSON data from the contents of a MongoDB instance
+MONGOTOP_DESC= Track the amount of data I/O time
+MONGOREPLAY_DESC= Traffic capture and replay tool
+
+BSONDUMP_VARS= go_target+=./bsondump/main:bsondump
+MONGOSTAT_VARS= go_target+=./mongostat/main:mongostat
+MONGOFILES_VARS= go_target+=./mongofiles/main:mongofiles
+MONGOEXPORT_VARS= go_target+=./mongoexport/main:mongoexport
+MONGOIMPORT_VARS= go_target+=./mongoimport/main:mongoimport
+MONGORESTORE_VARS= go_target+=./mongorestore/main:mongorestore
+MONGODUMP_VARS= go_target+=./mongodump/main:mongodump
+MONGOTOP_VARS= go_target+=./mongotop/main:mongotop
+MONGOREPLAY_VARS= go_target+=./mongoreplay/main:mongoreplay
+SASL_LIB_DEPENDS= libsasl2.so:security/cyrus-sasl2
+SASL_USE= my_tags=sasl
+SSL_USES= ssl
+SSL_USE= my_tags=ssl
+
+post-install-DOCS-on:
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
+.for doc in README.md CONTRIBUTING.md THIRD-PARTY-NOTICES
+ ${INSTALL_MAN} ${WRKSRC}/${doc} ${STAGEDIR}${DOCSDIR}
+.endfor
+
+.include <bsd.port.mk>
diff --git a/databases/mongodb42-tools/distinfo b/databases/mongodb42-tools/distinfo
new file mode 100644
index 000000000000..9888023002eb
--- /dev/null
+++ b/databases/mongodb42-tools/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1591392274
+SHA256 (mongodb-mongo-tools-r4.2.7_GH0.tar.gz) = 7ca2f9452ad757e775d344887650a0839b01fe555b0a88c05d8b8ef9cfb32c8b
+SIZE (mongodb-mongo-tools-r4.2.7_GH0.tar.gz) = 15017337
diff --git a/databases/mongodb42-tools/files/patch-vendor_github.com_10gen_openssl_build.go b/databases/mongodb42-tools/files/patch-vendor_github.com_10gen_openssl_build.go
new file mode 100644
index 000000000000..e0190c61259f
--- /dev/null
+++ b/databases/mongodb42-tools/files/patch-vendor_github.com_10gen_openssl_build.go
@@ -0,0 +1,9 @@
+--- vendor/github.com/10gen/openssl/build.go.orig 2018-11-21 19:00:22 UTC
++++ vendor/github.com/10gen/openssl/build.go
+@@ -20,5 +20,6 @@
+ // #cgo CFLAGS: -Wno-deprecated-declarations
+ // #cgo windows CFLAGS: -DWIN32_LEAN_AND_MEAN -I"c:/openssl/include"
+ // #cgo windows LDFLAGS: -lssleay32 -llibeay32 -lcrypt32 -L "c:/openssl/bin"
++// #cgo freebsd LDFLAGS: -lssl -lcrypto
+ // #cgo darwin LDFLAGS: -framework CoreFoundation -framework Foundation -framework Security
+ import "C"
diff --git a/databases/mongodb42-tools/files/patch-vendor_github.com_10gen_openssl_init__posix.go b/databases/mongodb42-tools/files/patch-vendor_github.com_10gen_openssl_init__posix.go
new file mode 100644
index 000000000000..07c593cf0018
--- /dev/null
+++ b/databases/mongodb42-tools/files/patch-vendor_github.com_10gen_openssl_init__posix.go
@@ -0,0 +1,11 @@
+--- vendor/github.com/10gen/openssl/init_posix.go.orig 2018-11-21 17:52:58 UTC
++++ vendor/github.com/10gen/openssl/init_posix.go
+@@ -12,7 +12,7 @@
+ // See the License for the specific language governing permissions and
+ // limitations under the License.
+
+-// +build linux darwin cgo
++// +build linux darwin freebsd cgo
+ // +build !windows
+
+ package openssl
diff --git a/databases/mongodb42-tools/pkg-descr b/databases/mongodb42-tools/pkg-descr
new file mode 100644
index 000000000000..f38ee90d6be4
--- /dev/null
+++ b/databases/mongodb42-tools/pkg-descr
@@ -0,0 +1,15 @@
+Useful utilities for managing a MongoDB instance written in Go.
+
+- bsondump - display BSON files in a human-readable format
+- mongoimport - Convert data from JSON, TSV or CSV and insert them
+ into a collection
+- mongoexport - Write an existing collection to CSV or JSON format
+- mongodump/mongorestore - Dump MongoDB backups to disk in .BSON
+ format, or restore them to a live database
+- mongostat - Monitor live MongoDB servers, replica sets, or sharded
+ clusters
+- mongofiles - Read, write, delete, or update files in GridFS
+- mongotop - Monitor read/write activity on a mongo server
+- mongoreplay - Capture, observe, and replay traffic for MongoDB
+
+WWW: https://github.com/mongodb/mongo-tools
diff --git a/databases/mongodb42-tools/pkg-plist b/databases/mongodb42-tools/pkg-plist
new file mode 100644
index 000000000000..3d21f0470ad4
--- /dev/null
+++ b/databases/mongodb42-tools/pkg-plist
@@ -0,0 +1,12 @@
+%%BSONDUMP%%bin/bsondump
+%%MONGODUMP%%bin/mongodump
+%%MONGOEXPORT%%bin/mongoexport
+%%MONGOFILES%%bin/mongofiles
+%%MONGOIMPORT%%bin/mongoimport
+%%MONGORESTORE%%bin/mongorestore
+%%MONGOREPLAY%%bin/mongoreplay
+%%MONGOSTAT%%bin/mongostat
+%%MONGOTOP%%bin/mongotop
+%%PORTDOCS%%%%DOCSDIR%%/README.md
+%%PORTDOCS%%%%DOCSDIR%%/CONTRIBUTING.md
+%%PORTDOCS%%%%DOCSDIR%%/THIRD-PARTY-NOTICES