diff --git a/flatpak/Makefile b/flatpak/Makefile index 2429381..8325b3f 100644 --- a/flatpak/Makefile +++ b/flatpak/Makefile @@ -1,4 +1,4 @@ -.PHONY : help fetch all clean build dir bootstrap winsdk setup-debian setup-fedora veryclean docker-build docker-run docker-clean artifacts pre-build post-package +.PHONY : help fetch all clean build dir bootstrap winsdk setup-debian setup-fedora veryclean docker-build docker-run docker-shell docker-clean artifacts pre-build post-package version:=$(shell cat version) release:=$(shell cat release) @@ -13,7 +13,7 @@ arch=x86_64 endif endif -docker_image_name=lw-linux-flatpak-$(arch) +docker_image_name=lw-linux-base-$(arch) help : @@ -32,10 +32,12 @@ help : @echo " bootstrap - try to set up the build environment." @echo " setup-debian, setup-fedora - needed packages." @echo "" - @echo " docker-build - Run 'docker build' for" $(docker_image_name) "image." - @echo " docker-run - Run LW build using 'docker run' on" $(docker_image_name) "image." - @echo " docker-clean - Remove" $(docker_image_name) "docker image." + @echo " docker-build - Run 'docker build' for " $(docker_image_name) " image." + @echo " docker-run - Run LW build using 'docker run' on then image." + @echo " docker-shell - Run a shell in the docker image." + @echo " docker-clean - Remove the docker image." @echo "" + @echo "Use arch=x86_64 (the default) or arch=aarch64 to specify the target architecture." all : dir pre-build build package post-package artifacts @@ -97,10 +99,13 @@ librewolf-$(full_version) : librewolf-$(full_version).source.tar.gz docker-build : - docker build -t $(docker_image_name) - < assets/Dockerfile + docker build --build-arg "arch=$(arch)" -t $(docker_image_name) - < assets/Dockerfile docker-run : - docker run --rm $(docker_image_name) sh -c "git pull && make fetch && make all" + docker run --rm $(docker_image_name) sh -c "git pull && make fetch && make arch=$(arch) all" + +docker-shell : + docker run -it --rm $(docker_image_name) sh -c "/bin/bash" docker-clean : docker rmi $(docker_image_name) @@ -109,7 +114,6 @@ docker-clean : bootstrap : dir - rustup target add aarch64-unknown-linux-gnu ( export t=$$(pwd)/librewolf-$(full_version) && \ cd $(mozbuild) && \ $$t/mach artifact toolchain --from-build sysroot-aarch64-linux-gnu && \ @@ -117,6 +121,7 @@ bootstrap : dir $$t/mach artifact toolchain --from-build linux64-cctools-port && \ true ) (cd librewolf-$(full_version) && ./mach --no-interactive bootstrap --application-choice=browser) + /root/cargo/bin/rustup target add aarch64-unknown-linux-gnu diff --git a/flatpak/assets/Dockerfile b/flatpak/assets/Dockerfile index c664f04..64dc118 100644 --- a/flatpak/assets/Dockerfile +++ b/flatpak/assets/Dockerfile @@ -1,12 +1,15 @@ FROM ubuntu:jammy #FROM fedora:36 +ARG arch=error + RUN apt-get -y update && apt-get -y upgrade && apt-get -y install make wget git patch #RUN dnf -y update && dnf -y install make wget git patch -WORKDIR / -RUN git clone https://gitlab.com/librewolf-community/browser/lwa.git -WORKDIR /lwa +RUN git clone https://gitlab.com/librewolf-community/browser/bsys5 +WORKDIR bsys5 +RUN git checkout flatpak +WORKDIR flatpak -RUN make setup-debian && make fetch && make bootstrap && make veryclean +RUN make setup-debian && make fetch && make arch=$arch bootstrap && make veryclean #RUN make setup-fedora && make fetch && make bootstrap && make veryclean