Add ubdsrv
[fedora-reviews.git] / ubdsrv / ubdsrv.spec
1 %global forgeurl https://github.com/ming1/ubdsrv
2 %global commit 9a496a862e9fe3793efad82551e58a37059b9e95
3 # Upstream has not tagged any versions so far.
4 Version:       0.1
5 %forgemeta
6
7 Summary:       Userspace block driver server and ublk tool
8 Name:          ubdsrv
9 Release:       1%{?dist}
10 URL:           %{forgeurl}
11 Source:        %{forgesource}
12 License:       LGPLv2+ or MIT
13
14 # Basic build requirements.
15 BuildRequires: gcc, gcc-c++
16 BuildRequires: make
17 BuildRequires: autoconf, autoconf-archive, automake, libtool
18 BuildRequires: liburing-devel >= 2.2
19
20
21 %description
22 This package allows you to write Linux block devices in userspace.  It
23 contains a library which can be linked to programs that implement
24 Linux userspace block devices, and also the "ublk" program which can
25 be used to create, list and delete ublk devices.
26
27
28 %package devel
29 Summary:       Development tools for %{name}
30 Requires:      %{name}%{_isa} = %{version}-%{release}
31
32
33 %description devel
34 This package contains development tools for %{name}.
35
36
37 %prep
38 %forgesetup
39
40
41 %build
42 autoreconf -f -i
43 %{configure} --disable-static
44 make V=1 %{?_smp_mflags}
45
46
47 %install
48 %{make_install}
49
50 # Remove libtool droppings.
51 rm %{buildroot}%{_libdir}/*.la
52
53 # Remove the demo programs.
54 rm %{buildroot}%{_bindir}/demo_event
55 rm %{buildroot}%{_bindir}/demo_null
56
57
58 %files
59 %license COPYING COPYING.LGPL LICENSE
60 %doc README
61 %{_bindir}/ublk
62 %{_libdir}/libublksrv.so.0*
63
64
65 %files devel
66 %license COPYING COPYING.LGPL LICENSE
67 %doc README
68 %{_includedir}/ublk_cmd.h
69 %{_includedir}/ublksrv.h
70 %{_libdir}/libublksrv.so
71
72
73 %changelog
74 * Tue Aug 30 2022 Richard W.M. Jones <rjones@redhat.com> - 0.1-1
75 - Initial package