From fddcb64806196a308f04eeb7c6e428e90fbc998e Mon Sep 17 00:00:00 2001 From: Shulhan Date: Sat, 9 Jul 2022 13:15:44 +0700 Subject: all: set the DESTDIR variable when running build.sh The goal is to allow us to inspect the installed files and their structure. The DESTDIR directory contains installed files, similar to prefix. If its not set, the directory will be created under /tmp with random name. This also fix build error due to META-INF directory exist on the second or next build. --- .gitignore | 1 + PKGBUILD | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index bc0519f..fa33c86 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,5 @@ /opentelemetry-operations-collector /pkg /src +/staging /tmp diff --git a/PKGBUILD b/PKGBUILD index 6f10200..5602a31 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -64,12 +64,17 @@ prepare() { "${srcdir}/opentelemetry-java-contrib" git submodule update git apply "${srcdir}/0001-apps-hostmetrics.patch" + + rm -rf ${srcdir}/google-cloud-ops-agent-git/submodules/opentelemetry-java-contrib/META-INF } build() { + _destdir="$srcdir/../staging" + mkdir -p "$_destdir" + echo "destdir: $_destdir" + cd "${pkgname}" - echo "build in $PWD" - BUILD_DISTRO=arch CODE_VERSION="${pkgver}" \ + BUILD_DISTRO=arch CODE_VERSION="${pkgver}" DESTDIR="$_destdir" \ ./build.sh } -- cgit v1.3