Packaging files

This commit is contained in:
Mike Dilger 2023-02-11 13:58:07 +13:00
parent cf652447a0
commit 10ffcc4026
11 changed files with 50 additions and 11 deletions

2
.gitignore vendored
View File

@ -1,2 +1,2 @@
/target
/contrib/*.deb

View File

@ -56,5 +56,5 @@ overflow-checks = false
section = "web"
assets = [
["target/release/gossip", "/usr/bin/", "755"],
["contrib/gossip.desktop", "/usr/share/applications/gossip.desktop", "644"],
["packaging/debian/gossip.desktop", "/usr/share/applications/gossip.desktop", "644"],
]

4
packaging/arch/.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
*.bz2
*.zst
pkg/
src/

26
packaging/arch/PKGBUILD Normal file
View File

@ -0,0 +1,26 @@
# Maintainer: Michael Dilger <mike@mikedilger.com>
pkgname='gossip'
pkgver='0.3.90'
pkgrel=1
pkgdesc='A desktop nostr client'
arch=('i686' 'x86_64')
url='https://github.com/mikedilger/$pkgname'
license=('MIT')
depends=('openssl' 'gcc-libs')
makedepends=('git' 'cargo')
_tag=528012c1501aac5a60e4d525385b13110a45467c
source=("git+$url#tag=$_tag")
sha1sums=('337fb8a862b64c7da16f7bbe4fe07aff2ff812e9')
build() {
cd "$pkgname"
RUSTFLAGS="-C target-cpu=native --cfg tokio_unstable" cargo build --release
strip ./target/release/gossip
}
package() {
cd "$pkgname"
install -Dm755 "./target/release/$pkgname" "$pkgdir/usr/bin/$pkgname"
install -Dm644 "./LICENSE.txt" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

View File

@ -1,7 +1,7 @@
#!/bin/bash
# This is the binary we are inspecting
BIN=./target/release/gossip
BIN=../../target/release/gossip
# This uses ldd to get it's dependencies into a list
DEPS=$(pacman -F $(ldd "$BIN" | awk '{print $3}') | awk '{print $5}' | awk -F/ '{print $2}' | tr " " "\n" | sort -u | tr "\n" " ")
@ -30,9 +30,11 @@ echo $TODELETE | tr " " "\n" > /tmp/file2.txt
comm -3 /tmp/file1.txt /tmp/file2.txt | sed '/\t/d'
# json-glib
# libstemmer
# libutil-linux (util-linux-libs)
# webkit2gtk
# I'm getting 'gcc-libs' today as the only output.
# But in the past I got:
# json-glib
# libstemmer
# libutil-linux (util-linux-libs)
# webkit2gtk
#
# pacman -S json-glib libstemmer util-linux-libs webkit2gtk

1
packaging/debian/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
*.deb

View File

@ -1,4 +1,4 @@
FROM rust:1.65-bullseye as builder
FROM rust:1.67-bullseye as builder
RUN apt-get update \
&& apt-get install --no-install-recommends -y \

View File

@ -1,10 +1,10 @@
#!/usr/bin/env bash
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
cd $SCRIPT_DIR/..
cd $SCRIPT_DIR/../..
DOCKER_BUILDKIT=1 \
docker build \
--output contrib \
-f contrib/Dockerfile \
--output packaging/debian \
-f packaging/debian/Dockerfile \
.

2
packaging/tar/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
*.gz
*.bz2

4
packaging/tar/make-tar.sh Executable file
View File

@ -0,0 +1,4 @@
#!/bin/sh
cd ../../..
tar -cv --exclude=gossip/.git --exclude=gossip/target --exclude=gossip/packaging -f - gossip | bzip2 -c > gossip/packaging/tar/gossip.tar.bz2