mirror of
https://github.com/mikedilger/gossip.git
synced 2024-10-01 09:21:53 +00:00
building a simple debian package
This commit is contained in:
parent
d1fcdeca3b
commit
7b7c6aa7fb
2
.dockerignore
Normal file
2
.dockerignore
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
/target
|
||||||
|
/contrib/*.deb
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
|||||||
/target
|
/target
|
||||||
|
/contrib/*.deb
|
||||||
|
@ -49,3 +49,10 @@ zeroize = "1.5"
|
|||||||
opt-level = 3
|
opt-level = 3
|
||||||
debug-assertions = false
|
debug-assertions = false
|
||||||
overflow-checks = false
|
overflow-checks = false
|
||||||
|
|
||||||
|
[package.metadata.deb]
|
||||||
|
section = "web"
|
||||||
|
assets = [
|
||||||
|
["target/release/gossip", "/usr/bin/", "755"],
|
||||||
|
["contrib/gossip.desktop", "/usr/share/applications/gossip.desktop", "644"],
|
||||||
|
]
|
||||||
|
26
contrib/Dockerfile
Normal file
26
contrib/Dockerfile
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
FROM rust:1.65-bullseye as builder
|
||||||
|
|
||||||
|
RUN apt-get update \
|
||||||
|
&& apt-get install --no-install-recommends -y \
|
||||||
|
build-essential \
|
||||||
|
ca-certificates \
|
||||||
|
curl \
|
||||||
|
libfontconfig1-dev \
|
||||||
|
libssl-dev \
|
||||||
|
pkg-config \
|
||||||
|
sudo \
|
||||||
|
&& apt -y autoremove \
|
||||||
|
&& apt clean \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
RUN cargo install cargo-deb
|
||||||
|
|
||||||
|
|
||||||
|
# Build gossip
|
||||||
|
COPY ./ gossip/
|
||||||
|
WORKDIR gossip
|
||||||
|
RUN mkdir -p /gossip/artifacts
|
||||||
|
RUN cargo deb
|
||||||
|
RUN ls /gossip/target/debian/
|
||||||
|
|
||||||
|
FROM scratch as custom-exporter
|
||||||
|
COPY --from=builder /gossip/target/debian/gossip*_amd64.deb .
|
10
contrib/deb.sh
Executable file
10
contrib/deb.sh
Executable file
@ -0,0 +1,10 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
||||||
|
cd $SCRIPT_DIR/..
|
||||||
|
DOCKER_BUILDKIT=1 \
|
||||||
|
docker build \
|
||||||
|
--output contrib \
|
||||||
|
-f contrib/Dockerfile \
|
||||||
|
.
|
||||||
|
|
17
contrib/gossip.desktop
Normal file
17
contrib/gossip.desktop
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
[Desktop Entry]
|
||||||
|
Name=gossip
|
||||||
|
Version=1.0
|
||||||
|
Comment=Desktop client for Nostr
|
||||||
|
Exec=gossip
|
||||||
|
Icon=gossip
|
||||||
|
Type=Application
|
||||||
|
Categories=Network;InstantMessaging;
|
||||||
|
StartupWMClass=gossip
|
||||||
|
Terminal=false
|
||||||
|
MimeType=x-scheme-handler/nostr;
|
||||||
|
X-GNOME-UsesNotifications=false
|
||||||
|
# Allows finding Gossip using application launchers and software shops more easily
|
||||||
|
Keywords=Nostr
|
||||||
|
X-KDE-Keywords=Nostr
|
||||||
|
# to be listed properly in some stores
|
||||||
|
X-Purism-FormFactor=Workstation;Mobile;
|
Loading…
Reference in New Issue
Block a user