--- /dev/null
+%global forgeurl https://gitlab.com/libblkio/libblkio
+%global commit c8f5ed9a1460d90a522bda55da09f013fa7da61c
+# Upstream has not tagged any versions so far.
+Version: 0.1
+%forgemeta
+
+Summary: Block device I/O library
+Name: libblkio
+Release: 1%{?dist}
+URL: %{forgeurl}
+Source: %{forgesource}
+License: ASL 2.0 or MIT
+
+# Basic build requirements.
+BuildRequires: gcc, gcc-c++
+BuildRequires: make
+BuildRequires: meson
+BuildRequires: rust
+BuildRequires: rustfmt
+BuildRequires: cargo
+BuildRequires: python3-docutils
+BuildRequires: liburing-devel
+BuildRequires: pkgconf
+
+
+%description
+libblkio is a library for high-performance block device I/O with
+support for multi-queue devices. A C API is provided so that
+applications can use the library from most programming languages.
+
+
+%package devel
+Summary: Development tools for %{name}
+Requires: %{name}%{_isa} = %{version}-%{release}
+
+
+%description devel
+This package contains development tools for %{name}.
+
+
+%prep
+%forgesetup
+
+
+%build
+%{meson}
+%{meson_build}
+
+
+%install
+%{meson_install}
+
+pushd %{buildroot}%{_libdir}
+ln -s libblkio.so libblkio.so.0
+ln -s libblkio.so.0 libblkio.so.0.0
+popd
+
+
+%files
+%license LICENSE-APACHE LICENSE-MIT LICENSE.crosvm
+%doc README.rst
+%{_libdir}/libblkio.so.0*
+
+
+%files devel
+%license LICENSE-APACHE LICENSE-MIT LICENSE.crosvm
+%doc README.rst
+%{_includedir}/blkio.h
+%{_libdir}/libblkio.so
+%{_libdir}/pkgconfig/blkio.pc
+%{_mandir}/man3/blkio.3*
+
+
+%changelog
+* Tue Sep 06 2022 Richard W.M. Jones <rjones@redhat.com> - 0.1-1
+- Initial package