diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index f1f481ba8549a9a0365105ba07eba3e9ab05fd3d..f9d46324531b0902876338b1107955fcb66d43fc 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,37 +1 @@
-
-stages:
-  - build_src
-  - build_pkg
-  - upload
-
-build:src:
-  stage: build_src
-  image: "ai/build:stretch"
-  script: "build-dsc"
-  artifacts:
-    paths:
-      - build-deb/
-  only:
-    - master
-
-build:pkg:
-  stage: build_pkg
-  image: "ai/build:stretch"
-  script: "build-deb"
-  dependencies:
-    - build:src
-  artifacts:
-    paths:
-      - output-deb/
-  only:
-    - master
-
-upload:pkg:
-  stage: upload
-  image: "ai/pkg:base"
-  script: "upload-packages -r ai3"
-  dependencies:
-    - build:pkg
-  only:
-    - master
-
+include: "https://git.autistici.org/ai3/build-deb/raw/master/ci-common.yml"
diff --git a/debian/control b/debian/control
index 70dd600047116533b9d50ffb0c4a988284c24ce2..e122856f18956f99b8b4f18baabd19b37d8a17d8 100644
--- a/debian/control
+++ b/debian/control
@@ -2,7 +2,7 @@ Source: keystore
 Section: admin
 Priority: optional
 Maintainer: Autistici/Inventati <debian@autistici.org>
-Build-Depends: debhelper (>=9), golang-go, dh-systemd, dh-golang
+Build-Depends: debhelper (>=9), golang-any (>=1.11), dh-systemd, dh-golang
 Standards-Version: 3.9.6
 
 Package: keystored
diff --git a/debian/rules b/debian/rules
index edf0c4a7026e27253226af3ca28946ac8e95428d..48180b0b72aed998ae363500d26cd021dd69212f 100755
--- a/debian/rules
+++ b/debian/rules
@@ -7,7 +7,7 @@ export DH_GOLANG_EXCLUDES = vendor
 %:
 	dh $@ --with systemd --with golang --buildsystem golang
 
-override_dh_install:
-	rm -fr $(CURDIR)/debian/tmp/usr/share/gocode
-	dh_install
+override_dh_auto_install:
+	dh_auto_install
+	$(RM) -rv debian/tmp/usr/share/gocode