Add ubdsrv
[fedora-reviews.git] / ubdsrv / ubdsrv.spec
diff --git a/ubdsrv/ubdsrv.spec b/ubdsrv/ubdsrv.spec
new file mode 100644 (file)
index 0000000..37bcd97
--- /dev/null
@@ -0,0 +1,75 @@
+%global forgeurl https://github.com/ming1/ubdsrv
+%global commit 9a496a862e9fe3793efad82551e58a37059b9e95
+# Upstream has not tagged any versions so far.
+Version:       0.1
+%forgemeta
+
+Summary:       Userspace block driver server and ublk tool
+Name:          ubdsrv
+Release:       1%{?dist}
+URL:           %{forgeurl}
+Source:        %{forgesource}
+License:       LGPLv2+ or MIT
+
+# Basic build requirements.
+BuildRequires: gcc, gcc-c++
+BuildRequires: make
+BuildRequires: autoconf, autoconf-archive, automake, libtool
+BuildRequires: liburing-devel >= 2.2
+
+
+%description
+This package allows you to write Linux block devices in userspace.  It
+contains a library which can be linked to programs that implement
+Linux userspace block devices, and also the "ublk" program which can
+be used to create, list and delete ublk devices.
+
+
+%package devel
+Summary:       Development tools for %{name}
+Requires:      %{name}%{_isa} = %{version}-%{release}
+
+
+%description devel
+This package contains development tools for %{name}.
+
+
+%prep
+%forgesetup
+
+
+%build
+autoreconf -f -i
+%{configure} --disable-static
+make V=1 %{?_smp_mflags}
+
+
+%install
+%{make_install}
+
+# Remove libtool droppings.
+rm %{buildroot}%{_libdir}/*.la
+
+# Remove the demo programs.
+rm %{buildroot}%{_bindir}/demo_event
+rm %{buildroot}%{_bindir}/demo_null
+
+
+%files
+%license COPYING COPYING.LGPL LICENSE
+%doc README
+%{_bindir}/ublk
+%{_libdir}/libublksrv.so.0*
+
+
+%files devel
+%license COPYING COPYING.LGPL LICENSE
+%doc README
+%{_includedir}/ublk_cmd.h
+%{_includedir}/ublksrv.h
+%{_libdir}/libublksrv.so
+
+
+%changelog
+* Tue Aug 30 2022 Richard W.M. Jones <rjones@redhat.com> - 0.1-1
+- Initial package