Skip to content

Commit

Permalink
add release releated files (#1394)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
tsteven4 authored Dec 23, 2024
1 parent a460fb5 commit 7b4ea3b
Show file tree
Hide file tree
Showing 2 changed files with 96 additions and 0 deletions.
78 changes: 78 additions & 0 deletions tools/archive_images/Dockerfile_gpsbabel_1.10.0
Original file line number Diff line number Diff line change
@@ -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
18 changes: 18 additions & 0 deletions tools/repack_archive.sh
Original file line number Diff line number Diff line change
@@ -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}"

0 comments on commit 7b4ea3b

Please sign in to comment.