Skip to content

Instantly share code, notes, and snippets.

@3nprob
Created June 16, 2022 23:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 3nprob/754130d37c16407a2445858ede8d2313 to your computer and use it in GitHub Desktop.
Save 3nprob/754130d37c16407a2445858ede8d2313 to your computer and use it in GitHub Desktop.
building gstreamer-spotify-rs
FROM rust:bullseye
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
ca-certificates \
git \
clang \
pkg-config \
meson libgstreamer-plugins-base1.0-dev gstreamer1.0-plugins-good debhelper \
cairo-5c \
libcsound64-dev \
libdav1d-dev \
libgstreamer1.0-dev \
libpango1.0-dev \
libssl-dev
RUN useradd -m user -u 1000 -s /bin/bash
USER user
WORKDIR /home/user
RUN cargo install cargo-deb
ARG GIT_REPO=https://github.com/3nprob/gst-plugins-rs.git
ARG GIT_BRANCH=spotify-uri-handler
RUN git clone --depth 1 -b $GIT_BRANCH $GIT_REPO
RUN cd gst-plugins-rs && \
cargo build --no-default-features -p gst-plugin-spotify -r && \
env OPENSSL_DIR=/ OPENSSL_LIB_DIR=/usr/lib/x86_64-linux-gnu/ OPENSSL_INCLUDE_DIR=/usr/include/openssl/ CSOUND_LIB_DIR=/usr/lib/x86_64-linux-gnu/ cargo deb --no-build -p gst-plugin-spotify -v
USER root
RUN mv /home/user/gst-plugins-rs/target/debian/gst-plugin-spotify_0.9.0_amd64.deb /
FROM debian:bookworm
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
ca-certificates \
git \
cargo \
clang \
pkg-config \
meson libgstreamer-plugins-base1.0-dev gstreamer1.0-plugins-good debhelper \
librust-gtk4-dev \
cairo-5c \
libcsound64-dev \
libdav1d-dev \
libgstreamer1.0-dev \
libpango1.0-dev \
libssl-dev
RUN useradd -m user -u 1000 -s /bin/bash
USER user
WORKDIR /home/user
RUN cargo install cargo-deb
ARG GIT_REPO=https://github.com/3nprob/gst-plugins-rs.git
ARG GIT_BRANCH=spotify-uri-handler
RUN git clone --depth 1 -b $GIT_BRANCH $GIT_REPO && \
cd gst-plugins-rs && \
env OPENSSL_DIR=/ OPENSSL_LIB_DIR=/usr/lib/x86_64-linux-gnu/ OPENSSL_INCLUDE_DIR="/usr/include/openssl/" CSOUND_LIB_DIR=/usr/lib/x86_64-linux-gnu/ cargo deb -p gst-plugin-spotify -v -- -Z unstable-options
USER root
RUN mv /home/user/gst-plugins-rs/target/debian/gst-plugin-spotify_0.9.0_amd64.deb /
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment