blob: 86e167e3181ec741de551d7caf0a5039bc0aa316 (
plain)
1 # Description: Secure multithreaded packet sniffer
2 # URL: https://crates.io/crates/sniffglue
3 # Maintainer: Tim Biermann, tbier at posteo dot de
4 # Depends on: rust libpcap libseccomp
5
6 name=sniffglue
7 version=0.15.0
8 release=1
9 source=(https://github.com/kpcyrd/sniffglue/archive/v$version/$name-$version.tar.gz)
10
11 build() {
12 prt-get isinst sccache && export RUSTC_WRAPPER=/usr/bin/sccache
13 mkdir "$PKGMK_SOURCE_DIR/rust" || true
14 export CARGO_HOME="$PKGMK_SOURCE_DIR/rust"
15
16 cargo update --manifest-path $name-$version/Cargo.toml
17 cargo build --release --locked --manifest-path $name-$version/Cargo.toml
18
19 prt-get isinst bash-completions && \
20 install -d $PKG/usr/share/bash-completion/completions && \
21 $name-$version/target/release/sniffglue --gen-completions bash > $PKG/usr/share/bash-completion/completions/sniffglue
22 prt-get isinst zsh && \
23 install -d $PKG/usr/share/zsh/site-functions && \
24 $name-$version/target/release/sniffglue --gen-completions zsh > $PKG/usr/share/zsh/site-functions/_sniffglue
25
26 install -Dt $PKG/usr/bin $name-$version/target/release/$name
27 }
|