diff --git a/mongo-tools.spec b/mongo-tools.spec index 136bd54..825f3da 100644 --- a/mongo-tools.spec +++ b/mongo-tools.spec @@ -1,5 +1,5 @@ Name: mongo-tools -Version: 4.0.0 +Version: 4.2.0 Release: 1mamba Summary: MongoDB Tools Group: Applications/Databases @@ -13,8 +13,12 @@ License: Apache License 2.0 BuildRequires: glibc-devel BuildRequires: libgcc BuildRequires: libgo-devel +BuildRequires: libopenssl-devel +BuildRequires: libpcap-devel +BuildRequires: libsasl2-devel ## AUTOBUILDREQ-END -BuildRequires: libgo-devel >= 8.1.0 +BuildRequires: libgo-devel >= 9.2.0 +BuildRequires: go-pie BuildRoot: %{_tmppath}/%{name}-%{version}-root %description @@ -29,24 +33,23 @@ The MongoDB Tools: - mongotop - Monitor read/write activity on a mongo server %prep -%setup -q -n %{name}-r%{version} +%setup -q -c -a0 +install -d build/src/github.com/mongodb/bin +mv mongo-tools-r%{version} build/src/github.com/mongodb/mongo-tools %build -mkdir -p src/github.com/mongodb -ln -s ../../../ src/github.com/mongodb/mongo-tools -export GOPATH=$(pwd):$(pwd)/vendor - -mkdir bin +cd build/src/github.com/mongodb/mongo-tools +export GOPATH=%{_builddir}/%{name}-%{version}/build for tool in `ls -d mongo*` bsondump; do - go build -o bin/$tool $tool/main/${tool}.go - # go build -o bin/$tool -tags ssl $tool/main/${tool}.go + echo "Building ${tool}..." + GOROOT=%{_libdir}/go go build -o bin/${tool} -tags "ssl sasl" ${tool}/main/${tool}.go done %install [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" install -d -p %{buildroot}%{_bindir} -install -p -m 0755 bin/* %{buildroot}%{_bindir} +install -p -m 0755 build/src/github.com/mongodb/mongo-tools/bin/* %{buildroot}%{_bindir} %clean [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" @@ -55,9 +58,12 @@ install -p -m 0755 bin/* %{buildroot}%{_bindir} %defattr(-,root,root) %{_bindir}/bsondump %{_bindir}/mongo* -%doc LICENSE.md +%doc build/src/github.com/mongodb/mongo-tools/LICENSE.md %changelog +* Thu Aug 29 2019 Silvan Calarco 4.2.0-1mamba +- update to 4.2.0 + * Mon Jun 25 2018 Silvan Calarco 4.0.0-1mamba - update to 4.0.0