FROM fedora:40

RUN dnf update -y && \
    dnf install -y \
        curl \
        gcc \
        gcc-c++ \
        make \
        openssl-devel \
        sqlite-devel \
        dbus-devel \
        systemd-devel \
        rpm-build \
        && dnf clean all

RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"

RUN cargo install cargo-generate-rpm

WORKDIR /workspace

COPY . .

CMD ["make", "rpm"]

