# Alpine packaging This directory holds the recipe for the Beaver `.apk` for Alpine based distribution. Docker images are provided for 2 targets: - Cross compiling to aarch64. This produce an apk suitable for postmarketOS devices. - Regular compilation for x86_64 or aarch64, without cross-compiling. ## Building the package Use the relevant script for each target: - `./scripts/build-apk-cross.sh `. Using `production` for the profile produces a more optimized build, but takes a long time and a lot of memory to link. - `./scripts/build-apk.sh `. ## Linker All three builder images link with [wild](https://github.com/wild-linker/wild) instead of GNU ld (what the native images used to get by default) or lld (what the cross image used). Linking `beavershell` is the longest single step of a rebuild, so this is where build time goes. `support/docker/install-wild.sh` installs it, pinned by version and sha256; that script is also where the version gets bumped. It is not an apk package, so like rustup it is installed out-of-band and deliberately absent from `makedepends` — `APKBUILD.in` probes for it and falls back to the toolchain default, which keeps the recipe usable on a plain Alpine builder (e.g. pmbootstrap). The C/C++ sub-builds (mozjs, mozangle) still use their own defaults; only the final Rust link was switched. ## Layout produced by the .apk ``` /usr/bin/beavershell /usr/bin/beaver-session /usr/share/beaver/ui/ /usr/share/beaver/resources/ /usr/share/applications/beaver.desktop /usr/share/wayland-sessions/beaver.desktop /usr/share/icons/hicolor/{48,64,128,256,512}x*/apps/beaver.png ```