From ff932b7b9ae583af9790e022514ac2b2de20081a Mon Sep 17 00:00:00 2001 From: probonopd Date: Thu, 9 May 2024 08:17:06 +0000 Subject: [PATCH 01/15] Add install-static-desktop-file-validate.sh --- ci/build-in-docker.sh | 1 + ci/install-static-desktop-file-validate.sh | 49 ++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 ci/install-static-desktop-file-validate.sh diff --git a/ci/build-in-docker.sh b/ci/build-in-docker.sh index 42e4283..60e5a42 100755 --- a/ci/build-in-docker.sh +++ b/ci/build-in-docker.sh @@ -77,6 +77,7 @@ echo "Requires.private: libcares libnghttp2 libidn2 libssl openssl libcrypto lib # in a Docker container, we can safely disable this check git config --global --add safe.directory '*' +bash -euxo pipefail /source/ci/install-static-desktop-file-validate.sh bash -euxo pipefail /source/ci/install-static-mksquashfs.sh 4.6.1 bash -euxo pipefail /source/ci/build.sh diff --git a/ci/install-static-desktop-file-validate.sh b/ci/install-static-desktop-file-validate.sh new file mode 100644 index 0000000..c6f9e9b --- /dev/null +++ b/ci/install-static-desktop-file-validate.sh @@ -0,0 +1,49 @@ +#! /bin/bash + +set -euxo pipefail + +if [[ "${1:-}" == "" ]]; then + echo "Usage: $0 " + exit 2 +fi + +version="$1" + +build_dir="$(mktemp -d -t desktop-file-utils-build-XXXXXX)" + +cleanup () { + if [ -d "$build_dir" ]; then + rm -rf "$build_dir" + fi +} +trap cleanup EXIT + +pushd "$build_dir" + +apk add glib-static glib-dev +wget -c https://gitlab.freedesktop.org/xdg/desktop-file-utils/-/archive/56d220dd679c7c3a8f995a41a27a7d6f3df49dea/desktop-file-utils-56d220dd679c7c3a8f995a41a27a7d6f3df49dea.tar.gz +tar xf desktop-file-utils-*.tar.gz +cd desktop-file-utils-*/ +# The next 2 lines are a workaround for: checking build system type... ./config.guess: unable to guess system type +wget 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD' -O config.guess +wget 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD' -O config.sub +autoreconf --install # https://github.com/shendurelab/LACHESIS/issues/31#issuecomment-283963819 +./configure CFLAGS=-no-pie LDFLAGS=-static + +if [[ "${GITHUB_ACTIONS:-}" != "" ]]; then + jobs="$(nproc)" +else + jobs="$(nproc --ignore=1)" +fi + +make -j"$jobs" + +cd src/ +gcc -static -o desktop-file-validate keyfileutils.o validate.o validator.o mimeutils.o -lglib-2.0 -lintl +gcc -static -o update-desktop-database update-desktop-database.o mimeutils.o -lglib-2.0 -lintl +gcc -static -o desktop-file-install keyfileutils.o validate.o install.o mimeutils.o -lglib-2.0 -lintl +strip desktop-file-install desktop-file-validate update-desktop-database + +cd .. + +make install \ No newline at end of file From 0d3ef4771bd360199b0d1e0e37bf1ed92492601d Mon Sep 17 00:00:00 2001 From: probonopd Date: Thu, 9 May 2024 10:20:58 +0200 Subject: [PATCH 02/15] Use known good desktop-file-utils commit --- ci/install-static-desktop-file-validate.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ci/install-static-desktop-file-validate.sh b/ci/install-static-desktop-file-validate.sh index c6f9e9b..b085893 100644 --- a/ci/install-static-desktop-file-validate.sh +++ b/ci/install-static-desktop-file-validate.sh @@ -2,12 +2,12 @@ set -euxo pipefail -if [[ "${1:-}" == "" ]]; then - echo "Usage: $0 " - exit 2 -fi +# if [[ "${1:-}" == "" ]]; then +# echo "Usage: $0 " +# exit 2 +# fi -version="$1" +# version="$1" build_dir="$(mktemp -d -t desktop-file-utils-build-XXXXXX)" @@ -46,4 +46,4 @@ strip desktop-file-install desktop-file-validate update-desktop-database cd .. -make install \ No newline at end of file +make install From 3ef92c92cc20bdc4b10f3104318883fa08869658 Mon Sep 17 00:00:00 2001 From: probonopd Date: Thu, 9 May 2024 10:23:19 +0200 Subject: [PATCH 03/15] apk add autoconf Attempt to fix `autoreconf: command not found` --- ci/install-static-desktop-file-validate.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/install-static-desktop-file-validate.sh b/ci/install-static-desktop-file-validate.sh index b085893..d9ae0d1 100644 --- a/ci/install-static-desktop-file-validate.sh +++ b/ci/install-static-desktop-file-validate.sh @@ -20,7 +20,7 @@ trap cleanup EXIT pushd "$build_dir" -apk add glib-static glib-dev +apk add glib-static glib-dev autoconf wget -c https://gitlab.freedesktop.org/xdg/desktop-file-utils/-/archive/56d220dd679c7c3a8f995a41a27a7d6f3df49dea/desktop-file-utils-56d220dd679c7c3a8f995a41a27a7d6f3df49dea.tar.gz tar xf desktop-file-utils-*.tar.gz cd desktop-file-utils-*/ From 536095e54705af21956370aeafdc47d6af70f58f Mon Sep 17 00:00:00 2001 From: probonopd Date: Thu, 9 May 2024 10:30:24 +0200 Subject: [PATCH 04/15] automake --- ci/install-static-desktop-file-validate.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/install-static-desktop-file-validate.sh b/ci/install-static-desktop-file-validate.sh index d9ae0d1..97282dd 100644 --- a/ci/install-static-desktop-file-validate.sh +++ b/ci/install-static-desktop-file-validate.sh @@ -20,7 +20,7 @@ trap cleanup EXIT pushd "$build_dir" -apk add glib-static glib-dev autoconf +apk add glib-static glib-dev autoconf automake wget -c https://gitlab.freedesktop.org/xdg/desktop-file-utils/-/archive/56d220dd679c7c3a8f995a41a27a7d6f3df49dea/desktop-file-utils-56d220dd679c7c3a8f995a41a27a7d6f3df49dea.tar.gz tar xf desktop-file-utils-*.tar.gz cd desktop-file-utils-*/ From dc0489224e2908a30defd99e5e4c622d6ecee27b Mon Sep 17 00:00:00 2001 From: probonopd Date: Thu, 9 May 2024 10:33:11 +0200 Subject: [PATCH 05/15] cp "$(which desktop-file-validate)" AppDir/usr/bin --- ci/build.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ci/build.sh b/ci/build.sh index e7b06b9..2ef27b2 100755 --- a/ci/build.sh +++ b/ci/build.sh @@ -36,6 +36,7 @@ make install DESTDIR=AppDir find AppDir +cp "$(which desktop-file-validate)" AppDir/usr/bin cp "$(which mksquashfs)" AppDir/usr/bin cp "$repo_root"/resources/AppRun.sh AppDir/AppRun From 5eff5c04bf289b820b27e72f3108de9fd3d408da Mon Sep 17 00:00:00 2001 From: probonopd Date: Thu, 9 May 2024 10:35:08 +0200 Subject: [PATCH 06/15] cp desktop-file-validate /usr/bin/ --- ci/install-static-desktop-file-validate.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ci/install-static-desktop-file-validate.sh b/ci/install-static-desktop-file-validate.sh index 97282dd..52df4ba 100644 --- a/ci/install-static-desktop-file-validate.sh +++ b/ci/install-static-desktop-file-validate.sh @@ -38,11 +38,11 @@ fi make -j"$jobs" +# TODO: Find more elegant way to do this cd src/ gcc -static -o desktop-file-validate keyfileutils.o validate.o validator.o mimeutils.o -lglib-2.0 -lintl -gcc -static -o update-desktop-database update-desktop-database.o mimeutils.o -lglib-2.0 -lintl -gcc -static -o desktop-file-install keyfileutils.o validate.o install.o mimeutils.o -lglib-2.0 -lintl -strip desktop-file-install desktop-file-validate update-desktop-database +strip desktop-file-validate +cp desktop-file-validate /usr/bin/ cd .. From adff5b6131d7a62435e620d4a3aeef436ad47d41 Mon Sep 17 00:00:00 2001 From: probonopd Date: Thu, 9 May 2024 10:39:48 +0200 Subject: [PATCH 07/15] Remove redundant 'make install' --- ci/install-static-desktop-file-validate.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/ci/install-static-desktop-file-validate.sh b/ci/install-static-desktop-file-validate.sh index 52df4ba..e04d338 100644 --- a/ci/install-static-desktop-file-validate.sh +++ b/ci/install-static-desktop-file-validate.sh @@ -43,7 +43,4 @@ cd src/ gcc -static -o desktop-file-validate keyfileutils.o validate.o validator.o mimeutils.o -lglib-2.0 -lintl strip desktop-file-validate cp desktop-file-validate /usr/bin/ - cd .. - -make install From 167e151d742dda9fc351b1576b0bfabd92ae8d90 Mon Sep 17 00:00:00 2001 From: probonopd Date: Thu, 9 May 2024 09:16:39 +0000 Subject: [PATCH 08/15] Also zsyncmake --- ci/build-in-docker.sh | 1 + ci/build.sh | 1 + ci/install-static-zsyncmake.sh | 38 ++++++++++++++++++++++++++++++++++ 3 files changed, 40 insertions(+) create mode 100644 ci/install-static-zsyncmake.sh diff --git a/ci/build-in-docker.sh b/ci/build-in-docker.sh index 60e5a42..f008a71 100755 --- a/ci/build-in-docker.sh +++ b/ci/build-in-docker.sh @@ -79,6 +79,7 @@ git config --global --add safe.directory '*' bash -euxo pipefail /source/ci/install-static-desktop-file-validate.sh bash -euxo pipefail /source/ci/install-static-mksquashfs.sh 4.6.1 +bash -euxo pipefail /source/ci/install-static-zsyncmake.sh 4.5.1 bash -euxo pipefail /source/ci/build.sh diff --git a/ci/build.sh b/ci/build.sh index 2ef27b2..3d62401 100755 --- a/ci/build.sh +++ b/ci/build.sh @@ -38,6 +38,7 @@ find AppDir cp "$(which desktop-file-validate)" AppDir/usr/bin cp "$(which mksquashfs)" AppDir/usr/bin +cp "$(which zsyncmake)" AppDir/usr/bin cp "$repo_root"/resources/AppRun.sh AppDir/AppRun chmod +x AppDir/AppRun diff --git a/ci/install-static-zsyncmake.sh b/ci/install-static-zsyncmake.sh new file mode 100644 index 0000000..d4f7449 --- /dev/null +++ b/ci/install-static-zsyncmake.sh @@ -0,0 +1,38 @@ +#! /bin/bash + +set -euxo pipefail + +if [[ "${1:-}" == "" ]]; then + echo "Usage: $0 " + exit 2 +fi + +version="$1" + +build_dir="$(mktemp -d -t zsyncmake-build-XXXXXX)" + +cleanup () { + if [ -d "$build_dir" ]; then + rm -rf "$build_dir" + fi +} +trap cleanup EXIT + +pushd "$build_dir" + +wget http://zsync.moria.org.uk/download/zsync-"$version".tar.bz2 -q +tar xf zsync-*.tar.bz2 + +cd zsync-*/ + +find . -type f -exec sed -i -e 's|off_t|size_t|g' {} \; + +./configure CFLAGS=-no-pie LDFLAGS=-static --prefix=/usr --build=$(arch)-unknown-linux-gnu + +if [[ "${GITHUB_ACTIONS:-}" != "" ]]; then + jobs="$(nproc)" +else + jobs="$(nproc --ignore=1)" +fi + +make -j"$jobs" install \ No newline at end of file From c75c576e4bd4dd5935eb49d117abd49b9b03d7c8 Mon Sep 17 00:00:00 2001 From: probonopd Date: Thu, 9 May 2024 09:38:24 +0000 Subject: [PATCH 09/15] Use release versions --- ci/build-in-docker.sh | 4 ++-- ci/install-static-desktop-file-validate.sh | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ci/build-in-docker.sh b/ci/build-in-docker.sh index f008a71..8ee352d 100755 --- a/ci/build-in-docker.sh +++ b/ci/build-in-docker.sh @@ -77,9 +77,9 @@ echo "Requires.private: libcares libnghttp2 libidn2 libssl openssl libcrypto lib # in a Docker container, we can safely disable this check git config --global --add safe.directory '*' -bash -euxo pipefail /source/ci/install-static-desktop-file-validate.sh +bash -euxo pipefail /source/ci/install-static-desktop-file-validate.sh 0.27 bash -euxo pipefail /source/ci/install-static-mksquashfs.sh 4.6.1 -bash -euxo pipefail /source/ci/install-static-zsyncmake.sh 4.5.1 +bash -euxo pipefail /source/ci/install-static-zsyncmake.sh 0.6.2 bash -euxo pipefail /source/ci/build.sh diff --git a/ci/install-static-desktop-file-validate.sh b/ci/install-static-desktop-file-validate.sh index e04d338..321ce05 100644 --- a/ci/install-static-desktop-file-validate.sh +++ b/ci/install-static-desktop-file-validate.sh @@ -2,12 +2,12 @@ set -euxo pipefail -# if [[ "${1:-}" == "" ]]; then -# echo "Usage: $0 " -# exit 2 -# fi +if [[ "${1:-}" == "" ]]; then + echo "Usage: $0 " + exit 2 +fi -# version="$1" +version="$1" build_dir="$(mktemp -d -t desktop-file-utils-build-XXXXXX)" @@ -21,7 +21,7 @@ trap cleanup EXIT pushd "$build_dir" apk add glib-static glib-dev autoconf automake -wget -c https://gitlab.freedesktop.org/xdg/desktop-file-utils/-/archive/56d220dd679c7c3a8f995a41a27a7d6f3df49dea/desktop-file-utils-56d220dd679c7c3a8f995a41a27a7d6f3df49dea.tar.gz +wget -c "https://gitlab.freedesktop.org/xdg/desktop-file-utils/-/archive/"$version"/desktop-file-utils-"$version".tar.gz" tar xf desktop-file-utils-*.tar.gz cd desktop-file-utils-*/ # The next 2 lines are a workaround for: checking build system type... ./config.guess: unable to guess system type From 7c3cc3d18e774cc6d41ebee2855d55826deea4c0 Mon Sep 17 00:00:00 2001 From: probonopd Date: Thu, 9 May 2024 09:41:58 +0000 Subject: [PATCH 10/15] Use known good hash for desktop-file-validate --- ci/build-in-docker.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/build-in-docker.sh b/ci/build-in-docker.sh index 8ee352d..680c0d5 100755 --- a/ci/build-in-docker.sh +++ b/ci/build-in-docker.sh @@ -77,7 +77,7 @@ echo "Requires.private: libcares libnghttp2 libidn2 libssl openssl libcrypto lib # in a Docker container, we can safely disable this check git config --global --add safe.directory '*' -bash -euxo pipefail /source/ci/install-static-desktop-file-validate.sh 0.27 +bash -euxo pipefail /source/ci/install-static-desktop-file-validate.sh 56d220dd679c7c3a8f995a41a27a7d6f3df49dea bash -euxo pipefail /source/ci/install-static-mksquashfs.sh 4.6.1 bash -euxo pipefail /source/ci/install-static-zsyncmake.sh 0.6.2 From 6196304729ecebfd6b387695a306140591fff5ff Mon Sep 17 00:00:00 2001 From: probonopd Date: Thu, 9 May 2024 11:46:38 +0200 Subject: [PATCH 11/15] No longer use desktop-file-utils from apk --- ci/build-in-docker.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/build-in-docker.sh b/ci/build-in-docker.sh index 680c0d5..c70257d 100755 --- a/ci/build-in-docker.sh +++ b/ci/build-in-docker.sh @@ -62,7 +62,7 @@ docker run \ set -euxo pipefail -apk add bash git gcc g++ cmake make file desktop-file-utils wget \ +apk add bash git gcc g++ cmake make file wget \ gpgme-dev libgcrypt-dev libgcrypt-static argp-standalone zstd-dev zstd-static util-linux-static \ glib-static libassuan-static zlib-static libgpg-error-static \ curl-dev curl-static nghttp2-static libidn2-static openssl-libs-static brotli-static c-ares-static libunistring-static From ec19c03fac030cca486a51136bc09aea42e0448f Mon Sep 17 00:00:00 2001 From: probonopd Date: Sun, 12 May 2024 09:48:12 +0000 Subject: [PATCH 12/15] Move apk install to build-in-docker.sh --- ci/build-in-docker.sh | 3 ++- ci/install-static-desktop-file-validate.sh | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ci/build-in-docker.sh b/ci/build-in-docker.sh index c70257d..455992f 100755 --- a/ci/build-in-docker.sh +++ b/ci/build-in-docker.sh @@ -65,7 +65,8 @@ set -euxo pipefail apk add bash git gcc g++ cmake make file wget \ gpgme-dev libgcrypt-dev libgcrypt-static argp-standalone zstd-dev zstd-static util-linux-static \ glib-static libassuan-static zlib-static libgpg-error-static \ - curl-dev curl-static nghttp2-static libidn2-static openssl-libs-static brotli-static c-ares-static libunistring-static + curl-dev curl-static nghttp2-static libidn2-static openssl-libs-static brotli-static c-ares-static libunistring-static \ + glib-static glib-dev autoconf automake # libcurl's pkg-config scripts are broken. everywhere, everytime. # these additional flags have been collected from all the .pc files whose libs are mentioned as -l in Libs.private diff --git a/ci/install-static-desktop-file-validate.sh b/ci/install-static-desktop-file-validate.sh index 321ce05..40e0a67 100644 --- a/ci/install-static-desktop-file-validate.sh +++ b/ci/install-static-desktop-file-validate.sh @@ -20,7 +20,8 @@ trap cleanup EXIT pushd "$build_dir" -apk add glib-static glib-dev autoconf automake +# apk add glib-static glib-dev autoconf automake # Moved to build-in-docker.sh + wget -c "https://gitlab.freedesktop.org/xdg/desktop-file-utils/-/archive/"$version"/desktop-file-utils-"$version".tar.gz" tar xf desktop-file-utils-*.tar.gz cd desktop-file-utils-*/ From 85b34e9c60903e7a4ced03892e2b03136aaf79ef Mon Sep 17 00:00:00 2001 From: probonopd Date: Sun, 8 Dec 2024 17:15:29 +0100 Subject: [PATCH 13/15] desktop-file-validate 0.28 --- ci/build-in-docker.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/build-in-docker.sh b/ci/build-in-docker.sh index 32190c2..ae6cddf 100755 --- a/ci/build-in-docker.sh +++ b/ci/build-in-docker.sh @@ -75,7 +75,7 @@ echo "Requires.private: libcares libnghttp2 libidn2 libssl openssl libcrypto lib # in a Docker container, we can safely disable this check git config --global --add safe.directory '*' -bash -euxo pipefail /source/ci/install-static-desktop-file-validate.sh 56d220dd679c7c3a8f995a41a27a7d6f3df49dea +bash -euxo pipefail /source/ci/install-static-desktop-file-validate.sh 0.28 bash -euxo pipefail /source/ci/install-static-mksquashfs.sh 4.6.1 bash -euxo pipefail /source/ci/install-static-zsyncmake.sh 0.6.2 From 8918da806e8ef9b5518c220dc2fc59e92fb778ac Mon Sep 17 00:00:00 2001 From: probonopd Date: Sun, 8 Dec 2024 17:38:12 +0100 Subject: [PATCH 14/15] Downgrade to 0.27 because 0.28 doesn't build --- ci/build-in-docker.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/build-in-docker.sh b/ci/build-in-docker.sh index ae6cddf..b000e69 100755 --- a/ci/build-in-docker.sh +++ b/ci/build-in-docker.sh @@ -75,7 +75,7 @@ echo "Requires.private: libcares libnghttp2 libidn2 libssl openssl libcrypto lib # in a Docker container, we can safely disable this check git config --global --add safe.directory '*' -bash -euxo pipefail /source/ci/install-static-desktop-file-validate.sh 0.28 +bash -euxo pipefail /source/ci/install-static-desktop-file-validate.sh 0.27 bash -euxo pipefail /source/ci/install-static-mksquashfs.sh 4.6.1 bash -euxo pipefail /source/ci/install-static-zsyncmake.sh 0.6.2 From c2fe3826d58225eb6b6942e603535aef0b5c422d Mon Sep 17 00:00:00 2001 From: TheAssassin Date: Sun, 8 Dec 2024 18:01:31 +0100 Subject: [PATCH 15/15] Build latest desktop-file-utils statically with meson --- ci/build-in-docker.sh | 4 ++-- ci/install-static-desktop-file-validate.sh | 18 +++++------------- 2 files changed, 7 insertions(+), 15 deletions(-) diff --git a/ci/build-in-docker.sh b/ci/build-in-docker.sh index b000e69..b237214 100755 --- a/ci/build-in-docker.sh +++ b/ci/build-in-docker.sh @@ -63,7 +63,7 @@ apk add bash git gcc g++ cmake make file wget \ gpgme-dev libgcrypt-dev libgcrypt-static argp-standalone zstd-dev zstd-static util-linux-static \ glib-static libassuan-static zlib-static libgpg-error-static \ curl-dev curl-static nghttp2-static libidn2-static openssl-libs-static brotli-static c-ares-static libunistring-static \ - glib-static glib-dev autoconf automake + glib-static glib-dev autoconf automake meson # libcurl's pkg-config scripts are broken. everywhere, everytime. # these additional flags have been collected from all the .pc files whose libs are mentioned as -l in Libs.private @@ -75,7 +75,7 @@ echo "Requires.private: libcares libnghttp2 libidn2 libssl openssl libcrypto lib # in a Docker container, we can safely disable this check git config --global --add safe.directory '*' -bash -euxo pipefail /source/ci/install-static-desktop-file-validate.sh 0.27 +bash -euxo pipefail /source/ci/install-static-desktop-file-validate.sh 0.28 bash -euxo pipefail /source/ci/install-static-mksquashfs.sh 4.6.1 bash -euxo pipefail /source/ci/install-static-zsyncmake.sh 0.6.2 diff --git a/ci/install-static-desktop-file-validate.sh b/ci/install-static-desktop-file-validate.sh index 40e0a67..f64b10e 100644 --- a/ci/install-static-desktop-file-validate.sh +++ b/ci/install-static-desktop-file-validate.sh @@ -25,11 +25,9 @@ pushd "$build_dir" wget -c "https://gitlab.freedesktop.org/xdg/desktop-file-utils/-/archive/"$version"/desktop-file-utils-"$version".tar.gz" tar xf desktop-file-utils-*.tar.gz cd desktop-file-utils-*/ -# The next 2 lines are a workaround for: checking build system type... ./config.guess: unable to guess system type -wget 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD' -O config.guess -wget 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD' -O config.sub -autoreconf --install # https://github.com/shendurelab/LACHESIS/issues/31#issuecomment-283963819 -./configure CFLAGS=-no-pie LDFLAGS=-static + +# setting LDFLAGS as suggested in https://mesonbuild.com/Creating-Linux-binaries.html#building-and-installing +env LDFLAGS=-static meson setup build --prefer-static --default-library=static if [[ "${GITHUB_ACTIONS:-}" != "" ]]; then jobs="$(nproc)" @@ -37,11 +35,5 @@ else jobs="$(nproc --ignore=1)" fi -make -j"$jobs" - -# TODO: Find more elegant way to do this -cd src/ -gcc -static -o desktop-file-validate keyfileutils.o validate.o validator.o mimeutils.o -lglib-2.0 -lintl -strip desktop-file-validate -cp desktop-file-validate /usr/bin/ -cd .. +ninja -C build -j "$jobs" -v +ninja -C build -j 1 -v install