Add web build to Ubuntu armhf package build
This commit is contained in:
parent
03d60438e2
commit
601a50e430
|
@ -40,6 +40,12 @@ RUN rm /etc/apt/sources.list \
|
||||||
&& ln -fs /usr/share/zoneinfo/America/Toronto /etc/localtime \
|
&& ln -fs /usr/share/zoneinfo/America/Toronto /etc/localtime \
|
||||||
&& apt-get install -y gcc-6-source libstdc++6-armhf-cross binutils-arm-linux-gnueabihf bison flex libtool gdb sharutils netbase libcloog-isl-dev libmpc-dev libmpfr-dev libgmp-dev systemtap-sdt-dev autogen expect chrpath zlib1g-dev zip libc6-dev:armhf linux-libc-dev:armhf libgcc1:armhf libcurl4-openssl-dev:armhf libfontconfig1-dev:armhf libfreetype6-dev:armhf liblttng-ust0:armhf libstdc++6:armhf libssl-dev:armhf
|
&& apt-get install -y gcc-6-source libstdc++6-armhf-cross binutils-arm-linux-gnueabihf bison flex libtool gdb sharutils netbase libcloog-isl-dev libmpc-dev libmpfr-dev libgmp-dev systemtap-sdt-dev autogen expect chrpath zlib1g-dev zip libc6-dev:armhf linux-libc-dev:armhf libgcc1:armhf libcurl4-openssl-dev:armhf libfontconfig1-dev:armhf libfreetype6-dev:armhf liblttng-ust0:armhf libstdc++6:armhf libssl-dev:armhf
|
||||||
|
|
||||||
|
# Install yarn package manager
|
||||||
|
RUN wget -q -O- https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
|
||||||
|
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \
|
||||||
|
&& apt update \
|
||||||
|
&& apt install -y yarn
|
||||||
|
|
||||||
# Link to docker-build script
|
# Link to docker-build script
|
||||||
RUN ln -sf ${PLATFORM_DIR}/docker-build.sh /docker-build.sh
|
RUN ln -sf ${PLATFORM_DIR}/docker-build.sh /docker-build.sh
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,12 @@ RUN wget https://download.visualstudio.microsoft.com/download/pr/d9f37b73-df8d-4
|
||||||
&& tar -xzf dotnet-sdk.tar.gz -C dotnet-sdk \
|
&& tar -xzf dotnet-sdk.tar.gz -C dotnet-sdk \
|
||||||
&& ln -s $( pwd )/dotnet-sdk/dotnet /usr/bin/dotnet
|
&& ln -s $( pwd )/dotnet-sdk/dotnet /usr/bin/dotnet
|
||||||
|
|
||||||
|
# Install yarn package manager
|
||||||
|
RUN wget -q -O- https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
|
||||||
|
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \
|
||||||
|
&& apt update \
|
||||||
|
&& apt install -y yarn
|
||||||
|
|
||||||
# Link to docker-build script
|
# Link to docker-build script
|
||||||
RUN ln -sf ${PLATFORM_DIR}/docker-build.sh /docker-build.sh
|
RUN ln -sf ${PLATFORM_DIR}/docker-build.sh /docker-build.sh
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,20 @@ pushd ${SOURCE_DIR}
|
||||||
# Remove build-dep for dotnet-sdk-2.2, since it's not a package in this image
|
# Remove build-dep for dotnet-sdk-2.2, since it's not a package in this image
|
||||||
sed -i '/dotnet-sdk-2.2,/d' debian/control
|
sed -i '/dotnet-sdk-2.2,/d' debian/control
|
||||||
|
|
||||||
|
# Clone down and build Web frontend
|
||||||
|
web_build_dir="$( mktemp -d )"
|
||||||
|
web_target="${SOURCE_DIR}/MediaBrowser.WebDashboard/jellyfin-web"
|
||||||
|
git clone https://github.com/jellyfin/jellyfin-web.git ${web_build_dir}/
|
||||||
|
pushd ${web_build_dir}
|
||||||
|
if [[ -n ${web_branch} ]]; then
|
||||||
|
checkout -b origin/${web_branch}
|
||||||
|
fi
|
||||||
|
yarn install
|
||||||
|
yarn build
|
||||||
|
mkdir -p ${web_target}
|
||||||
|
mv dist/* ${web_target}/
|
||||||
|
popd
|
||||||
|
|
||||||
# Build DEB
|
# Build DEB
|
||||||
export CONFIG_SITE=/etc/dpkg-cross/cross-config.${ARCH}
|
export CONFIG_SITE=/etc/dpkg-cross/cross-config.${ARCH}
|
||||||
dpkg-buildpackage -us -uc -aarmhf
|
dpkg-buildpackage -us -uc -aarmhf
|
||||||
|
|
|
@ -2,6 +2,12 @@
|
||||||
|
|
||||||
source ../common.build.sh
|
source ../common.build.sh
|
||||||
|
|
||||||
|
args="${@}"
|
||||||
|
declare -a docker_envvars
|
||||||
|
for arg in ${args}; do
|
||||||
|
docker_envvars+=("-e ${arg}")
|
||||||
|
done
|
||||||
|
|
||||||
ARCH="$( arch )"
|
ARCH="$( arch )"
|
||||||
WORKDIR="$( pwd )"
|
WORKDIR="$( pwd )"
|
||||||
|
|
||||||
|
@ -35,7 +41,7 @@ mkdir -p "${package_temporary_dir}"
|
||||||
# Set up the build environment Docker image
|
# Set up the build environment Docker image
|
||||||
${docker_sudo} docker build ../.. -t "${image_name}" -f ./${DOCKERFILE}
|
${docker_sudo} docker build ../.. -t "${image_name}" -f ./${DOCKERFILE}
|
||||||
# Build the DEBs and copy out to ${package_temporary_dir}
|
# Build the DEBs and copy out to ${package_temporary_dir}
|
||||||
${docker_sudo} docker run --rm -v "${package_temporary_dir}:/dist" "${image_name}"
|
${docker_sudo} docker run --rm -v "${package_temporary_dir}:/dist" "${image_name}" ${docker_envvars}
|
||||||
# Move the DEBs to the output directory
|
# Move the DEBs to the output directory
|
||||||
mkdir -p "${output_dir}"
|
mkdir -p "${output_dir}"
|
||||||
mv "${package_temporary_dir}"/deb/* "${output_dir}"
|
mv "${package_temporary_dir}"/deb/* "${output_dir}"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user