-
Notifications
You must be signed in to change notification settings - Fork 4
Multiarch
coslyk edited this page Mar 31, 2020
·
4 revisions
The automation script uses cross compiling to build packages for non-amd64 platforms, so it is important to make the package cross-build friendly. You can follow the official guideline from Debian.
In general:
- If you don't overwrite any building rules in
debian-template/rules
, great! You don't need to care anything. The script will set up the cross compiling environment and all parameters for you. - If you overwrite something in
debian-template/rules
, then you need to care about the architecture-specific commands.
In debian-template
, you can use ##ARCH
to refer the CPU architecture. It will be replaced with the architecture name like amd64
armhf
.
The building steps are very similar to the normal buiding, except that we use a different Docker image for cross compiling.
You need to build the Docker image first:
docker run --rm --privileged multiarch/qemu-user-static:register --reset
docker build -t docker-deb-builder:buster-armhf -f docker-deb-builder/Dockerfile-debian-buster-armhf .
Then run the building script:
DEBIAN_ARCH=armhf ./build-deb.sh recipes/your-package-name
Just add the only_arches
to the YAML file like the following:
only_arches:
- amd64
- i386
- Rust projects are not supported.
- Electron apps are only supported under
amd64
i386
arm64
andarmhf
. -
npm install
may fail when compiling native node modules. (Yarn is OK)