summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 0660662b030e9207ca19a1968c2912ae8a24f46a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Maintainer: Pierre Lalet <pl@ivre.rocks>

pkgname=masscanned-git
_pkgname=masscanned
pkgver=0.2.0.dev44
pkgrel=1
pkgdesc='A low-interaction focused on network scanners and bots. It integrates very well with IVRE to build a self-hosted alternative to GreyNoise.'
arch=('any')
url='https://ivre.rocks/'
license=('GPL3')
makedepends=('git' 'rust')
source=("git+https://github.com/ivre/${_pkgname}.git")
sha512sums=('SKIP')

pkgver() {
  cd "${srcdir}/${_pkgname}"
  git describe --tags | sed -r 's#^v##;s#-([^-]*)-.*#.dev\1#'
}

build() {
  cd "${srcdir}/${_pkgname}"
  cargo build --release
}

package() {
  conflicts=("${_pkgname}")
  provides=("${_pkgname}")
  cd "${srcdir}/${_pkgname}"
  install -Dvm755 "target/release/${_pkgname}" -t "${pkgdir}/usr/bin"
  install -Dvm644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}