# Contributor: kpcyrd # Maintainer: kpcyrd pkgname=sn0int pkgver=0.16.0 pkgrel=0 pkgdesc="Semi-automatic OSINT framework and package manager" url="https://github.com/kpcyrd/sn0int" arch="x86_64 armhf armv7" # limited by cargo license="GPL-3.0-or-later" makedepends=" cargo sqlite-dev libseccomp-dev py3-sphinx wget " subpackages="$pkgname-doc $pkgname-bash-completion:bashcomp:noarch $pkgname-zsh-completion:zshcomp:noarch $pkgname-fish-completion:fishcomp:noarch " options="net" source="$pkgname-$pkgver.tar.gz::https://github.com/kpcyrd/sn0int/archive/v$pkgver.tar.gz" build() { cargo build --release --locked mkdir -p completions "target/release/sn0int" completions bash > completions/sn0int.bash "target/release/sn0int" completions zsh > completions/_sn0int "target/release/sn0int" completions fish > completions/sn0int.fish make -C docs man } check() { cargo test --release --locked } package() { install -Dm755 "$builddir/target/release/sn0int" "$pkgdir/usr/bin/sn0int" setcap cap_sys_chroot=ep \ "$pkgdir/usr/bin/sn0int" install -Dm 644 "$builddir/docs/_build/man/sn0int.1" \ "$pkgdir/usr/share/man/man1/sn0int.1" } bashcomp() { depends="" pkgdesc="Bash completions for $pkgname" install_if="$pkgname=$pkgver-r$pkgrel bash-completion" mkdir -p "$subpkgdir"/usr/share/bash-completion/completions/ install -Dm644 "$builddir/completions/sn0int.bash" \ "$subpkgdir/usr/share/bash-completion/completions/sn0int" } zshcomp() { depends="" pkgdesc="Zsh completions for $pkgname" install_if="$pkgname=$pkgver-r$pkgrel zsh" mkdir -p "$subpkgdir"/usr/share/zsh/site-functions/ install -Dm644 "$builddir/completions/_sn0int" \ "$subpkgdir/usr/share/zsh/site-functions/_sn0int" } fishcomp() { depends="" pkgdesc="Fish completions for $pkgname" install_if="$pkgname=$pkgver-r$pkgrel fish" mkdir -p "$subpkgdir"/usr/share/fish/completions/ install -Dm644 "$builddir/completions/sn0int.fish" \ "$subpkgdir/usr/share/fish/completions/sn0int.fish" } sha512sums="85dfa6a79e4707883a2849137d93f98edbb29cbcc508a9481817184200426aae57993feaf2a7c6fd219bebec2e752cd6e8638e16c6f36eb873a225463ede858d sn0int-0.16.0.tar.gz"