This commit is contained in:
Bert van der Weerd 2022-10-28 01:52:00 +02:00
parent 3f4175dcc0
commit af06eb9fbb
No known key found for this signature in database
GPG key ID: 73370A0B9E5516B0
2 changed files with 20 additions and 12 deletions

View file

@ -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

View file

@ -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