FROM fedora:37

RUN dnf clean all
RUN dnf update -y

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

RUN dnf groupinstall -y "X Software Development"

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 \
        dbus-c++-devel \
        dbus-devel \
        libXext-devel \
        libXfixes-devel \
        yasm \
        python2.7 \
        python3-html5lib \
        speex-devel \
        gsm-devel \
        chrpath \
        check \
        astyle \
        uuid-c++-devel \
        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 \
        libupnp-devel \
        qrencode-devel \
        libargon2-devel \
        libsndfile-devel \
        libdrm \
        gperf \
        bison \
        clang \
        clang-devel \
        llvm-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 \
        clang \
        cmake \
        fmt-devel \
        cups-devel #Chromium for Qt

ADD extras/packaging/gnu-linux/scripts/build-package-rpm.sh /opt/build-package-rpm.sh

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