PKGBUILD 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. # Maintainer: Anas Elgarhy <anas.elgarhy.dev@gmail.com>
  2. pkgname=ports-sniffer
  3. pkgver=0.1.0
  4. pkgrel=0
  5. epoch=
  6. pkgdesc="A simple port sniffer(scanner) implementation with 🦀"
  7. arch=(x86_64)
  8. url="https://github.com/anas-elgarhy/ports-sniffer"
  9. license=('MIT')
  10. groups=()
  11. depends=()
  12. makedepends=(cargo)
  13. checkdepends=()
  14. optdepends=()
  15. provides=(ports-sniffer)
  16. conflicts=()
  17. replaces=(ports-sniffer)
  18. backup=()
  19. options=()
  20. install=
  21. changelog=
  22. source=("$pkgname-$pkgver.tar.gz::https://static.crates.io/crates/$pkgname/$pkgname-$pkgver.crate")
  23. noextract=()
  24. prepare() {
  25. cd "$pkgname-$pkgver"
  26. cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
  27. }
  28. build() {
  29. cd "$pkgname-$pkgver"
  30. export RUSTUP_TOOLCHAIN=stable
  31. export CARGO_TARGET_DIR=target
  32. cargo build --frozen --release --all-features
  33. }
  34. check() {
  35. cd "$pkgname-$pkgver"
  36. export RUSTUP_TOOLCHAIN=stable
  37. cargo test --frozen --all-features
  38. }
  39. package() {
  40. cd "$pkgname-$pkgver"
  41. sudo install -Dm0755 -t "/usr/bin/" "target/release/$pkgname"
  42. }
  43. sha256sums=('d24b8248dadb79dbb9f5a0d100cb9e19d813b74a34c7e8a4cb9b0115b4f82412')