summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--files/alpine/abuild.conf16
-rwxr-xr-xfiles/alpine/amd64.sh (renamed from jobs/alpine-amd64.sh)18
-rw-r--r--job.common3
-rwxr-xr-xjobs/alpine-amd64.run2
4 files changed, 21 insertions, 18 deletions
diff --git a/files/alpine/abuild.conf b/files/alpine/abuild.conf
new file mode 100644
index 0000000..7846d73
--- /dev/null
+++ b/files/alpine/abuild.conf
@@ -0,0 +1,16 @@
+# vim: ft=sh
+export CFLAGS="-Os -fomit-frame-pointer"
+export CXXFLAGS="\$CFLAGS"
+export CPPFLAGS="\$CFLAGS"
+export LDFLAGS="-Wl,--as-needed"
+
+export JOBS=4
+export MAKEFLAGS=-j\$JOBS
+
+USE_COLORS=1
+
+SRCDEST=/var/cache/distfiles
+REPODEST=$HOME/packages/
+
+CLEANUP="srcdir bldroot pkgdir deps"
+ERROR_CLEANUP="bldroot deps"
diff --git a/jobs/alpine-amd64.sh b/files/alpine/amd64.sh
index b737ed3..e1d0727 100755
--- a/jobs/alpine-amd64.sh
+++ b/files/alpine/amd64.sh
@@ -27,23 +27,7 @@ EOF
uroot cp ~/alpinelinux.rsa.key "$ROOT/build/.abuild/cynerd@email.cz-5b8aeb6d.rsa"
uchroot "$ROOT" root 'chown build:build "/build/.abuild/cynerd@email.cz-5b8aeb6d.rsa"'
uroot cp ~/alpinelinux.rsa.key.pub "$ROOT/etc/apk/keys/cynerd@email.cz-5b8aeb6d.rsa.pub"
- uroot cat >"$ROOT/etc/abuild.conf" <<EOF
-export CFLAGS="-Os -fomit-frame-pointer"
-export CXXFLAGS="\$CFLAGS"
-export CPPFLAGS="\$CFLAGS"
-export LDFLAGS="-Wl,--as-needed"
-
-export JOBS=4
-export MAKEFLAGS=-j\$JOBS
-
-USE_COLORS=1
-
-SRCDEST=/var/cache/distfiles
-REPODEST=\$HOME/packages/
-
-CLEANUP="srcdir bldroot pkgdir deps"
-ERROR_CLEANUP="bldroot deps"
-EOF
+ uroot cp "$JOB_FILES/abuild.conf" "$ROOT/etc/abuild.conf"
fi
echo_stage "Update system"
diff --git a/job.common b/job.common
index ebe6ab1..92941dc 100644
--- a/job.common
+++ b/job.common
@@ -18,5 +18,8 @@ if [ "$JOBID" = "$TEMPLATEID" ]; then
TWORKSPACE="$HOME/workspace/notemplate"
fi
+# Files directory
+export FILES="$(readlink -f "$(dirname "$(readlink -f "$0")")/../files")"
+
# Include utils
. utils
diff --git a/jobs/alpine-amd64.run b/jobs/alpine-amd64.run
index f9cfbbc..fbb2961 100755
--- a/jobs/alpine-amd64.run
+++ b/jobs/alpine-amd64.run
@@ -8,4 +8,4 @@ if [ -n "$CLEAN" ]; then
fi
export ROOT="$WORKSPACE/root"
-flock --exclusive "$WORKSPACE/root.lock" "$(readlink -f "$0" | sed 's/\.run$/\.sh/')"
+flock --exclusive "$WORKSPACE/root.lock" "$FILES/alpine/amd64.sh"