-
Notifications
You must be signed in to change notification settings - Fork 128
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
Showing
2 changed files
with
96 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}" |