summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarel Kočí <karel.koci@nic.cz>2018-09-20 10:33:34 +0200
committerKarel Kočí <karel.koci@nic.cz>2018-09-20 10:33:34 +0200
commit577a64a6bc8bb69c3337ad34bcf5f7b33cf50d6b (patch)
tree218944e4ce06b13009bb1c2072209734a68316e1
parent43bb160a68cb86b960d6fa98e68b2692d105aeac (diff)
downloadlaminar-cnf-577a64a6bc8bb69c3337ad34bcf5f7b33cf50d6b.tar.gz
laminar-cnf-577a64a6bc8bb69c3337ad34bcf5f7b33cf50d6b.tar.bz2
laminar-cnf-577a64a6bc8bb69c3337ad34bcf5f7b33cf50d6b.zip
alpine-amd64: some reformat and add FILES
-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"