forked from martin-olivier/airgorah
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
31 lines (22 loc) · 1.08 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
FROM rust:1.75.0-slim-bookworm
# Fetch package list
RUN apt update
# Install build dependencies
RUN apt install -y build-essential libgtk-4-dev libglib2.0-dev
# Install packaging tools
RUN apt install -y ruby ruby-dev rubygems rpm zstd libarchive-tools
# Install fpm
RUN gem install fpm
# Install rustup components
RUN rustup component add clippy
RUN rustup component add rustfmt
##### Commands #####
WORKDIR /workspace
ENV DEBIAN_DEPS="--depends policykit-1 --depends libgtk-4-1 --depends dbus-x11 --depends wireshark-common --depends iproute2 --depends mdk4 --depends crunch"
ENV REDHAT_DEPS="--depends polkit --depends gtk4-devel --depends dbus-x11 --depends wireshark-cli --depends iproute"
ENV ARCHLINUX_DEPS="--depends polkit --depends gtk4 --depends dbus --depends wireshark-cli --depends iproute2 --depends mdk4"
# Build and package the project
CMD cargo build --release && \
fpm -f -t deb -p airgorah_`arch`.deb -a native $DEBIAN_DEPS && \
fpm -f -t rpm -p airgorah_`arch`.rpm -a native $REDHAT_DEPS && \
fpm -f -t pacman -p airgorah_`arch`.pkg.tar.zst -a native $ARCHLINUX_DEPS