SPECS: xfsprogs.spec - WIP on building initrd, dietlibc version

baggins baggins at pld-linux.org
Thu Mar 19 16:49:33 CET 2009


Author: baggins                      Date: Thu Mar 19 15:49:33 2009 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- WIP on building initrd, dietlibc version

---- Files affected:
SPECS:
   xfsprogs.spec (1.117 -> 1.118) 

---- Diffs:

================================================================
Index: SPECS/xfsprogs.spec
diff -u SPECS/xfsprogs.spec:1.117 SPECS/xfsprogs.spec:1.118
--- SPECS/xfsprogs.spec:1.117	Tue Mar 17 14:22:28 2009
+++ SPECS/xfsprogs.spec	Thu Mar 19 16:49:28 2009
@@ -1,9 +1,14 @@
 # $Revision$, $Date$
+#
+# Conditional build:
+%bcond_without	initrd		# don't build initrd version
+%bcond_without	dietlibc	# link initrd version with static glibc instead of dietlibc
+#
 Summary:	Tools for the XFS filesystem
 Summary(pl.UTF-8):	Narzędzia do systemu plików XFS
 Name:		xfsprogs
 Version:	3.0.0
-Release:	3
+Release:	3.1
 License:	LGPL v2.1 (libhandle), GPL v2 (the rest)
 Group:		Applications/System
 Source0:	ftp://linux-xfs.sgi.com/projects/xfs/cmd_tars/%{name}-%{version}.tar.gz
@@ -14,6 +19,7 @@
 Patch3:		%{name}-pl.po-update.patch
 Patch4:		%{name}-dynamic_exe.patch
 Patch5:		%{name}-LDFLAGS.patch
+Patch6:		%{name}-diet.patch
 URL:		http://oss.sgi.com/projects/xfs/
 BuildRequires:	autoconf
 BuildRequires:	automake
@@ -87,17 +93,49 @@
 # %patch3 -p1
 %patch4 -p1
 %patch5 -p1
+%patch6 -p1
 
 rm -f include/{builddefs,platform_defs}.h
 
 %build
 %{__aclocal} -I m4
+
+%if %{with initrd}
+sed -i -e 's|^AC_PACKAGE_NEED_AIO_H|dnl AC_PACKAGE_NEED_AIO_H|' \
+	-e 's|^AC_PACKAGE_NEED_LIO_LISTIO|dnl AC_PACKAGE_NEED_LIO_LISTIO|' \
+	configure.in
+sed -i -e 's|\(^LIBRT.*=.*\)|# \1|' include/builddefs.in
+sed -i -e 's|\(^LLDLIBS.*=.*\)|\1 -lcompat|' db/Makefile mkfs/Makefile
+
+%{__autoconf}
+%configure \
+	CC="diet %{__cc} -static" \
+	--disable-gettext \
+	--disable-readline \
+	--disable-shared \
+	--enable-static \
+	DEBUG="%{?debug:-DDEBUG}%{!?debug:-DNDEBUG}" \
+	OPTIMIZER="-Wno-deprecated-declarations -Os -D_BSD_SOURCE"
+
+%{__make} -j1 include libxfs libxlog libxcmd libhandle libdisk
+%{__make} -j1 db growfs logprint mkfs mdrestore repair
+
+sed -i -e 's|^dnl AC_PACKAGE_NEED_AIO_H|AC_PACKAGE_NEED_AIO_H|' \
+	-e 's|^dnl AC_PACKAGE_NEED_LIO_LISTIO|AC_PACKAGE_NEED_LIO_LISTIO|' \
+	configure.in
+sed -i -e 's|# \(^LIBRT.*=.*\)|\1|' include/builddefs.in
+sed -i -e 's|\(^LLDLIBS.*=.*\) -lcompat|\1|' db/Makefile mkfs/Makefile
+
+#{__make} clean
+%endif
+
 %{__autoconf}
 %configure \
 	--enable-gettext \
 	--enable-readline \
 	DEBUG="%{?debug:-DDEBUG}%{!?debug:-DNDEBUG}" \
 	OPTIMIZER="%{rpmcflags}"
+
 %{__make} -j1
 
 %install
@@ -198,6 +236,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.118  2009/03/19 15:49:28  baggins
+- WIP on building initrd, dietlibc version
+
 Revision 1.117  2009/03/17 13:22:28  baggins
 - removed outdated and unneeded Obsoletes
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/xfsprogs.spec?r1=1.117&r2=1.118&f=u



More information about the pld-cvs-commit mailing list