# Contributor: k0r10n <k0r10n.dev@gmail.com>
# Contributor: Ivan Tham <pickfire@riseup.net>
pkgname=extra-cmake-modules
pkgver=5.48.0
pkgrel=0
pkgdesc="Extra CMake modules"
url="https://projects.kde.org/projects/kdesupport/extra-cmake-modules"
arch="noarch"
license="custom"
depends="cmake"
makedepends="py-sphinx cmake"
subpackages="${pkgname}-doc"
source="http://download.kde.org/stable/frameworks/${pkgver%.*}/$pkgname-$pkgver.tar.xz"
builddir="$srcdir"/${pkgname}-${pkgver}/build

build() {
	mkdir -p "$builddir" && cd "$builddir"
	cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_TESTING=OFF || return 1
	make || return 1
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install/fast || return 1

	install -Dm644 ../COPYING-CMAKE-SCRIPTS \
		"$pkgdir"/usr/share/licenses/$pkgname/COPYING
}

sha512sums="52e52ef6b35f4ae34b7ef35270a05c1fec856b253007376e3c7707fd98ecdd228b1b305ecdff1863a735780bea27a5aa14dfb32f0fca4992f7f4edcff359f47b  extra-cmake-modules-5.48.0.tar.xz"
