summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorShulhan2022-07-09 13:15:44 +0700
committerShulhan2022-07-09 13:34:33 +0700
commitfddcb64806196a308f04eeb7c6e428e90fbc998e (patch)
tree340ade951c517add9dd22afb925a7fe9054e9e55
parent62550ad000eff79f08d156c14bf672ddec63d45a (diff)
downloadaur-fddcb64806196a308f04eeb7c6e428e90fbc998e.tar.gz
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.
-rw-r--r--.gitignore1
-rw-r--r--PKGBUILD9
2 files changed, 8 insertions, 2 deletions
diff --git a/.gitignore b/.gitignore
index bc0519f21b11..fa33c8602013 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,4 +6,5 @@
/opentelemetry-operations-collector
/pkg
/src
+/staging
/tmp
diff --git a/PKGBUILD b/PKGBUILD
index 6f1020029289..5602a317eb98 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
}