From 7b4ea3bfa6708181483c434836ad9ec26ed33600 Mon Sep 17 00:00:00 2001 From: tsteven4 <13596209+tsteven4@users.noreply.github.com> Date: Mon, 23 Dec 2024 09:36:53 -0700 Subject: [PATCH] add release releated files (#1394) repacks_archive.sh: repacks github downloaded tarball for our ancient naming scheme. Dockerfile_gpsbabel_1.10.0: builds an archive docker image of release 1.10.0 --- .../archive_images/Dockerfile_gpsbabel_1.10.0 | 78 +++++++++++++++++++ tools/repack_archive.sh | 18 +++++ 2 files changed, 96 insertions(+) create mode 100644 tools/archive_images/Dockerfile_gpsbabel_1.10.0 create mode 100755 tools/repack_archive.sh diff --git a/tools/archive_images/Dockerfile_gpsbabel_1.10.0 b/tools/archive_images/Dockerfile_gpsbabel_1.10.0 new file mode 100644 index 000000000..61e10c373 --- /dev/null +++ b/tools/archive_images/Dockerfile_gpsbabel_1.10.0 @@ -0,0 +1,78 @@ +# this file is used to build the image gpsbabel_build_environment used by travis. + +FROM ubuntu:noble + +LABEL maintainer="https://github.com/tsteven4" + +WORKDIR /app + +# update environment. +ARG DEBIAN_FRONTEND=noninteractive +RUN apt-get update && apt-get install -y --no-install-recommends \ + apt-utils \ + && apt-get upgrade -y \ + && rm -rf /var/lib/apt/lists/* + +# install packages needed for gpsbabel build +# split into multiple commands to limit layer size + +# basic build and test tools +RUN apt-get update && apt-get install -y --no-install-recommends \ + g++ \ + git \ + expat \ + libxml2-utils \ + cmake \ + ninja-build \ + curl \ + ca-certificates \ + && rm -rf /var/lib/apt/lists/* + +# pkgs with libraries needed by gpsbabel +RUN apt-get update && apt-get install -y --no-install-recommends \ + libusb-1.0-0-dev \ + pkg-config \ + libudev-dev \ + libshp-dev \ + zlib1g-dev \ + && rm -rf /var/lib/apt/lists/* + +# pkgs with qt used by gpsbabel +RUN apt-get update && apt-get install -y --no-install-recommends \ + qt6-base-dev \ + qt6-5compat-dev \ + qt6-serialport-dev \ + libx11-xcb-dev \ + libxkbcommon-dev \ + qt6-tools-dev \ + qt6-translations-l10n \ + qt6-webengine-dev \ + qt6-wayland \ + && rm -rf /var/lib/apt/lists/* + +# install environment for locale test +RUN apt-get update && apt-get install -y --no-install-recommends \ + locales \ + tzdata \ + && rm -rf /var/lib/apt/lists/* \ + && sed -i 's/^# *\(en_US ISO-8859-1\)/\1/' /etc/locale.gen \ + && locale-gen \ + && locale -a + +WORKDIR /home/gpsbabel + +RUN git clone https://github.com/GPSBabel/gpsbabel.git gpsbabel-build\ + && cd gpsbabel-build \ + && git checkout gpsbabel_1_10_0 \ + && rm -fr zlib \ + && rm -fr shapelib \ + && sed -i -e"/GB.SHA/i set(ENV{GITHUB_SHA} \"$(git log -1 --format=%h)\")" gbversion.cmake \ + && mkdir bld \ + && cd bld \ + && cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=/usr/lib/x86_64-linux-gnu/cmake/Qt6 -DGPSBABEL_WITH_ZLIB=pkgconfig -DGPSBABEL_WITH_SHAPELIB=pkgconfig .. \ + && cmake --build . --target package_app \ + && cmake --build . --target check \ + && ln -s $(pwd)/gui/GPSBabelFE/gpsbabel /usr/local/bin \ + && ln -s $(pwd)/gui/GPSBabelFE/gpsbabelfe /usr/local/bin + +COPY setup_user.sh /usr/local/bin diff --git a/tools/repack_archive.sh b/tools/repack_archive.sh new file mode 100755 index 000000000..32bb56c3b --- /dev/null +++ b/tools/repack_archive.sh @@ -0,0 +1,18 @@ +#!/bin/bash -ex +sha=$1 +release=$2 + +outputdir=$(mktemp -d) +tmpdir=$(mktemp -d) + +pushd "${outputdir}" +wget "https://github.com/gpsbabel/gpsbabel/archive/${sha}.tar.gz" + +archivemount "${sha}.tar.gz" "${tmpdir}" +tar --transform="s,^gpsbabel-${sha},gpsbabel-${release}," -C "${tmpdir}" -czvf "gpsbabel-${release}.tar.gz" "gpsbabel-${sha}" +umount "${tmpdir}" +rmdir "${tmpdir}" + +popd +mv "${outputdir}/gpsbabel-${release}.tar.gz" "gpsbabel-${release}.tar.gz" +rm -fr "${outputdir}"