diff --git a/testing/ocaml-topkg/APKBUILD b/testing/ocaml-topkg/APKBUILD
new file mode 100644
index 0000000000000000000000000000000000000000..fde483d9c355763b4c29ddafa28442a54c66278e
--- /dev/null
+++ b/testing/ocaml-topkg/APKBUILD
@@ -0,0 +1,62 @@
+# Contributor: Jakub Jirutka <jakub@jirutka.cz>
+# Maintainer:
+# FIXME: run tests!
+pkgname=ocaml-topkg
+_pkgname=topkg
+pkgver=1.0.5
+pkgrel=0
+pkgdesc="The transitory OCaml software packager"
+url="https://erratique.ch/software/topkg"
+arch="all !riscv64"  # restricted by ocaml aport
+license="ISC"
+depends="ocaml-runtime"
+depends_dev="$pkgname=$pkgver-r$pkgrel"
+makedepends="
+	ocaml
+	ocaml-compiler-libs
+	ocaml-findlib
+	ocamlbuild
+	cmd:opam-installer
+	"
+subpackages="$pkgname-dev"
+source="$pkgname-$pkgver.tar.bz2::https://erratique.ch/software/topkg/releases/topkg-$pkgver.tbz"
+builddir="$srcdir/$_pkgname-$pkgver"
+
+# 32-bit archs
+case "$CARCH" in
+	arm*|x86) options="$options textrels" ;;
+esac
+
+build() {
+	ocaml pkg/pkg.ml build --dev-pkg true
+}
+
+package() {
+	opam-installer -i \
+		--prefix="$pkgdir/usr" \
+		--libdir="$pkgdir/usr/lib/ocaml" \
+		--docdir="$builddir/.omit" \
+		$_pkgname.install
+}
+
+dev() {
+	default_dev
+
+	cd "$pkgdir"
+
+	local path; for path in $(find usr/lib/ocaml \( \
+			-name '*.cmt' -o \
+			-name '*.cmti' -o \
+			-name '*.cmx' -o \
+			-name '*.cmxa' -o \
+			-name '*.ml' -o \
+			-name '*.mli' \
+		\))
+	do
+		amove "$path"
+	done
+}
+
+sha512sums="
+9450e9139209aacd8ddb4ba18e4225770837e526a52a56d94fd5c9c4c9941e83e0e7102e2292b440104f4c338fabab47cdd6bb51d69b41cc92cc7a551e6fefab  ocaml-topkg-1.0.5.tar.bz2
+"
diff --git a/unmaintained/ocaml-topkg/APKBUILD b/unmaintained/ocaml-topkg/APKBUILD
deleted file mode 100644
index 9bc6869d1dd03717395d76db5815eaa8e889ed26..0000000000000000000000000000000000000000
--- a/unmaintained/ocaml-topkg/APKBUILD
+++ /dev/null
@@ -1,47 +0,0 @@
-# Contributor: Jakub Jirutka <jakub@jirutka.cz>
-# Maintainer:
-# FIXME: run tests!
-pkgname=ocaml-topkg
-_pkgname=topkg
-pkgver=0.9.1
-pkgrel=2
-pkgdesc="The transitory OCaml software packager"
-url="http://erratique.ch/software/topkg"
-arch="all !x86 !armhf !armv7 !s390x !mips !mips64"  # limited by ocaml aport
-license="ISC"
-depends="ocaml-result ocaml-runtime"
-depends_dev="$pkgname=$pkgver-r$pkgrel"
-makedepends="ocaml ocaml-compiler-libs ocaml-findlib ocaml-result-dev ocamlbuild opam"
-subpackages="$pkgname-dev"
-source="$pkgname-$pkgver.tar.gz::https://github.com/dbuenzli/$_pkgname/archive/v$pkgver.tar.gz"
-builddir="$srcdir/$_pkgname-$pkgver"
-
-build() {
-	cd "$builddir"
-	ocaml pkg/pkg.ml build
-}
-
-package() {
-	cd "$builddir"
-
-	opam-installer -i \
-		--prefix="$pkgdir/usr" \
-		--libdir="$pkgdir/usr/lib/ocaml" \
-		--docdir="$builddir/.omit" \
-		$_pkgname.install
-
-	# Remove annotation files.
-	rm -Rf "$pkgdir"/usr/lib/ocaml/$_pkgname/*.cmt*
-}
-
-dev() {
-	local sitelib="usr/lib/ocaml/$_pkgname"
-	default_dev
-
-	cd "$pkgdir"/$sitelib
-
-	mkdir -p "$subpkgdir"/$sitelib
-	mv *.cmx *.cmxa *.mli "$subpkgdir"/$sitelib/
-}
-
-sha512sums="19773eb764b53a6e5110c44d7942d2557d6c8502a3037b57f7737efc08f4cc374845b431fdb1465207693d15a4b072aea3db97f8e60e069e3d24ae150e8c5c8f  ocaml-topkg-0.9.1.tar.gz"