diff --git a/.github/workflows/cut-video-daemon-dev.yaml b/.github/workflows/cut-video-daemon-dev.yaml new file mode 100644 index 0000000..3572abf --- /dev/null +++ b/.github/workflows/cut-video-daemon-dev.yaml @@ -0,0 +1,40 @@ +name: Build and Package DEB + +on: + push: + branches: + - main + - add-debian-distribution + tags: + - '*' + +jobs: + build_and_package: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Install Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + profile: minimal + override: true + + - name: Install Dependencies + run: | + sudo apt-get update + sudo apt-get install -y pkg-config libclang-dev libvpx-dev libasound2-dev libv4l-dev cmake + + + - name: Build and Create DEB Package + run: | + cargo install cargo-deb + cd video-daemon + cargo deb + + - uses: actions/upload-artifact@v2 + with: + name: video-daemon.deb + path: video-daemon/target/debian/*.deb diff --git a/video-daemon/Cargo.toml b/video-daemon/Cargo.toml index 64a3966..ac51028 100644 --- a/video-daemon/Cargo.toml +++ b/video-daemon/Cargo.toml @@ -2,9 +2,20 @@ name = "video-daemon" version = "0.1.0" edition = "2021" +description = "Stream audio and video to the videocall-rs backend" +license = "MIT" +authors = [ + "Griffin Obeid ", + "Dario Lencina ", +] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html +[package.metadata.deb] +maintainer = "Dario Lencina " +license-file = ["../LICENSE.md", "4"] +depends = "libvpx7 (>= 1.11.0), libvpx-dev (>= 1.11.0), libc6 (>= 2.34), libasound2-dev (>=1.2.8), libv4l-dev (>=1.22.1)" + [dependencies] anyhow = "1.0.75" base64 = "0.21.4" diff --git a/video-daemon/README.md b/video-daemon/README.md index 7a19a74..09a54ac 100644 --- a/video-daemon/README.md +++ b/video-daemon/README.md @@ -5,7 +5,7 @@ ### Dependencies ```sh -sudo apt install build-essential pkg-config libclang-dev libvpx-dev libasound2-dev cmake +sudo apt install build-essential pkg-config libclang-dev libvpx-dev libasound2-dev libv4l-dev cmake ``` ## Running locally @@ -20,3 +20,10 @@ RUST_LOG=info cargo run -- --user-id --video-device-index 2 --meeting- URL can be your local webtransport server or prod https://transport.rustlemania.com ``` + +# Compile deb + +1. Install `cargo-deb` with `cargo install cargo-deb` +2. run `cargo deb` this will generate the deb file at `target/debian/video-daemon...deb` +3. Verify dependencies: `dpkg-deb -I ` +4. Install deb file: `sudo dpkg -i ` diff --git a/video-daemon/check_versions.sh b/video-daemon/check_versions.sh new file mode 100755 index 0000000..bd3de72 --- /dev/null +++ b/video-daemon/check_versions.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +# List of packages to check +packages=( + "build-essential" + "pkg-config" + "libclang-dev" + "libvpx-dev" + "libasound2-dev" + "cmake" + "libv4l-dev" +) + +# Function to check the version of a package +check_package_version() { + package=$1 + version=$(dpkg-query -W -f='${Version}\n' $package 2>/dev/null) + if [ -z "$version" ]; then + echo "$package is not installed." + else + echo "$package version: $version" + fi +} + +# Check the version of each package +for package in "${packages[@]}"; do + check_package_version $package +done