]> git.pld-linux.org Git - packages/device-mapper.git/blobdiff - device-mapper.spec
- updated to 1.02.12
[packages/device-mapper.git] / device-mapper.spec
index 8e96642d4bfa6da8359bcfca26c2eb7a94057f32..b89b4d2a7ec6429b7832ca3621f8ebd1536497f4 100644 (file)
@@ -1,3 +1,5 @@
+# TODO
+# - add fix to drop BuildConflicts:    device-mapper-initrd-devel
 #
 # Conditional build:
 %bcond_without selinux         # build without SELinux support
@@ -6,21 +8,27 @@
 Summary:       Userspace support for the device-mapper
 Summary(pl):   Wsparcie dla mapowania urz±dzeñ w przestrzeni u¿ytkownika
 Name:          device-mapper
-Version:       1.02.07
+Version:       1.02.12
 Release:       0.1
 License:       GPL v2
 Group:         Applications/System
 Source0:       ftp://sources.redhat.com/pub/dm/%{name}.%{version}.tgz
-# Source0-md5: 460cc211b03af4048ec90c0de2ecd8f7
+# Source0-md5: 8e27c50311adfe4fbb448f060ddfb332
 # http://www.redhat.com/archives/dm-devel/2005-March/msg00022.html
 Patch0:                %{name}-disable_dynamic_link.patch
 Patch1:                %{name}-klibc.patch
 Patch2:                %{name}-getopt.patch
+Patch3:                %{name}-ac.patch
+Patch4:                %{name}-force-local-headers.patch
+Patch5:                %{name}-linking.patch
 URL:           http://sources.redhat.com/dm/
 BuildRequires: autoconf
 BuildRequires: automake
 %{?with_initrd:BuildRequires:  klibc-static}
 %{?with_selinux:BuildRequires: libselinux-devel >= 1.10}
+%{?with_initrd:BuildRequires:  uClibc-static >= 0.9.26}
+# /usr/include/klibc/libdevmapper.h is included first before currently built version with klcc
+BuildConflicts:        device-mapper-initrd-devel < 1.02.07
 %{?with_selinux:Requires:      libselinux >= 1.10}
 Conflicts:     dev < 2.9.0-8
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -114,10 +122,9 @@ Dodatkowe skrypty.
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
-
-# klcc puts its own -I before any options, so klibc's <linux/*>
-# overrides include/linux/*, requiring very fresh kernel headers
-sed -i -e 's,<linux/dm-ioctl.h>,"../../kernel/ioctl/dm-ioctl.h",' lib/ioctl/libdm-iface.c
+%patch3 -p1
+%patch4 -p1
+%patch5 -p1
 
 %build
 cp -f /usr/share/automake/config.sub autoconf
@@ -125,24 +132,43 @@ cp -f /usr/share/automake/config.sub autoconf
 %{__autoconf}
 
 %if %{with initrd}
+# kcc
 %configure \
        CC="klcc -static" \
+       CLDFLAGS="%{rpmldflags}" \
        --disable-selinux \
        --disable-dynamic_link \
        --enable-static_link \
        --with-optimisation="%{rpmcflags}" \
        --with-user=%(id -u) \
        --with-group=%(id -g) \
-       --with-interface=ioctl
+       --with-interface=ioctl \
+       --disable-nls
 sed -i -e 's#rpl_malloc#malloc#g' include/configure.h
 %{__make}
 
 cp -a dmsetup/dmsetup.static initrd-dmsetup
-cp -a lib/ioctl/libdevmapper.a initrd-libdevmapper.a
+cp -a lib/ioctl/libdevmapper.a initrd-libdevmapper-klibc.a
+%{__make} clean
+
+# uclibc (for lvm2)
+%configure \
+       CC="%{_target_cpu}-uclibc-gcc" \
+       CLDFLAGS="%{rpmldflags}" \
+       --disable-selinux \
+       --disable-dynamic_link \
+       --with-optimisation="-Os" \
+       --with-interface=ioctl \
+       --disable-nls
+sed -i -e 's#rpl_malloc#malloc#g' include/configure.h
+%{__make}
+
+cp -a lib/ioctl/libdevmapper.a initrd-libdevmapper-uclibc.a
 %{__make} clean
 %endif
 
 %configure \
+       CLDFLAGS="%{rpmldflags}" \
        --%{?with_selinux:en}%{!?with_selinux:dis}able-selinux \
        --with-optimisation="%{rpmcflags}" \
        --with-user=%(id -u) \
@@ -154,7 +180,7 @@ cp -a lib/ioctl/libdevmapper.a initrd-libdevmapper.a
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT/{%{_lib},%{_libdir}/%{name},/usr/{%{_lib},include}/klibc}
+install -d $RPM_BUILD_ROOT/{%{_lib},%{_libdir}/%{name}}
 
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
@@ -170,9 +196,12 @@ install lib/ioctl/libdevmapper.a $RPM_BUILD_ROOT%{_libdir}
 install dmeventd/libdevmapper-event.a $RPM_BUILD_ROOT%{_libdir}
 
 %if %{with initrd}
+install -d $RPM_BUILD_ROOT/usr/{{%{_lib},include}/klibc,%{_target_cpu}-linux-uclibc/usr/{lib,include}}
 install initrd-dmsetup $RPM_BUILD_ROOT%{_sbindir}
-install initrd-libdevmapper.a $RPM_BUILD_ROOT/usr/%{_lib}/klibc/libdevmapper.a
+install initrd-libdevmapper-klibc.a $RPM_BUILD_ROOT/usr/%{_lib}/klibc/libdevmapper.a
+install initrd-libdevmapper-uclibc.a $RPM_BUILD_ROOT/usr/%{_target_cpu}-linux-uclibc/usr/lib/libdevmapper.a
 install include/libdevmapper.h $RPM_BUILD_ROOT/usr/include/klibc
+install include/libdevmapper.h $RPM_BUILD_ROOT/usr/%{_target_cpu}-linux-uclibc/usr/include
 %endif
 
 %clean
@@ -213,5 +242,7 @@ rm -rf $RPM_BUILD_ROOT
 %files initrd-devel
 %defattr(644,root,root,755)
 %{_prefix}/%{_lib}/klibc/libdevmapper.a
+%{_prefix}/%{_target_cpu}-linux-uclibc/usr/lib/libdevmapper.a
 %{_includedir}/klibc/libdevmapper.h
+%{_prefix}/%{_target_cpu}-linux-uclibc/usr/include/libdevmapper.h
 %endif
This page took 0.382256 seconds and 4 git commands to generate.