diff --git a/community/fann/APKBUILD b/community/fann/APKBUILD
index 82727c0dd4735586492e49e346dd136ff5b0d2c5..ccfef6fa3b2dbf0fb4fc01d3b99bce5ae6805dd2 100644
--- a/community/fann/APKBUILD
+++ b/community/fann/APKBUILD
@@ -2,24 +2,24 @@
 # Maintainer: Valery Kartel <valery.kartel@gmail.com>
 pkgname=fann
 pkgver=2.2.0
-pkgrel=0
+pkgrel=1
 pkgdesc="Fast Artificial Neural Network Library"
 url="http://leenissen.dk/fann/"
 arch="all"
 license="LGPL-2.0-or-later"
 makedepends="cmake"
 subpackages="$pkgname-dev $pkgname-fixed:_lib $pkgname-float:_lib $pkgname-double:_lib"
-source="$pkgname-$pkgver.tar.gz::https://github.com/lib$pkgname/$pkgname/archive/$pkgver.tar.gz"
-builddir="$srcdir/$pkgname-$pkgver"
+source="$pkgname-$pkgver.tar.gz::https://github.com/libfann/fann/archive/$pkgver.tar.gz"
 
 build() {
-	cd "$builddir"
-	cmake CMakeLists.txt -DCMAKE_INSTALL_PREFIX=/usr
-	make
+	cmake -B build . \
+		-DCMAKE_BUILD_TYPE=None \
+		-DCMAKE_INSTALL_PREFIX=/usr
+	make -C build
 }
 
 package() {
-	make -C "$builddir" DESTDIR="$pkgdir" install
+	make -C build DESTDIR="$pkgdir" install
 }
 
 _lib() {