FROM fedora:43

RUN dnf clean all
RUN dnf update -y

RUN dnf install -y dnf-command\(builddep\) rpmdevtools && \
    dnf install -y mock

RUN dnf group install -y x-software-development

RUN dnf install -y \
    git \
    make \
    autoconf \
    automake \
    nasm \
    speexdsp-devel \
    pulseaudio-libs-devel \
    libcanberra-devel \
    libcurl-devel \
    libtool \
    mesa-libgbm-devel \
    dbus-devel \
    expat-devel \
    pcre-devel \
    yaml-cpp-devel \
    yasm \
    speex-devel \
    gsm-devel \
    chrpath \
    check \
    astyle \
    uuid-c++-devel \
    gettext-devel \
    gcc14 \
    gcc14-c++ \
    which \
    alsa-lib-devel \
    systemd-devel \
    uuid-devel \
    gnutls-devel \
    nettle-devel \
    opus-devel \
    jsoncpp-devel \
    libnatpmp-devel \
    webkitgtk6.0-devel \
    cryptopp-devel \
    libva-devel \
    libvdpau-devel \
    msgpack-devel \
    NetworkManager-libnm-devel \
    openssl-devel \
    clutter-devel \
    clutter-gtk-devel \
    libappindicator-gtk3-devel \
    libnotify-devel \
    libupnp-devel \
    libargon2-devel \
    libsndfile-devel \
    gperf \
    bison \
    clang18-devel \
    llvm18-devel \
    nodejs \
    flex \
    gstreamer1-plugins-base-devel \
    gstreamer1-plugins-good \
    gstreamer1-plugins-bad-free-devel \
    nss-devel \
    libxcb* \
    libxkb* \
    vulkan-devel \
    xcb-util-* \
    wget \
    libstdc++-static \
    sqlite-devel \
    perl-generators \
    perl-English \
    libxshmfence-devel \
    ninja-build \
    cmake \
    fmt-devel \
    python3-html5lib \
    cups-devel \
    pipewire-devel

ADD extras/packaging/gnu-linux/scripts/install-ffmpeg-for-qt.sh /opt/install-ffmpeg-for-qt.sh
ADD extras/packaging/gnu-linux/scripts/build-package-rpm.sh /opt/build-package-rpm.sh

CMD ["/opt/build-package-rpm.sh"]
