# Forked from Alpine for providing a version with systemd
maintainer="Robert Eckelmann <longnoserob@postmarketos.org>"
pkgname=open-isns
_pkgver=0.102
pkgver=9999$_pkgver
pkgrel=2
pkgdesc="iSNS server and client for Linux"
url="https://github.com/open-iscsi/open-isns"
arch="all"
license="LGPL-2.1-or-later"
makedepends="meson openssl-dev>3 musl-dev"
options="!check"
subpackages="$pkgname-dev $pkgname-doc $pkgname-lib $pkgname-systemd"
source="$pkgname-$_pkgver.tar.gz::https://github.com/open-iscsi/open-isns/archive/v$_pkgver.tar.gz
	"
builddir="$srcdir/open-isns-$_pkgver"


build() {
	abuild-meson \
		-Dsecurity=enabled \
		. output
	meson compile -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output

	mkdir -p "$pkgdir"/usr/lib/systemd/system
}

lib() {
	amove usr/lib/lib*.so.*
}

sha512sums="
f5ae8af89b85565181c2f6def9834d9dab0a15d5d9b28721cce116c5580173ed9adba219e1ede48988cb57f047578db4ece458c4a7db598412c7583e56393d2b  open-isns-0.102.tar.gz
"
