Stop assuming the build target based on architecture
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
FROM amd64/debian:buster
|
||||
|
||||
ENV TARGET=desktop
|
||||
|
||||
COPY scripts/install-base-deps.sh /opt/scripts/
|
||||
RUN /bin/bash -c /opt/scripts/install-base-deps.sh && \
|
||||
apt-get install -y --no-install-recommends libwayland-dev wayland-protocols libva-dev libvdpau-dev && \
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
FROM nvcr.io/nvidia/l4t-base:r32.3.1
|
||||
|
||||
ENV TARGET=l4t
|
||||
|
||||
COPY scripts/install-base-deps.sh /opt/scripts/
|
||||
RUN /bin/bash -c /opt/scripts/install-base-deps.sh && \
|
||||
curl -1sLf 'https://dl.cloudsmith.io/public/moonlight-game-streaming/moonlight-l4t/setup.deb.sh' | bash && \
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
FROM arm32v7/debian:buster
|
||||
|
||||
ENV TARGET=rpi
|
||||
|
||||
COPY scripts/install-base-deps.sh /opt/scripts/
|
||||
RUN /bin/bash -c /opt/scripts/install-base-deps.sh && \
|
||||
apt-get install -y --no-install-recommends gnupg && \
|
||||
|
||||
@@ -21,4 +21,4 @@ else
|
||||
echo Built Docker image - cgutman/moonlight-packaging:$TAG_NAME
|
||||
fi
|
||||
|
||||
docker run --rm --mount type=bind,source="$(pwd)"/$OUT_DIR,target=/out --mount type=bind,source="$(pwd)"/debian,target=/opt/debian -e COMMIT="$1" cgutman/moonlight-packaging:$TAG_NAME
|
||||
docker run --rm --mount type=bind,source="$(pwd)"/$OUT_DIR,target=/out --mount type=bind,source="$(pwd)"/debian,target=/opt/debian -e COMMIT="$1" cgutman/moonlight-packaging:$TAG_NAME
|
||||
|
||||
@@ -21,4 +21,4 @@ else
|
||||
echo Built Docker image - cgutman/moonlight-packaging:$TAG_NAME
|
||||
fi
|
||||
|
||||
docker run --rm --mount type=bind,source="$(pwd)"/$OUT_DIR,target=/out --mount type=bind,source="$(pwd)"/debian,target=/opt/debian -e COMMIT="$1" cgutman/moonlight-packaging:$TAG_NAME
|
||||
docker run --rm --mount type=bind,source="$(pwd)"/$OUT_DIR,target=/out --mount type=bind,source="$(pwd)"/debian,target=/opt/debian -e COMMIT="$1" cgutman/moonlight-packaging:$TAG_NAME
|
||||
|
||||
4
debian/control
vendored
4
debian/control
vendored
@@ -3,9 +3,9 @@ Maintainer: Cameron Gutman <aicommander@gmail.com>
|
||||
Section: misc
|
||||
Priority: optional
|
||||
Standards-Version: 4.3.0
|
||||
Build-Depends: debhelper (>= 10), libssl-dev, qtbase5-dev, qtquickcontrols2-5-dev, qtdeclarative5-dev, libqt5svg5-dev, libxkbcommon-dev, libopus-dev, libgbm-dev, libdrm-dev, libfreetype6-dev, libasound2-dev, libdbus-1-dev, libegl1-mesa-dev, libgl1-mesa-dev, libgles2-mesa-dev, libglu1-mesa-dev, libibus-1.0-dev, libpulse-dev, libudev-dev, libx11-dev, libxcursor-dev, libxext-dev, libxi-dev, libxinerama-dev, libxrandr-dev, libxss-dev, libxt-dev, libxv-dev, libxxf86vm-dev, libwayland-dev [amd64], wayland-protocols [amd64], libva-dev [amd64], libvdpau-dev [amd64], libraspberrypi-dev [armhf] | rbp-userland-dev-osmc [armhf], libnvmpi1.0.0 [arm64]
|
||||
Build-Depends: debhelper (>= 10), libssl-dev, qtbase5-dev, qtquickcontrols2-5-dev, qtdeclarative5-dev, libqt5svg5-dev, libxkbcommon-dev, libopus-dev, libgbm-dev, libdrm-dev, libfreetype6-dev, libasound2-dev, libdbus-1-dev, libegl1-mesa-dev, libgl1-mesa-dev, libgles2-mesa-dev, libglu1-mesa-dev, libibus-1.0-dev, libpulse-dev, libudev-dev, libx11-dev, libxcursor-dev, libxext-dev, libxi-dev, libxinerama-dev, libxrandr-dev, libxss-dev, libxt-dev, libxv-dev, libxxf86vm-dev, EXTRA_BUILD_DEPS
|
||||
|
||||
Package: moonlight-qt
|
||||
Architecture: any
|
||||
Depends: libraspberrypi0 [armhf] | rbp-userland-osmc [armhf], qml-module-qtquick2, qml-module-qtquick-controls2, qml-module-qtquick-layouts, qml-module-qtquick-window2, ${shlibs:Depends}, ${misc:Depends}
|
||||
Depends: qml-module-qtquick2, qml-module-qtquick-controls2, qml-module-qtquick-layouts, qml-module-qtquick-window2, ${shlibs:Depends}, ${misc:Depends}, EXTRA_DEPS
|
||||
Description: NVIDIA GameStream client
|
||||
|
||||
@@ -2,18 +2,17 @@ set -e
|
||||
|
||||
BASE_FFMPEG_ARGS="--enable-pic --enable-static --disable-shared --disable-all --enable-avcodec --enable-decoder=h264 --enable-decoder=hevc --enable-libdrm --enable-decoder=h264_v4l2m2m --enable-decoder=hevc_v4l2m2m --extra-cflags=-I/usr/include/libdrm"
|
||||
|
||||
ARCH=`uname -m`
|
||||
echo "Building dependencies for $ARCH"
|
||||
if [ "$ARCH" == "armv7l" ]; then
|
||||
echo "Building dependencies for $TARGET"
|
||||
if [ "$TARGET" == "rpi" ]; then
|
||||
# Copy libraspberrypi-dev pkgconfig files into the default location
|
||||
mkdir -p /usr/local/lib/pkgconfig
|
||||
cp /opt/vc/lib/pkgconfig/* /usr/local/lib/pkgconfig/
|
||||
# Enable MMAL decoders
|
||||
EXTRA_FFMPEG_ARGS="--enable-mmal --enable-decoder=h264_mmal --disable-rpi --enable-sand --enable-libudev --enable-v4l2-request --enable-hwaccel=h264_v4l2request --enable-hwaccel=hevc_v4l2request"
|
||||
elif [ "$ARCH" == "aarch64" ]; then
|
||||
elif [ "$TARGET" == "l4t" ]; then
|
||||
# Enable NVMPI decoders
|
||||
EXTRA_FFMPEG_ARGS="--enable-nvmpi --enable-decoder=h264_nvmpi --enable-decoder=hevc_nvmpi"
|
||||
elif [ "$ARCH" == "x86_64" ]; then
|
||||
elif [ "$TARGET" == "desktop" ]; then
|
||||
# We need to install the NVDEC headers
|
||||
cd /opt/nv-codec-headers
|
||||
make install
|
||||
@@ -21,7 +20,7 @@ elif [ "$ARCH" == "x86_64" ]; then
|
||||
# Enable VAAPI, VDPAU, and NVDEC decoders
|
||||
EXTRA_FFMPEG_ARGS="--enable-nvdec --enable-hwaccel=h264_nvdec --enable-hwaccel=hevc_nvdec --enable-hwaccel=h264_vaapi --enable-hwaccel=hevc_vaapi --enable-hwaccel=h264_vdpau --enable-hwaccel=hevc_vdpau"
|
||||
else
|
||||
echo "Unrecognized architecture: $ARCH"
|
||||
echo "Unrecognized target: $TARGET"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
@@ -12,6 +12,19 @@ git -c submodule.libs.update=none submodule update --init --recursive
|
||||
# Grab the verson metadata
|
||||
VERSION=`cat app/version.txt`
|
||||
|
||||
# Determine extra target-specific dependencies
|
||||
if [ "$TARGET" == "rpi" ]; then
|
||||
EXTRA_BUILD_DEPS="libraspberrypi-dev | rbp-userland-dev-osmc"
|
||||
EXTRA_DEPS="libraspberrypi0 | rbp-userland-osmc"
|
||||
elif [ "$TARGET" == "l4t" ]; then
|
||||
EXTRA_BUILD_DEPS="libnvmpi1.0.0"
|
||||
elif [ "$TARGET" == "desktop" ]; then
|
||||
EXTRA_BUILD_DEPS="libwayland-dev, wayland-protocols, libva-dev, libvdpau-dev"
|
||||
else
|
||||
echo "Unrecognized target: $TARGET"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Create a build directory
|
||||
mkdir /opt/build
|
||||
|
||||
@@ -30,6 +43,11 @@ tar xvf ../moonlight-qt_$VERSION.orig.tar.gz
|
||||
# Copy the debian directory into the build directory
|
||||
cp -r /opt/debian .
|
||||
|
||||
# Patch the control file with target-specific dependencies
|
||||
sed -i "s/EXTRA_BUILD_DEPS/$EXTRA_BUILD_DEPS/g" debian/control
|
||||
sed -i "s/EXTRA_DEPS/$EXTRA_DEPS/g" debian/control
|
||||
cat debian/control
|
||||
|
||||
# Build the package
|
||||
debuild -us -uc
|
||||
|
||||
|
||||
Reference in New Issue
Block a user