File PKGBUILD of Package portsentry

pkgname=portsentry
pkgver=2.0.6
pkgrel=10
pkgdesc="Tool to detect and respond to port scans"
arch=('x86_64')
url="https://portsentry.xyz/"
license=('BSD')
depends=('libpcap' 'logrotate')
options=('!emptydirs')
makedepends=('cmake' 'systemd')
source=("${pkgname}_${pkgver}.orig.tar.gz")
sha256sums=('d640d8363d0f328d6c49c3dfb2d61a72b2490bbe2384ea77428d63a51a20ec6b')
install=portsentry.install

prepare() {
  cd "${pkgname}-${pkgver}"
}

build() {
  cd "${pkgname}-${pkgver}"
  cmake -B build \
    -D CMAKE_BUILD_TYPE=Release \
    -D BUILD_TESTS=ON \
    -D INSTALL_LICENSE=OFF \
    -D CMAKE_INSTALL_PREFIX=/usr \
    -D CMAKE_INSTALL_SBINDIR=bin \
    -D CMAKE_INSTALL_SYSCONFDIR=/etc \
    -D SYSTEMD_SYSTEM_UNIT_DIR=/usr/lib/systemd/system
  cmake --build build
}

check() {
  cd "${pkgname}-${pkgver}"
  ctest --test-dir build
}

package() {
  cd "${pkgname}-${pkgver}"
  DESTDIR="${pkgdir}" cmake --install build
}
openSUSE Build Service is sponsored by