3 %bcond_without selinux # build without SELinux support
4 %bcond_without initrd # don't build initrd version
5 %bcond_with glibc # build glibc-based initrd version
10 Summary: Userspace support for the device-mapper
11 Summary(pl): Wsparcie dla mapowania urz±dzeñ w przestrzeni u¿ytkownika
16 Group: Applications/System
17 Source0: ftp://sources.redhat.com/pub/dm/%{name}.%{version}.tgz
18 # Source0-md5: 10469034e2f1f1483fd3d80fb3883af2
19 Patch0: %{name}-stack.patch
20 URL: http://sources.redhat.com/dm/
21 BuildRequires: autoconf
22 BuildRequires: automake
23 %{?with_selinux:BuildRequires: libselinux-devel >= 1.10}
24 %{?with_selinux:Requires: libselinux >= 1.10}
26 %{?with_glibc:BuildRequires: glibc-static}
27 %{?!with_glibc:BuildRequires: uClibc-static}
29 Conflicts: dev < 2.9.0-8
30 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32 %define _sbindir /sbin
35 The goal of this driver is to support volume management.
36 The driver enables the definition of new block devices composed of
37 ranges of sectors of existing devices. This can be used to define
38 disk partitions - or logical volumes. This light-weight kernel
39 component can support user-space tools for logical volume management.
42 Celem tego sterownika jest obs³uga zarz±dzania wolumenami.
43 Sterownik w³±cza definiowanie nowych urz±dzeñ blokowych z³o¿onych z
44 przedzia³ów sektorów na istniej±cych urz±dzeniach. Mo¿e to byæ
45 wykorzystane do definiowania partycji na dysku lub logicznych
46 wolumenów. Ten lekki sk³adnik j±dra mo¿e wspieraæ dzia³aj±ce w
47 przestrzeni u¿ytkownika narzêdzia do zarz±dzania logicznymi
51 Summary: Userspace support for the device-mapper - static dmsetup for initrd
52 Summary(pl): Wsparcie dla mapowania urz±dzeñ w przestrzeni u¿ytkownika - statyczne dmsetup dla initrd
53 Group: Applications/System
54 Requires: %{name} = %{version}-%{release}
57 Userspace support for the device-mapper - static dmsetup binary for initrd.
59 %description initrd -l pl
60 Wsparcie dla mapowania urz±dzeñ w przestrzeni u¿ytkownika - statyczna wersja
64 Summary: Header files and development documentation for %{name}
65 Summary(pl): Pliki nag³ówkowe i dokumentacja do %{name}
66 Group: Development/Libraries
67 Requires: %{name} = %{version}-%{release}
70 Header files and development documentation for %{name}.
72 %description devel -l pl
73 Pliki nag³ówkowe i dokumentacja do %{name}.
76 Summary: Static devmapper library
77 Summary(pl): Statyczna biblioteka devmapper
78 Group: Development/Libraries
79 Requires: %{name}-devel = %{version}-%{release}
82 Static devmapper library.
84 %description static -l pl
85 Statyczna biblioteka devmapper.
88 Summary: Additional scripts
89 Summary(pl): Dodatkowe skrypty
90 Group: Applications/System
91 Requires: %{name} = %{version}-%{release}
97 %description scripts -l pl
101 %setup -q -n %{name}.%{version}
105 cp -f /usr/share/automake/config.sub autoconf
112 --with-optimisation="%{rpmcflags}" \
113 --with-user=%(id -u) \
114 --with-group=%(id -g) \
115 --with-interface=ioctl \
116 --enable-static_link \
117 %{?!with_glibc:CC="%{_target_cpu}-uclibc-gcc"}
120 cp -a dmsetup/dmsetup.static initrd-dmsetup
125 --%{?with_selinux:en}%{!?with_selinux:dis}able-selinux \
126 --with-optimisation="%{rpmcflags}" \
127 --with-user=%(id -u) \
128 --with-group=%(id -g) \
129 --with-interface=ioctl
132 ar cru libdevmapper.a lib/ioctl/*.o lib/*.o
133 ranlib libdevmapper.a
136 rm -rf $RPM_BUILD_ROOT
137 install -d $RPM_BUILD_ROOT/{%{_lib},%{_libdir}/%{name}}
140 DESTDIR=$RPM_BUILD_ROOT
142 SONAME=$(basename $(ls -1 $RPM_BUILD_ROOT%{_libdir}/lib*.so.*.*))
143 ln -sf /%{_lib}/${SONAME} $RPM_BUILD_ROOT%{_libdir}/libdevmapper.so
144 mv -f $RPM_BUILD_ROOT%{_libdir}/lib*.so.*.* $RPM_BUILD_ROOT/%{_lib}
145 install scripts/* $RPM_BUILD_ROOT/%{_libdir}/%{name}
147 install libdevmapper.a $RPM_BUILD_ROOT%{_libdir}
148 %{?with_initrd:install initrd-dmsetup $RPM_BUILD_ROOT%{_sbindir}}
151 rm -rf $RPM_BUILD_ROOT
153 %post -p /sbin/ldconfig
154 %postun -p /sbin/ldconfig
157 %defattr(644,root,root,755)
158 %doc INTRO INSTALL README scripts/*
159 %attr(755,root,root) %{_sbindir}/dmsetup
160 %attr(755,root,root) /%{_lib}/lib*.so.*.*
164 %defattr(644,root,root,755)
165 %attr(755,root,root) %{_libdir}/libdevmapper.so
169 %defattr(644,root,root,755)
173 %defattr(644,root,root,755)
174 %dir %{_libdir}/%{name}
178 %defattr(644,root,root,755)
179 %attr(755,root,root) %{_sbindir}/initrd-dmsetup