ubdsrv: Add ublksrv.pc file to package
[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 BuildRequires: pkgconf
20
21
22 %description
23 This package allows you to write Linux block devices in userspace.  It
24 contains a library which can be linked to programs that implement
25 Linux userspace block devices, and also the "ublk" program which can
26 be used to create, list and delete ublk devices.
27
28
29 %package devel
30 Summary:       Development tools for %{name}
31 Requires:      %{name}%{_isa} = %{version}-%{release}
32
33
34 %description devel
35 This package contains development tools for %{name}.
36
37
38 %prep
39 %forgesetup
40
41
42 %build
43 autoreconf -f -i
44 %{configure} --disable-static
45 make V=1 %{?_smp_mflags}
46
47
48 %install
49 %{make_install}
50
51 # Install the *.pc file.
52 mkdir -p %{buildroot}%{_libdir}/pkgconfig
53 cp -a ublksrv.pc %{buildroot}%{_libdir}/pkgconfig/
54
55 # Remove libtool droppings.
56 rm %{buildroot}%{_libdir}/*.la
57
58 # Remove the demo programs.
59 rm %{buildroot}%{_bindir}/demo_event
60 rm %{buildroot}%{_bindir}/demo_null
61
62
63 %files
64 %license COPYING COPYING.LGPL LICENSE
65 %doc README
66 %{_bindir}/ublk
67 %{_libdir}/libublksrv.so.0*
68
69
70 %files devel
71 %license COPYING COPYING.LGPL LICENSE
72 %doc README
73 %{_includedir}/ublk_cmd.h
74 %{_includedir}/ublksrv.h
75 %{_libdir}/libublksrv.so
76 %{_libdir}/pkgconfig/ublksrv.pc
77
78
79 %changelog
80 * Tue Aug 30 2022 Richard W.M. Jones <rjones@redhat.com> - 0.1-1
81 - Initial package