]> git.pld-linux.org Git - packages/device-mapper.git/blobdiff - device-mapper.spec
- adds '--disable-dynamic-link' option to device-mapper's configure script
[packages/device-mapper.git] / device-mapper.spec
index a9985c949951112b9fc64c87dd3c3ba88396ccdf..775cab14e8da348b6fb36e495bd6b3148a4e9326 100644 (file)
@@ -1,22 +1,32 @@
 #
 # Conditional build:
-%bcond_without dist_kernel     # without distribution kernel headers
+%bcond_without selinux         # build without SELinux support
+%bcond_without initrd          # don't build initrd version
+%bcond_with    glibc           # build glibc-based initrd version
 #
+%ifnarch %{ix86}
+%define with_glibc 1
+%endif
 Summary:       Userspace support for the device-mapper
 Summary(pl):   Wsparcie dla mapowania urz±dzeñ w przestrzeni u¿ytkownika
 Name:          device-mapper
-Version:       1.00.17
-Release:       1@%{_kernel_ver_str}
+Version:       1.01.03
+Release:       2
 License:       GPL
 Group:         Applications/System
 Source0:       ftp://sources.redhat.com/pub/dm/%{name}.%{version}.tgz
-# Source0-md5: b74bb5fa232c77bf74f87eac2f53e1e4
-Patch0:                %{name}-opt.patch
+# Source0-md5: 10469034e2f1f1483fd3d80fb3883af2
+Patch0:                %{name}-stack.patch
 URL:           http://sources.redhat.com/dm/
 BuildRequires: autoconf
 BuildRequires: automake
-BuildRequires: libselinux-devel >= 1.10
-%{!?with_dist_kernel:BuildRequires:    kernel-headers}
+%{?with_selinux:BuildRequires: libselinux-devel >= 1.10}
+%{?with_selinux:Requires:      libselinux >= 1.10}
+%if %{with initrd}
+%{?with_glibc:BuildRequires:   glibc-static}
+%{?!with_glibc:BuildRequires:  uClibc-static}
+%endif
+Conflicts:     dev < 2.9.0-8
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define                _sbindir        /sbin
@@ -37,11 +47,24 @@ wolumen
 przestrzeni u¿ytkownika narzêdzia do zarz±dzania logicznymi
 wolumenami.
 
+%package initrd
+Summary:       Userspace support for the device-mapper - static dmsetup for initrd
+Summary(pl):   Wsparcie dla mapowania urz±dzeñ w przestrzeni u¿ytkownika - statyczne dmsetup dla initrd
+Group:         Applications/System
+Requires:      %{name} = %{version}-%{release}
+
+%description initrd
+Userspace support for the device-mapper - static dmsetup binary for initrd.
+
+%description initrd -l pl
+Wsparcie dla mapowania urz±dzeñ w przestrzeni u¿ytkownika - statyczna wersja
+dmsetup dla initrd.
+
 %package devel
 Summary:       Header files and development documentation for %{name}
 Summary(pl):   Pliki nag³ówkowe i dokumentacja do %{name}
 Group:         Development/Libraries
-Requires:      %{name} = %{version}
+Requires:      %{name} = %{version}-%{release}
 
 %description devel
 Header files and development documentation for %{name}.
@@ -53,7 +76,7 @@ Pliki nag
 Summary:       Static devmapper library
 Summary(pl):   Statyczna biblioteka devmapper
 Group:         Development/Libraries
-Requires:      %{name}-devel = %{version}
+Requires:      %{name}-devel = %{version}-%{release}
 
 %description static
 Static devmapper library.
@@ -61,6 +84,19 @@ Static devmapper library.
 %description static -l pl
 Statyczna biblioteka devmapper.
 
+%package scripts
+Summary:       Additional scripts
+Summary(pl):   Dodatkowe skrypty
+Group:         Applications/System
+Requires:      %{name} = %{version}-%{release}
+Requires:      util-linux
+
+%description scripts
+Additional scripts.
+
+%description scripts -l pl
+Dodatkowe skrypty.
+
 %prep
 %setup -q -n %{name}.%{version}
 %patch0 -p1
@@ -69,11 +105,28 @@ Statyczna biblioteka devmapper.
 cp -f /usr/share/automake/config.sub autoconf
 %{__aclocal}
 %{__autoconf}
+
+%if %{with initrd}
 %configure \
-       --with-user=$(id -u) \
-       --with-group=$(id -g) \
+       --disable-selinux \
+       --with-optimisation="%{rpmcflags}" \
+       --with-user=%(id -u) \
+       --with-group=%(id -g) \
        --with-interface=ioctl \
-       --with-kernel-version=%{_kernel_ver}
+       --enable-static_link \
+       %{?!with_glibc:CC="%{_target_cpu}-uclibc-gcc"}
+%{__make}
+
+cp -a dmsetup/dmsetup.static initrd-dmsetup
+%{__make} clean
+%endif
+
+%configure \
+       --%{?with_selinux:en}%{!?with_selinux:dis}able-selinux \
+       --with-optimisation="%{rpmcflags}" \
+       --with-user=%(id -u) \
+       --with-group=%(id -g) \
+       --with-interface=ioctl
 %{__make}
 
 ar cru libdevmapper.a lib/ioctl/*.o lib/*.o
@@ -81,7 +134,7 @@ ranlib libdevmapper.a
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{/%{_lib},%{_libdir}/%{name}}
+install -d $RPM_BUILD_ROOT/{%{_lib},%{_libdir}/%{name}}
 
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
@@ -89,9 +142,10 @@ install -d $RPM_BUILD_ROOT{/%{_lib},%{_libdir}/%{name}}
 SONAME=$(basename $(ls -1 $RPM_BUILD_ROOT%{_libdir}/lib*.so.*.*))
 ln -sf /%{_lib}/${SONAME} $RPM_BUILD_ROOT%{_libdir}/libdevmapper.so
 mv -f $RPM_BUILD_ROOT%{_libdir}/lib*.so.*.* $RPM_BUILD_ROOT/%{_lib}
-cp -f scripts/* $RPM_BUILD_ROOT%{_libdir}/%{name}
+install scripts/* $RPM_BUILD_ROOT/%{_libdir}/%{name}
 
 install libdevmapper.a $RPM_BUILD_ROOT%{_libdir}
+%{?with_initrd:install initrd-dmsetup $RPM_BUILD_ROOT%{_sbindir}}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -101,18 +155,25 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc INTRO INSTALL README
-%attr(755,root,root) %{_sbindir}/*
+%doc INTRO INSTALL README scripts/*
+%attr(755,root,root) %{_sbindir}/dmsetup
 %attr(755,root,root) /%{_lib}/lib*.so.*.*
-%dir %{_libdir}/%{name}
-%attr(755,root,root) %{_libdir}/%{name}/*
 %{_mandir}/man8/*
 
 %files devel
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/lib*.so
+%attr(755,root,root) %{_libdir}/libdevmapper.so
 %{_includedir}/*.h
 
 %files static
 %defattr(644,root,root,755)
 %{_libdir}/lib*.a
+
+%files scripts
+%defattr(644,root,root,755)
+%dir %{_libdir}/%{name}
+%{_libdir}/%{name}/*
+
+%files initrd
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_sbindir}/initrd-dmsetup
This page took 0.064678 seconds and 4 git commands to generate.