]> git.pld-linux.org Git - packages/device-mapper.git/blobdiff - device-mapper.spec
- version 1.00.09
[packages/device-mapper.git] / device-mapper.spec
index d1130beb51b2a49f769de7065ef88a556c2ec261..8a35a8056456e219c2cc938a4e1024fd63d72468 100644 (file)
@@ -1,15 +1,21 @@
+#
+# Conditional build:
+%bcond_without dist_kernel     # without distribution kernel headers
+#
 Summary:       Userspace support for the device-mapper
 Summary(pl):   Wsparcie dla mapowania urz±dzeñ w przestrzeni u¿ytkownika
 Name:          device-mapper
-Version:       1.00.05
+Version:       1.00.09
 Release:       0.1@%{_kernel_ver_str}
 License:       GPL
 Group:         Applications/System
-Source0:       ftp://ftp.sistina.com/pub/LVM2/device-mapper/%{name}.%{version}.tgz
-# Source0-md5: f8203b25454dcef90f37b3bdf42d8817
+Source0:       ftp://sources.redhat.com/pub/dm/%{name}.%{version}.tgz
+# Source0-md5: c08c9478d7176a4ba2de1707baa41909
 Patch0:                %{name}-install.patch
+Patch1:                %{name}-opt.patch
 BuildRequires: autoconf
 BuildRequires: automake
+%{!?with_dist_kernel:BuildRequires:    kernel-headers}
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define                _sbindir        /sbin
@@ -42,27 +48,48 @@ Header files and development documentation for %{name}.
 %description devel -l pl
 Pliki nag³ówkowe i dokumentacja do %{name}.
 
+%package static
+Summary:       Static devmapper library
+Summary(pl):   Statyczna biblioteka devmapper
+Group:         Development/Libraries
+Requires:      %{name}-devel = %{version}
+
+%description static
+Static devmapper library.
+
+%description static -l pl
+Statyczna biblioteka devmapper.
+
 %prep
 %setup -q -n %{name}.%{version}
 %patch0 -p1
+%patch1 -p1
 
 %build
+cp -f /usr/share/automake/config.sub autoconf
 %{__aclocal}
 %{__autoconf}
 %configure \
+       --with-user=$(id -u) \
+       --with-group=$(id -g) \
        --with-interface=ioctl \
-       --with-kernel-dir=%{_kernelsrcdir} \
        --with-kernel-version=%{_kernel_ver}
 %{__make}
 
+ar cru libdevmapper.a lib/ioctl/*.o lib/*.o
+ranlib libdevmapper.a
+
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT/lib
+install -d $RPM_BUILD_ROOT{/%{_lib},%{_libdir}/%{name}}
 
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
 
-mv -f $RPM_BUILD_ROOT%{_libdir}/lib*.so.*.* $RPM_BUILD_ROOT/lib
+mv -f $RPM_BUILD_ROOT%{_libdir}/lib*.so.*.* $RPM_BUILD_ROOT/%{_lib}
+cp -f scripts/* $RPM_BUILD_ROOT%{_libdir}/%{name}
+
+install libdevmapper.a $RPM_BUILD_ROOT%{_libdir}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -74,10 +101,16 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(644,root,root,755)
 %doc INTRO INSTALL README
 %attr(755,root,root) %{_sbindir}/*
-%attr(755,root,root) /lib/lib*.so.*.*
+%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
 %{_includedir}/*.h
+
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/lib*.a
This page took 0.061739 seconds and 4 git commands to generate.