SPECS: multipath-tools.spec - try initrd building

glen glen at pld-linux.org
Tue Oct 23 18:37:59 CEST 2007


Author: glen                         Date: Tue Oct 23 16:37:59 2007 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- try initrd building

---- Files affected:
SPECS:
   multipath-tools.spec (1.30 -> 1.31) 

---- Diffs:

================================================================
Index: SPECS/multipath-tools.spec
diff -u SPECS/multipath-tools.spec:1.30 SPECS/multipath-tools.spec:1.31
--- SPECS/multipath-tools.spec:1.30	Thu Oct 18 18:23:42 2007
+++ SPECS/multipath-tools.spec	Tue Oct 23 18:37:54 2007
@@ -1,4 +1,7 @@
 # $Revision$, $Date$
+# Conditional build:
+%bcond_without	initrd		# don't build initrd version
+#
 Summary:	Tools to manage multipathed devices with the device-mapper
 Summary(pl.UTF-8):	Implementacja wielotrasowego dostępu do zasobów przy użyciu device-mappera
 Name:		multipath-tools
@@ -17,7 +20,12 @@
 BuildRequires:	libaio-devel
 BuildRequires:	linux-libc-headers >= 2.6.12.0-5
 BuildRequires:	readline-devel
+BuildRequires:	sed >= 4.0
 BuildRequires:	sysfsutils-devel >= 2.0.0
+%if %{with initrd}
+BuildRequires:	device-mapper-initrd-devel
+BuildRequires:	klibc-static
+%endif
 Conflicts:	udev < 1:070-4.1
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -51,8 +59,21 @@
 %setup -q
 %patch0 -p1
 mv kpartx/README README.kpartx
+%{__sed} -i -e 's,/lib/libdevmapper.so,/%{_lib}/libdevmapper.so,' libmultipath/Makefile
 
 %build
+%if %{with initrd}
+%{__make} -j1 \
+	BUILD=klibc \
+	CC="klcc -static" \
+	OPTFLAGS="%{rpmcflags} -Wall -Wunused -Wstrict-prototypes" \
+	BUILDDIRS='multipath pathx' \
+	klibcdir=%{_libdir}/klibc \
+	libdm='$(klibcdir)/libdevmapper.a'
+
+%{__make} clean
+%endif
+
 %{__make} -j1 \
 	OPTFLAGS="%{rpmcflags} -Wall -Wunused -Wstrict-prototypes" \
 	CC="%{__cc}"
@@ -116,6 +137,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.31  2007/10/23 16:37:54  glen
+- try initrd building
+
 Revision 1.30  2007/10/18 16:23:42  glen
 - typo
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/multipath-tools.spec?r1=1.30&r2=1.31&f=u



More information about the pld-cvs-commit mailing list