aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Mortier <mort@cantab.net>2019-04-26 19:43:02 +0100
committerRichard Mortier <mort@cantab.net>2019-04-26 19:44:30 +0100
commit5d0da8bd98bdaa38880c9ceded785e028e1cd83f (patch)
treef9103fe1d93e3316c169c03d6d82516a8c04e57a
parentfeffc23d469fd3e24e46c12325441034fb07a616 (diff)
downloaddocker-abuild-5d0da8bd98bdaa38880c9ceded785e028e1cd83f.tar.bz2
docker-abuild-5d0da8bd98bdaa38880c9ceded785e028e1cd83f.tar.xz
abuild: rename to avoid clash on alpine systems
-rw-r--r--Makefile6
-rw-r--r--README.md10
-rwxr-xr-xdabuild.in (renamed from abuild.in)12
3 files changed, 14 insertions, 14 deletions
diff --git a/Makefile b/Makefile
index d77ed51..b2cf4c4 100644
--- a/Makefile
+++ b/Makefile
@@ -15,8 +15,8 @@ TAGS = 2.6 2.7 3.1 3.2 3.3 3.4 3.5 3.6 3.7 3.8 3.9 edge
.PHONY: build
build: $(patsubst %, build-%, $(TAGS))
- sed 's!%%ABUILD_VOLUMES%%!$(VOLS)!;s!%%ABUILD_IMAGE%%!$(IMG)!' abuild.in >| abuild
- chmod +x abuild
+ sed 's!%%ABUILD_VOLUMES%%!$(VOLS)!;s!%%ABUILD_IMAGE%%!$(IMG)!' dabuild.in >| dabuild
+ chmod +x dabuild
.PHONY: build-%
build-%:
@@ -32,7 +32,7 @@ push:
.PHONY: clean
clean:
docker rmi -f $$(docker images -q $(IMG)) || true
- $(RM) Dockerfile abuild
+ $(RM) Dockerfile dabuild
.PHONY: distclean
distclean: clean
diff --git a/README.md b/README.md
index 5170ec8..c1bb50d 100644
--- a/README.md
+++ b/README.md
@@ -4,24 +4,24 @@ A Docker-ised `abuild` for invocation from within an `aports/` tree. Attempts to
## Configuration
-The `abuild` script is generated from `abuild.in` on `make build`. This ensures synchronisation of volume names. By default, the `abuild` script then uses the Docker image `mor1/abuild`; set the `IMG` variable in the `Makefile` and `make build` to use a different image.
+The `dabuild` script is generated from `dabuild.in` on `make build`. This ensures synchronisation of volume names. By default, the `dabuild` script then uses the Docker image `mor1/abuild`. To use a different image, set the `IMG` variable in the `Makefile` and then `make build`.
-On invocation from within an `aports/` tree, the script will determine the root of the tree (`.../aports/`) and bind mount it into the container at `/home/builder/aports`. It also bind mounts `$HOME/.abuild` for configuration.
+On invocation from within an `aports/` tree, the script will determine the root of the tree (`.../aports/`) and bind mount it into the container at `/home/builder/aports`. It also bind mounts `$HOME/.abuild` for configuration and `.../aports/../packages` for `abuild` output packages.
## Building without fetching
-Per normal usage, if you use the `-K` switch, then the build, source, etc directories will be left alone on completion. If you then invoke as `abuild build`, then the source will not be re-fetched -- useful when you wish to edit the source to debug a package build.
+Per normal usage, if you use the `-K` switch, then the build, source, etc directories will be left alone on completion. If you then invoke as `dabuild build`, then the source will not be re-fetched -- useful when you wish to edit the source to debug a package build.
## Caching
The script attempts to support caching via named volumes. To turn on caching, invoke as
``` shell
-DOCKER_ABUILD_CACHE=true abuild [options]
+DABUILD_CACHE=true abuild [options]
```
To clean the cache before continuing, invoke as
``` shell
-DOCKER_ABUILD_CACHE=true DOCKER_ABUILD_CLEAN=true abuild [options]
+DABUILD_CACHE=true DABUILD_CLEAN=true abuild [options]
```
diff --git a/abuild.in b/dabuild.in
index 49defe8..91b2c50 100755
--- a/abuild.in
+++ b/dabuild.in
@@ -6,7 +6,7 @@
set -e
## debug
-if [ "$DOCKER_ABUILD_DEBUG" = "true" ]; then
+if [ "$DABUILD_DEBUG" = "true" ]; then
set -x
PS4='$LINENO: '
fi
@@ -19,8 +19,8 @@ if [ "${PWD%*/aports*}" = "$PWD" ]; then
fi
## use branch to figure out most appropriate alpine version
-if [ "$DOCKER_ABUILD_VERSION" ]; then
- ABUILD_VERSION=$DOCKER_ABUILD_VERSION
+if [ "$DABUILD_VERSION" ]; then
+ ABUILD_VERSION=$DABUILD_VERSION
else
APORTS_BRANCH=$(git status | head -1)
APORTS_BRANCH="${APORTS_BRANCH##*[ /]}"
@@ -41,10 +41,10 @@ ABUILD_VOLUMES="
-v ${PWD%/aports*}/aports:/home/builder/aports
-v ${PWD%/aports*}/packages:/home/builder/packages
"
-if [ "$DOCKER_ABUILD_CACHE" = "true" ]; then
+if [ "$DABUILD_CACHE" = "true" ]; then
for v in %%ABUILD_VOLUMES%% ; do
vol=abuild-$ABUILD_VERSION-${v//\//_}
- if [ "$DOCKER_ABUILD_CLEAN" = "true" ]; then
+ if [ "$DABUILD_CLEAN" = "true" ]; then
## clean the cache if requested
docker rm -f $(docker ps -qaf "volume=$vol") >/dev/null 2>/dev/null || true
docker volume rm $vol >/dev/null
@@ -56,5 +56,5 @@ fi
## go!
ABUILD_WORKDIR=/home/builder/aports${PWD#*/aports}
-DOCKER="docker run -ti $ABUILD_VOLUMES -e DOCKER_ABUILD_DEBUG $DOCKER_ABUILD_ARGS"
+DOCKER="docker run -ti $ABUILD_VOLUMES -e DABUILD_DEBUG $DABUILD_ARGS"
$DOCKER --workdir $ABUILD_WORKDIR %%ABUILD_IMAGE%%:$ABUILD_VERSION "$@"