summaryrefslogtreecommitdiffstats
path: root/system/mongo-tools
diff options
context:
space:
mode:
Diffstat (limited to 'system/mongo-tools')
-rw-r--r--system/mongo-tools/README6
-rw-r--r--system/mongo-tools/mongo-tools.SlackBuild37
-rw-r--r--system/mongo-tools/mongo-tools.info14
3 files changed, 27 insertions, 30 deletions
diff --git a/system/mongo-tools/README b/system/mongo-tools/README
index 30fd7c550c..1c25d3f556 100644
--- a/system/mongo-tools/README
+++ b/system/mongo-tools/README
@@ -1,5 +1,7 @@
Mongo-Tools is a set of tools for MongoDB.
Includes: bsondump, mongoimport, mongoexport, mongodump,
- mongorestore, mongostat, mongofiles, mongooplog,
- and mongotop
+ mongorestore, mongostat, mongofiles, and mongotop
+
+NOTE: this script requires Internet connection to download
+fsnotify sub modules
diff --git a/system/mongo-tools/mongo-tools.SlackBuild b/system/mongo-tools/mongo-tools.SlackBuild
index ddb01204fc..73e95600ed 100644
--- a/system/mongo-tools/mongo-tools.SlackBuild
+++ b/system/mongo-tools/mongo-tools.SlackBuild
@@ -1,8 +1,7 @@
#!/bin/bash
-
# Slackware build script for mongo-tools
-
# Copyright 2015 Miguel De Anda <miguel@thedeanda.com>
+# Copyright 2023-2024 Willy Sudiarto Raharjo <willysr@slackbuilds.org>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -25,11 +24,11 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=mongo-tools
-VERSION=${VERSION:-3.4.9}
+VERSION=${VERSION:-100.10.0}
+COMMITVER="6d4f001be3fcf673de04d20176e90ee02ef233a9"
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
-ARCHIVE=r${VERSION}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -39,9 +38,6 @@ if [ -z "$ARCH" ]; then
esac
fi
-# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
-# the name of the created package would be, and then exit. This information
-# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
@@ -65,15 +61,12 @@ else
LIBDIRSUFFIX=""
fi
-set -e
-
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$ARCHIVE.tar.gz || tar xvf $CWD/$PRGNAM-$ARCHIVE.tar.gz
-mv $PRGNAM-r$VERSION $PRGNAM-$VERSION
-cd $PRGNAM-$VERSION
+rm -rf $PRGNAM-$COMMITVER
+unzip $CWD/$PRGNAM-$COMMITVER.zip
+cd $PRGNAM-$COMMITVER
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@@ -81,24 +74,26 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-export GO111MODULE="off"
-
-TARGET_PATH=$PKG/usr/bin
-mkdir -p $TARGET_PATH
-. ./set_gopath.sh
+#export GO111MODULE="off"
+export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
+go mod download github.com/fsnotify/fsnotify
+go run build.go -ldflags="$SLKCFLAGS" build
# next block taken from mongo-tools build script
-for i in bsondump mongostat mongofiles mongoexport mongoimport mongorestore mongodump mongotop mongooplog; do
+for i in bsondump mongostat mongofiles mongoexport mongoimport mongorestore mongodump mongotop; do
echo "Building ${i}..."
# if you have issues, remove/add -tags "ssl sasl"
- go build -o "$TARGET_PATH/$i" "$i/main/$i.go"
+ go build -o "bin/$i" "$i/main/$i.go"
done
+mkdir -p $PKG/usr/bin/
+install bin/* $PKG/usr/bin
+
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a LICENSE.md README.md THIRD-PARTY-NOTICES CONTRIBUTING.md $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a *.md THIRD-PARTY-NOTICES $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
diff --git a/system/mongo-tools/mongo-tools.info b/system/mongo-tools/mongo-tools.info
index 524f69dccc..aff96b8e64 100644
--- a/system/mongo-tools/mongo-tools.info
+++ b/system/mongo-tools/mongo-tools.info
@@ -1,10 +1,10 @@
PRGNAM="mongo-tools"
-VERSION="3.4.9"
+VERSION="100.10.0"
HOMEPAGE="https://github.com/mongodb/mongo-tools"
-DOWNLOAD="https://github.com/mongodb/mongo-tools/archive/r3.4.9.tar.gz"
-MD5SUM="e464ade045c3af18b83b5a558044edd8"
-DOWNLOAD_x86_64=""
-MD5SUM_x86_64=""
+DOWNLOAD="UNSUPPORTED"
+MD5SUM=""
+DOWNLOAD_x86_64="https://github.com/mongodb/mongo-tools/archive/6d4f001be3fcf673de04d20176e90ee02ef233a9/mongo-tools-6d4f001be3fcf673de04d20176e90ee02ef233a9.zip"
+MD5SUM_x86_64="537c4dced15d21bac20077d622c4e7a6"
REQUIRES="google-go-lang"
-MAINTAINER="Miguel De Anda"
-EMAIL="miguel@thedeanda.com"
+MAINTAINER="Willy Sudiarto Raharjo"
+EMAIL="willysr@slackbuilds.org"