Initial drop of mostly-working containers
This commit is contained in:
12
.gitmodules
vendored
Normal file
12
.gitmodules
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
[submodule "userland"]
|
||||
path = userland
|
||||
url = https://github.com/raspberrypi/userland.git
|
||||
[submodule "FFmpeg"]
|
||||
path = FFmpeg
|
||||
url = https://github.com/cgutman/FFmpeg.git
|
||||
[submodule "nv-codec-headers"]
|
||||
path = nv-codec-headers
|
||||
url = https://git.videolan.org/git/ffmpeg/nv-codec-headers.git
|
||||
[submodule "jetson-ffmpeg"]
|
||||
path = jetson-ffmpeg
|
||||
url = https://github.com/cgutman/jetson-ffmpeg.git
|
||||
23
Dockerfile.bionic.aarch64
Normal file
23
Dockerfile.bionic.aarch64
Normal file
@@ -0,0 +1,23 @@
|
||||
FROM nvcr.io/nvidia/l4t-base:r32.3.1
|
||||
|
||||
RUN set -ex && \
|
||||
export DEBIAN_FRONTEND=noninteractive && \
|
||||
apt-get update && \
|
||||
apt-get install -y g++ make devscripts debhelper coreutils git wget nasm cmake libv4l-dev && \
|
||||
apt-get install -y libssl-dev qtbase5-dev qtquickcontrols2-5-dev qtdeclarative5-dev libqt5svg5-dev libgl1-mesa-dev libegl1-mesa-dev libxkbcommon-dev wayland-protocols libopus-dev libva-dev libvdpau-dev libsdl2-dev libsdl2-ttf-dev && \
|
||||
apt-get clean -y && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY userland /opt/userland
|
||||
COPY FFmpeg /opt/FFmpeg
|
||||
COPY jetson-ffmpeg /opt/jetson-ffmpeg
|
||||
COPY nv-codec-headers /opt/nv-codec-headers
|
||||
|
||||
COPY scripts/build-deps.sh /opt/scripts/
|
||||
RUN /bin/bash -c /opt/scripts/build-deps.sh
|
||||
|
||||
COPY scripts/build-package.sh /opt/scripts/
|
||||
COPY debian /opt/debian
|
||||
|
||||
VOLUME "/out"
|
||||
ENTRYPOINT [ "/bin/bash", "-c", "/opt/scripts/build-package.sh" ]
|
||||
23
Dockerfile.buster.amd64
Normal file
23
Dockerfile.buster.amd64
Normal file
@@ -0,0 +1,23 @@
|
||||
FROM amd64/debian:buster
|
||||
|
||||
RUN set -ex && \
|
||||
export DEBIAN_FRONTEND=noninteractive && \
|
||||
apt-get update && \
|
||||
apt-get install -y g++ make devscripts debhelper coreutils git wget nasm cmake libv4l-dev && \
|
||||
apt-get install -y libssl-dev qtbase5-dev qtquickcontrols2-5-dev qtdeclarative5-dev libqt5svg5-dev libgl1-mesa-dev libegl1-mesa-dev libxkbcommon-dev wayland-protocols libopus-dev libva-dev libvdpau-dev libsdl2-dev libsdl2-ttf-dev && \
|
||||
apt-get clean -y && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY userland /opt/userland
|
||||
COPY FFmpeg /opt/FFmpeg
|
||||
COPY jetson-ffmpeg /opt/jetson-ffmpeg
|
||||
COPY nv-codec-headers /opt/nv-codec-headers
|
||||
|
||||
COPY scripts/build-deps.sh /opt/scripts/
|
||||
RUN /bin/bash -c /opt/scripts/build-deps.sh
|
||||
|
||||
COPY scripts/build-package.sh /opt/scripts/
|
||||
COPY debian /opt/debian
|
||||
|
||||
VOLUME "/out"
|
||||
ENTRYPOINT [ "/bin/bash", "-c", "/opt/scripts/build-package.sh" ]
|
||||
23
Dockerfile.buster.armhf
Normal file
23
Dockerfile.buster.armhf
Normal file
@@ -0,0 +1,23 @@
|
||||
FROM arm32v7/debian:buster
|
||||
|
||||
RUN set -ex && \
|
||||
export DEBIAN_FRONTEND=noninteractive && \
|
||||
apt-get update && \
|
||||
apt-get install -y g++ make devscripts debhelper coreutils git wget nasm cmake libv4l-dev && \
|
||||
apt-get install -y libssl-dev qtbase5-dev qtquickcontrols2-5-dev qtdeclarative5-dev libqt5svg5-dev libgl1-mesa-dev libegl1-mesa-dev libxkbcommon-dev wayland-protocols libopus-dev libva-dev libvdpau-dev libsdl2-dev libsdl2-ttf-dev && \
|
||||
apt-get clean -y && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY userland /opt/userland
|
||||
COPY FFmpeg /opt/FFmpeg
|
||||
COPY jetson-ffmpeg /opt/jetson-ffmpeg
|
||||
COPY nv-codec-headers /opt/nv-codec-headers
|
||||
|
||||
COPY scripts/build-deps.sh /opt/scripts/
|
||||
RUN /bin/bash -c /opt/scripts/build-deps.sh
|
||||
|
||||
COPY scripts/build-package.sh /opt/scripts/
|
||||
COPY debian /opt/debian
|
||||
|
||||
VOLUME "/out"
|
||||
ENTRYPOINT [ "/bin/bash", "-c", "/opt/scripts/build-package.sh" ]
|
||||
1
FFmpeg
Submodule
1
FFmpeg
Submodule
Submodule FFmpeg added at 747429ea1c
5
debian/changelog
vendored
Normal file
5
debian/changelog
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
moonlight (1.2.1-1) UNRELEASED; urgency=low
|
||||
|
||||
* Initial release.
|
||||
|
||||
-- Cameron Gutman <aicommander@gmail.com> Mon, 03 Feb 2020 15:08:49 -0800
|
||||
1
debian/compat
vendored
Normal file
1
debian/compat
vendored
Normal file
@@ -0,0 +1 @@
|
||||
10
|
||||
11
debian/control
vendored
Normal file
11
debian/control
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
Source: moonlight
|
||||
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, libgl1-mesa-dev, libegl1-mesa-dev, libxkbcommon-dev, wayland-protocols, libopus-dev, libva-dev, libvdpau-dev, libsdl2-dev, libsdl2-ttf-dev
|
||||
|
||||
Package: moonlight
|
||||
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}
|
||||
Description: NVIDIA GameStream client
|
||||
22
debian/copyright
vendored
Normal file
22
debian/copyright
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: moonlight-qt
|
||||
Source: https://github.com/moonlight-stream/moonlight-qt
|
||||
|
||||
Files: *
|
||||
Copyright: 2018-2020 Cameron Gutman <aicommander@gmail.com>
|
||||
License: GPL-3+
|
||||
This package is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
.
|
||||
This package is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
.
|
||||
On Debian systems, the complete text of the GNU General
|
||||
Public License version 3 can be found in "/usr/share/common-licenses/GPL-3".
|
||||
4
debian/rules
vendored
Executable file
4
debian/rules
vendored
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/usr/bin/make -f
|
||||
export QT_SELECT := qt5
|
||||
%:
|
||||
dh $@
|
||||
1
debian/source/format
vendored
Executable file
1
debian/source/format
vendored
Executable file
@@ -0,0 +1 @@
|
||||
3.0 (quilt)
|
||||
1
jetson-ffmpeg
Submodule
1
jetson-ffmpeg
Submodule
Submodule jetson-ffmpeg added at caac989993
1
nv-codec-headers
Submodule
1
nv-codec-headers
Submodule
Submodule nv-codec-headers added at 0cd5c2b7c3
47
scripts/build-deps.sh
Executable file
47
scripts/build-deps.sh
Executable file
@@ -0,0 +1,47 @@
|
||||
set -e
|
||||
|
||||
BASE_FFMPEG_ARGS="--enable-pic --enable-static --disable-shared --disable-all --enable-avcodec --enable-decoder=h264 --enable-decoder=hevc --enable-hwaccel=h264_vaapi --enable-hwaccel=hevc_vaapi --enable-hwaccel=h264_vdpau --enable-hwaccel=hevc_vdpau"
|
||||
|
||||
ARCH=`uname -m`
|
||||
echo "Building dependencies for $ARCH"
|
||||
if [ "$ARCH" == "armv7l" ]; then
|
||||
# We need to link against some Raspberry Pi userland binaries
|
||||
cd /opt/userland
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DARM64=0 -DVMCS_INSTALL_PREFIX=/usr ..
|
||||
make -j$(nproc)
|
||||
make install
|
||||
|
||||
# Enable MMAL decoders
|
||||
EXTRA_FFMPEG_ARGS="--enable-mmal --enable-decoder=h264_mmal"
|
||||
elif [ "$ARCH" == "aarch64" ]; then
|
||||
# We need to build libnvmpi
|
||||
cd /opt/jetson-ffmpeg
|
||||
mkdir build
|
||||
cd build
|
||||
cmake ..
|
||||
make -j$(nproc)
|
||||
make install
|
||||
|
||||
# We need to patch ffmpeg to add NVMPI support
|
||||
cd /opt/FFmpeg
|
||||
git apply /opt/jetson-ffmpeg/ffmpeg_nvmpi.patch
|
||||
|
||||
# Enable NVMPI decoders
|
||||
EXTRA_FFMPEG_ARGS="--enable-nvmpi --enable-decoder=h264_nvmpi --enable-decoder=hevc_nvmpi"
|
||||
elif [ "$ARCH" == "x86_64" ]; then
|
||||
# We need to install the NVDEC headers
|
||||
cd /opt/nv-codec-headers
|
||||
make install PREFIX=/usr
|
||||
|
||||
EXTRA_FFMPEG_ARGS="--enable-nvdec --enable-hwaccel=h264_nvdec --enable-hwaccel=hevc_nvdec"
|
||||
else
|
||||
echo "Unrecognized architecture: $ARCH"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd /opt/FFmpeg
|
||||
./configure $BASE_FFMPEG_ARGS $EXTRA_FFMPEG_ARGS
|
||||
make -j$(nproc)
|
||||
make install
|
||||
42
scripts/build-package.sh
Executable file
42
scripts/build-package.sh
Executable file
@@ -0,0 +1,42 @@
|
||||
set -e
|
||||
|
||||
# Check out the source
|
||||
[[ ! -z "$BRANCH" ]] || BRANCH="master"
|
||||
echo "Checking out $BRANCH"
|
||||
git clone --recursive --branch $BRANCH --depth 1 https://github.com/moonlight-stream/moonlight-qt.git
|
||||
cd moonlight-qt
|
||||
git show HEAD
|
||||
|
||||
# Grab the verson metadata
|
||||
VERSION=`cat app/version.txt`
|
||||
|
||||
# Create a build directory
|
||||
mkdir /opt/build
|
||||
|
||||
# Nuke the libs folder - not needed for Linux
|
||||
git rm -r libs
|
||||
git commit -m "Remove pre-built libraries"
|
||||
|
||||
# Generate source tarball
|
||||
scripts/generate-src.sh
|
||||
|
||||
# Move the tarball into the build directory
|
||||
mv build/source/MoonlightSrc-$VERSION.tar.gz /opt/build/moonlight_$VERSION.orig.tar.gz
|
||||
|
||||
# Extract the tarball into the appropriate directory
|
||||
cd /opt/build
|
||||
mkdir moonlight-$VERSION
|
||||
cd moonlight-$VERSION
|
||||
tar xvf ../moonlight_$VERSION.orig.tar.gz
|
||||
|
||||
# Copy the debian directory into the build directory
|
||||
cp -r /opt/debian .
|
||||
|
||||
# Build the package
|
||||
debuild -us -uc
|
||||
|
||||
# Copy the output to the out directory
|
||||
cp /opt/build/* /out
|
||||
|
||||
# Done!
|
||||
echo "Build successful!"
|
||||
1
userland
Submodule
1
userland
Submodule
Submodule userland added at 06bc6daa02
Reference in New Issue
Block a user