# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 PortSystem 1.0 # This port deliberately does not use github.tarball_from archive because that # does not provide us with the commit hash which we want to know. # This block must be declared before the one declared by the github portgroup # (which is included by the golang portgroup). post-extract { global git_commit set dir [glob ${workpath}/*] regexp "/${github.author}-${github.project}-(\[0-9a-f\]+)$" ${dir} -> git_commit set fp [open ${workpath}/git_commit w] puts -nonewline ${fp} ${git_commit} close ${fp} } PortGroup golang 1.0 go.setup github.com/mongodb/mongo-tools 100.9.4 revision 0 checksums rmd160 471d5e711cf33ae75af1f8e217f7137ea28e65b6 \ sha256 3fdd2cc70fabd377edef5719681906c93df891bd6df62936926e637778864cec \ size 4743284 categories devel maintainers {ryandesign @ryandesign} openmaintainer license Apache-2 # On older OS versions, the go port uses an older version of go with which this # port is not compatible. platforms {darwin >= 17} description utilities for working with mongodb databases: bsondump, \ mongoimport, mongoexport, mongodump, mongorestore, \ mongostat, mongofiles, mongooplog, mongotop long_description mongo-tools is a collection of utilities for working with \ mongodb databases: \ \ \n\n* bsondump: display BSON files in a human-readable format \ \n* mongoimport: Convert data from JSON, TSV or CSV and insert them into a collection \ \n* mongoexport: Write an existing collection to CSV or JSON format \ \n* mongodump: Dump MongoDB backups to disk in .BSON format \ \n* mongorestore: Restore MongoDB backups in .BSON format to a live database \ \n* mongostat: Monitor live MongoDB servers, replica sets, or sharded clusters \ \n* mongofiles: Read, write, delete, or update files in GridFS \ \n* mongotop: Monitor read/write activity on a mongo server \ \n* mongoreplay: Inspect and record commands sent to a MongoDB instance, and then replay the commands back onto another host at a later time extract.rename no dist_subdir ${name} patchfiles deployment_target.patch \ version.patch post-patch { global git_commit if {![exists git_commit]} { set fp [open ${workpath}/git_commit r] set git_commit [read ${fp}] close ${fp} } reinplace -W ${worksrcpath} "s|@GIT_COMMIT@|${git_commit}|g" \ buildscript/build.go \ release/version/version.go reinplace -W ${worksrcpath} "s|@VERSION@|${version}|g" \ release/version/version.go } build.cmd ./make build.target build destroot { copy {*}[glob ${worksrcpath}/bin/*] ${destroot}${prefix}/bin/ set docdir ${prefix}/share/doc/${subport} xinstall -d ${destroot}${docdir} xinstall -m 0644 -W ${worksrcpath} \ CONTRIBUTING.md \ LICENSE.md \ README.md \ ${destroot}${docdir} }