summaryrefslogtreecommitdiff
path: root/PKGBUILD
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2022-07-09 13:15:44 +0700
committerShulhan <ms@kilabit.info>2022-07-09 13:34:33 +0700
commitfddcb64806196a308f04eeb7c6e428e90fbc998e (patch)
tree340ade951c517add9dd22afb925a7fe9054e9e55 /PKGBUILD
parent62550ad000eff79f08d156c14bf672ddec63d45a (diff)
downloadgoogle-cloud-ops-agent-git-fddcb64806196a308f04eeb7c6e428e90fbc998e.tar.xz
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.
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD9
1 files changed, 7 insertions, 2 deletions
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
}