aboutsummaryrefslogtreecommitdiffstats
path: root/community/sn0int
diff options
context:
space:
mode:
authorkpcyrd <git@rxv.cc>2019-07-01 02:50:11 +0200
committerLeo <thinkabit.ukim@gmail.com>2019-07-04 00:38:14 -0300
commit51ff88723a671f0a41f9b7420eaa2d5664474c76 (patch)
tree42571291ac460a46d6ea55dfc428bb1f2845cbf5 /community/sn0int
parent671ff829cd33fcb93c2e585c68112107ae388b55 (diff)
downloadaports-51ff88723a671f0a41f9b7420eaa2d5664474c76.tar.bz2
aports-51ff88723a671f0a41f9b7420eaa2d5664474c76.tar.xz
community/sn0int: move from testing
Diffstat (limited to 'community/sn0int')
-rw-r--r--community/sn0int/APKBUILD88
1 files changed, 88 insertions, 0 deletions
diff --git a/community/sn0int/APKBUILD b/community/sn0int/APKBUILD
new file mode 100644
index 0000000000..93cd6a11b3
--- /dev/null
+++ b/community/sn0int/APKBUILD
@@ -0,0 +1,88 @@
+# Contributor: kpcyrd <git@rxv.cc>
+# Maintainer: kpcyrd <git@rxv.cc>
+pkgname=sn0int
+pkgver=0.12.0
+pkgrel=0
+pkgdesc="Semi-automatic OSINT framework and package manager"
+url="https://github.com/kpcyrd/sn0int"
+arch="x86_64" # limited by cargo pkg
+license="GPL-3.0-or-later"
+makedepends="
+ cargo
+ sqlite-dev
+ libseccomp-dev
+ py-sphinx
+ wget
+ "
+subpackages="$pkgname-doc
+ $pkgname-bash-completion:bashcomp:noarch
+ $pkgname-zsh-completion:zshcomp:noarch
+ $pkgname-fish-completion:fishcomp:noarch
+ "
+source="$pkgname-$pkgver.tar.gz::https://github.com/kpcyrd/$pkgname/archive/v$pkgver.tar.gz"
+
+build() {
+ cd "$builddir"
+ 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() {
+ cd "$builddir"
+
+ wget https://geolite.maxmind.com/download/geoip/database/GeoLite2-City.tar.gz \
+ https://geolite.maxmind.com/download/geoip/database/GeoLite2-ASN.tar.gz
+ cargo run --release --locked --example maxmind -- \
+ dl -e GeoLite2-City.tar.gz GeoLite2-City.mmdb GeoLite2-City.mmdb
+ cargo run --release --locked --example maxmind -- \
+ dl -e GeoLite2-ASN.tar.gz GeoLite2-ASN.mmdb GeoLite2-ASN.mmdb
+
+ 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="065777d85b42350b870935ff880c01f56ba9d6ff54bb0930f890484eecfad0884eb7d0997e32204b9a11173b8822f4961b187cd0a9e3f8eeefa62cf1e0d8aa14 sn0int-0.12.0.tar.gz"