# Contributor: k0r10n <k0r10n.dev@gmail.com>
# Contributor: Ivan Tham <pickfire@riseup.net>
pkgname=extra-cmake-modules
pkgver=5.41.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
	make
}

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

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

sha512sums="034c67ed56ee4f6002ff2f0bfca2d7eb7877180b5aa5cf5eb3babb6e40c0669eb0728f45832bd8250ff304647f9a6555233bff4fdf6eccc9b14b420f4b1c3924  extra-cmake-modules-5.41.0.tar.xz"
