mbutil - Initial support for installing mb-util to support offline map tilesets

This commit is contained in:
thetechprepper
2025-04-25 08:02:21 -07:00
parent ea0f9db0d2
commit 247ce3082d
6 changed files with 78 additions and 4 deletions
+1 -1
View File
@@ -1,6 +1,7 @@
#!/bin/bash
# Author : Gaston Gonzalez
# Date : 24 April 2025
# Upated : 25 April 2025
# Purpose : Install mbtileserver
set -e
trap 'last_command=$current_command; current_command=$BASH_COMMAND' DEBUG
@@ -11,7 +12,6 @@ trap 'et-log "\"${last_command}\" command failed with exit code $?."' ERR
APP=mbtileserver
VERSION=0.11.0
DOWNLOAD_FILE="${APP}_v${VERSION}_linux_amd64.zip"
BIN_FILE=QtTermTCP
INSTALL_DIR="/opt/${APP}-${VERSION}"
INSTALL_BIN_DIR="${INSTALL_DIR}/bin"
LINK_PATH="/opt/${APP}"
+40
View File
@@ -0,0 +1,40 @@
#!/bin/bash
# Author : Gaston Gonzalez
# Date : 25 April 2025
# Purpose : Install mbutil to allow for creation of offline tilesets
set -e
trap 'last_command=$current_command; current_command=$BASH_COMMAND' DEBUG
trap 'et-log "\"${last_command}\" command failed with exit code $?."' ERR
. ./env.sh
APP=mbutil
VERSION=0.3.0
DOWNLOAD_FILE="${APP}-${VERSION}.tar.gz"
SRC_DIR="${ET_SRC_DIR}/${APP}-${VERSION}"
INSTALL_DIR="/opt/${APP}-${VERSION}"
INSTALL_BIN_DIR="${INSTALL_DIR}/bin"
LINK_PATH="/opt/${APP}"
et-log "Installing ${APP} ${VERSION}..."
if [[ ! -e "${ET_DIST_DIR}/${DOWNLOAD_FILE}" ]]; then
URL="https://github.com/mapbox/mbutil/archive/refs/tags/v${VERSION}.tar.gz"
et-log "Downloading ${APP}: ${URL}"
curl -s -L -o ${DOWNLOAD_FILE} --fail ${URL}
mv ${DOWNLOAD_FILE} ${ET_DIST_DIR}
fi
CWD_DIR=`pwd`
et-log "Unpacking ${APP} ${VERSION} source..."
tar -xzf "${ET_DIST_DIR}/${DOWNLOAD_FILE}"
mv "${APP}-${VERSION}" ${ET_SRC_DIR} && cd ${SRC_DIR}
et-log "Installing ${APP} ${VERSION} globally..."
python setup.py install
cd $CWD_DIR
+18
View File
@@ -0,0 +1,18 @@
#!/bin/bash
#
# Author : Gaston Gonzalez
# Date : 25 April 2025
# Purpose : Installs Python 3
set -e
trap 'last_command=$current_command; current_command=$BASH_COMMAND' DEBUG
trap 'et-log "\"${last_command}\" command failed with exit code $?."' ERR
et-log "Installing Python 2..."
apt install \
python2 \
python-setuptools \
-y
# Set Python 2 as the default
update-alternatives --install /usr/bin/python python /usr/bin/python2 1
+5 -3
View File
@@ -2,8 +2,8 @@
#
# Author : Gaston Gonzalez
# Date : 16 March 2024
# Updated : 24 April 2025
# Purpose : Main installer for EmComm Tools OS Community
# Updated : 25 April 2025
# Purpose : Main installer for EmComm Tools Community (ETC)
. ./env.sh
. ./functions.sh
@@ -61,5 +61,7 @@ exitIfNotRoot
./install-wine.sh
# Install GIS applications
# Install GIS applications and dependencies
./install-mbtileserver.sh
./install-python.sh
./install-mbutil.sh
+7
View File
@@ -0,0 +1,7 @@
#!/bin/bash
# Author : Gaston Gonzalez
# Date : 25 April 2025
# Purpose : Test mb-util installation
OUT=$(which mb-util)
exit $?
+7
View File
@@ -0,0 +1,7 @@
#!/bin/bash
# Author : Gaston Gonzalez
# Date : 25 November 2025
# Purpose : Test Python installation
OUT=$(python --version 2>&1 | grep "2.7")
exit $?