1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
%define device_mapper_version 1.02.77
%define lvm2_version 2.02.98
# Do not reset Release to 1 unless both lvm2 and device-mapper
# versions are increased together.
Name: device-mapper
Version: 1.02.77
Release: 1
License: GPL-2.0+
Summary: Device mapper utility
Url: http://sources.redhat.com/dm
Group: Base/Device Management
Source0: ftp://sources.redhat.com/pub/lvm2/LVM2.%{lvm2_version}.tgz
Source1001: device-mapper.manifest
Requires: libdevmapper = %{device_mapper_version}-%{release}
%description
This package contains the supporting userspace utility, dmsetup,
for the kernel device-mapper.
%package devel
License: LGPL-2.1+
Summary: Development libraries and headers for device-mapper
Group: Development/Libraries
Requires: %{name} = %{device_mapper_version}-%{release}
Requires: libdevmapper = %{device_mapper_version}-%{release}
%description -n device-mapper-devel
This package contains files needed to develop applications that use
the device-mapper libraries.
%package -n libdevmapper
License: LGPL-2.1+
Summary: Device-mapper shared library
Group: Base/Device Management
Obsoletes: device-mapper < 1.02.17-6
%description -n libdevmapper
This package contains the device-mapper shared library, libdevmapper.
%prep
%setup -q -n LVM2.%{lvm2_version}
cp %{SOURCE1001} .
%build
%define _exec_prefix ""
%configure --with-user= --with-group= --with-device-uid=0 --with-device-gid=6 --with-device-mode=0660 --enable-pkgconfig
%define _exec_prefix /
make device-mapper
%install
make install_device-mapper DESTDIR=%{buildroot} usrlibdir=%{buildroot}/usr/%{_lib}
sed -i 's/ (.*)//g' %{buildroot}%{_libdir}/pkgconfig/*.pc
%post -n libdevmapper -p /sbin/ldconfig
%postun -n libdevmapper -p /sbin/ldconfig
%files
%manifest %{name}.manifest
%defattr(-,root,root,-)
%license COPYING COPYING.LIB
%attr(755,root,root) %{_sbindir}/dmsetup
%{_mandir}/man8/dmsetup.8.gz
%files devel
%manifest %{name}.manifest
%defattr(-,root,root,-)
%attr(755,root,root) /%{_libdir}/libdevmapper.so
%{_includedir}/libdevmapper.h
%{_libdir}/pkgconfig/*.pc
%files -n libdevmapper
%manifest %{name}.manifest
%license COPYING.LIB
%attr(755,root,root) /%{_libdir}/libdevmapper.so.*
|