Add aarch64-debian-stretch platform (#45)

diff --git a/.travis.yml b/.travis.yml
index c6abcf6..578feb3 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -12,16 +12,16 @@
 
 env:
   global:
-    - ERLANGVER=19.3.6
-    - TARBALL_URL=https://dist.apache.org/repos/dist/release/couchdb/source/2.3.0/apache-couchdb-2.3.0.tar.gz
-    - TARBALL=apache-couchdb-2.3.0.tar.gz
+    - ERLANGVERSION=19.3.6
+    - TARBALL_URL=https://dist.apache.org/repos/dist/release/couchdb/source/2.3.1/apache-couchdb-2.3.1.tar.gz
+    - TARBALL=apache-couchdb-2.3.1.tar.gz
   matrix:
     - TARGET="js debian-jessie"
     - TARGET="couch debian-jessie ${TARBALL_URL}"
     - TARGET="js debian-stretch"
     - TARGET="couch debian-stretch ${TARBALL_URL}"
-    - TARGET="js ubuntu-trusty"
-    - TARGET="couch ubuntu-trusty ${TARBALL_URL}"
+    - ERLANGVERSION=20.3.8.20 TARGET="js aarch64-debian-stretch"
+    - ERLANGVERSION=20.3.8.20 TARGET="couch aarch64-debian-stretch ${TARBALL_URL}"
     - TARGET="js ubuntu-xenial"
     - TARGET="couch ubuntu-xenial ${TARBALL_URL}"
     - TARGET="js ubuntu-bionic"
@@ -33,9 +33,10 @@
 
 before_install:
   - docker --version
+  - docker run --rm --privileged multiarch/qemu-user-static:register --reset
 
 script:
-  - ./build.sh ${TARGET}
+  - ERLANGVERSION=${ERLANGVERSION} ./build.sh ${TARGET}
 
 after_script:
   - ls -laR pkgs/
diff --git a/Makefile b/Makefile
index 958bcaa..6e6c53b 100644
--- a/Makefile
+++ b/Makefile
@@ -30,6 +30,7 @@
 
 # Debian default
 debian: find-couch-dist copy-debian update-changelog dpkg lintian copy-pkgs
+debian-no-lintian: find-couch-dist copy-debian update-changelog dpkg copy-pkgs
 
 # Debian 8
 debian-jessie: PLATFORM=jessie
@@ -41,8 +42,14 @@
 debian-stretch: PLATFORM=stretch
 debian-stretch: DIST=debian-stretch
 debian-stretch: stretch
+# AArch64 Debian 9
+# Lintian doesn't install correctly into a cross-built Docker container ?!
+aarch64-debian-stretch: PLATFORM=stretch
+aarch64-debian-stretch: DIST=debian-stretch
+aarch64-debian-stretch: debian-no-lintian
 stretch: debian
 
+
 # Ubuntu 12.04
 ubuntu-precise: PLATFORM=precise
 ubuntu-precise: DIST=ubuntu-precise
diff --git a/build.sh b/build.sh
index 82d843d..a9f5b20 100755
--- a/build.sh
+++ b/build.sh
@@ -29,9 +29,9 @@
 
 # TODO derive these by interrogating the Docker repo rather tha
 # hard coding the list
-DEBIANS="debian-jessie debian-stretch"
+DEBIANS="debian-jessie debian-stretch aarch64-debian-stretch"
 UBUNTUS="ubuntu-trusty ubuntu-xenial ubuntu-bionic"
-debs="(debian-jessie|debian-stretch|ubuntu-trusty|ubuntu-xenial|ubuntu-bionic)"
+debs="(debian-jessie|debian-stretch|aarch64-debian-stretch|ubuntu-trusty|ubuntu-xenial|ubuntu-bionic)"
 
 CENTOSES="centos-6 centos-7"
 rpms="(centos-6|centos-7)"
@@ -43,10 +43,17 @@
 build-js() {
   # TODO: check if image is built first, if not, complain
   # invoke as build-js <plat>
-  docker run \
-      --mount type=bind,src=${SCRIPTPATH},dst=/home/jenkins/couchdb-pkg \
-      couchdbdev/$1-base \
-      sudo /home/jenkins/couchdb-pkg/bin/build-js.sh
+  if [[ ${TRAVIS} == "true" ]]; then
+    docker run \
+        --mount type=bind,src=${SCRIPTPATH},dst=/home/jenkins/couchdb-pkg \
+        -u 0 couchdbdev/$1-base \
+        /home/jenkins/couchdb-pkg/bin/build-js.sh
+  else
+    docker run \
+        --mount type=bind,src=${SCRIPTPATH},dst=/home/jenkins/couchdb-pkg \
+        couchdbdev/$1-base \
+        sudo /home/jenkins/couchdb-pkg/bin/build-js.sh
+  fi
 }
 
 build-all-js() {