FROM almalinux:9
RUN dnf clean all
RUN dnf update -y
RUN dnf install -y epel-release
RUN dnf install -y 'dnf-command(config-manager)'
RUN dnf config-manager --set-enabled crb
RUN dnf config-manager --set-enabled appstream
RUN dnf install -y dnf-command\(builddep\) rpmdevtools && \
    dnf install -y mock
RUN yum install -y wget && \
    wget https://repo.almalinux.org/almalinux/9/devel/x86_64/os/Packages/uuid-c++-devel-1.6.2-55.el9.x86_64.rpm && \
    yum localinstall -y uuid-c++-devel-1.6.2-55.el9.x86_64.rpm && \
    rm -f uuid-c++-devel-1.6.2-55.el9.x86_64.rpm
RUN yum install -y xorg-x11-xauth
RUN dnf install -y \
        git \
        rpm-build \
        tar \
        make \
        autoconf \
        automake \
        nasm \
        speexdsp-devel \
        pulseaudio-libs-devel \
        libcanberra-devel \
        libcurl-devel \
        libtool \
        mesa-libgbm-devel \
        mesa-dri-drivers \
        dbus-devel \
        expat-devel \
        pcre-devel \
        yaml-cpp-devel \
        libXext-devel \
        libXfixes-devel \
        yasm \
        speex-devel \
        gsm-devel \
        chrpath \
        check \
        astyle \
        gettext-devel \
        gcc-c++ \
        which \
        alsa-lib-devel \
        systemd-devel \
        libuuid-devel \
        uuid-devel \
        gnutls-devel \
        nettle-devel \
        opus-devel \
        patch \
        jsoncpp-devel \
        libnatpmp-devel \
        webkitgtk4-devel \
        cryptopp-devel \
        libva-devel \
        libvdpau-devel \
        msgpack-devel \
        NetworkManager-libnm-devel \
        openssl-devel \
        clutter-devel \
        clutter-gtk-devel \
        libappindicator-gtk3-devel \
        libnotify-devel \
        libargon2-devel \
        libsndfile-devel \
        libdrm \
        gperf \
        bison \
        clang16-devel \
        llvm16-devel \
        nodejs \
        flex \
        gstreamer1 gstreamer1-devel \
        gstreamer1-plugins-base-devel \
        gstreamer1-plugins-good \
        gstreamer1-plugins-bad-free-devel \
        nss-devel \
        libxcb* \
        libxkb* \
        libX11-devel \
        vulkan-devel \
        libXrender-devel \
        xcb-util-* \
        xz \
        xkeyboard-config \
        libnotify \
        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"]
