Private
Public Access
1
0

Adds makefile and dockerfile for building rpms

This commit is contained in:
2025-08-08 15:42:21 -07:00
parent 8cdcb049cf
commit 201982170f
3 changed files with 43 additions and 1 deletions

2
Cargo.lock generated
View File

@@ -1046,7 +1046,7 @@ dependencies = [
[[package]] [[package]]
name = "kordophoned" name = "kordophoned"
version = "1.0.0" version = "1.0.1"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"async-trait", "async-trait",

26
Dockerfile Normal file
View File

@@ -0,0 +1,26 @@
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"]

16
Makefile Normal file
View File

@@ -0,0 +1,16 @@
.PHONY: all
all:
cargo build
.PHONY: release
release:
cargo build --release
.PHONY: rpm
rpm:
cargo build --release --workspace
strip -s target/release/kordophoned
strip -s target/release/kpcli
cargo generate-rpm -p kordophoned