summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohnothan King2024-01-26 05:57:35 -0800
committerJohnothan King2024-01-26 05:57:35 -0800
commitf1591cd17a8beb5f22a4d6e371ad8485c6b33934 (patch)
treec73fcdf2635b9a0729e4ace2ee3b765215186272
parentd8676db165d919a6d9559104175308fed51f48da (diff)
downloadaur-f1591cd17a8beb5f22a4d6e371ad8485c6b33934.tar.gz
Separate into prepare() function for correctness
-rw-r--r--PKGBUILD9
1 files changed, 6 insertions, 3 deletions
diff --git a/PKGBUILD b/PKGBUILD
index ca2dd19d7d73..9a4533475273 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -25,15 +25,18 @@ pkgver() {
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
-build() {
+prepare() {
cd "${srcdir}/${_pkgname}"
- test -n "${CFLAGS}" || CFLAGS=-O2 # Generic fallback is used only when necessary
-
# Build with SHOPT_ALL_LIBCMD (aka enable all ksh builtins) if
# ${_all_libcmd} is set to '1' or 'yes'.
if [[ ${_all_libcmd} == 1 || ${_all_libcmd} == yes ]]; then
sed -i 's/ALL_LIBCMD=0/ALL_LIBCMD=1/g' src/cmd/ksh93/SHOPT.sh
fi
+}
+
+build() {
+ cd "${srcdir}/${_pkgname}"
+ test -n "${CFLAGS}" || CFLAGS=-O2 # Generic fallback is used only when necessary
./bin/package make CCFLAGS="${CFLAGS}"
}