# Maintainer (AUR): Peter Majchrak <petoknm@gmail.com>
# repolint: reason=asdeps

pkgname=rxcpp
pkgver=4.1.0
pkgrel=1
pkgdesc="Reactive Extensions for C++"
arch=('i686' 'x86_64')
url="https://github.com/ReactiveX/RxCpp"
license=('Apache')
makedepends=('gcc' 'make' 'cmake' 'catch2')
source=("$pkgname-$pkgver.tar.gz::https://github.com/ReactiveX/RxCpp/archive/4.1.0.tar.gz")
sha256sums=('d3bb49c7ac6b5c43235df710510fce87d827bb88a1b78242017f190d2acbbdea')

build() {
	cd "RxCpp-$pkgver/projects/CMake"

  export CXXFLAGS="$CXXFLAGS -I/usr/include/catch2/"
	cmake .
	make -j1
}

check() {
	cd "RxCpp-$pkgver/projects/CMake/test"

	ctest
}

package() {
	cd "RxCpp-$pkgver/projects/CMake"

	make DESTDIR="$pkgdir/" install
}
