SPECS: xfsprogs.spec - added initrd package - proper BRs for initrd stuff -...
baggins
baggins at pld-linux.org
Thu Mar 19 23:01:21 CET 2009
Author: baggins Date: Thu Mar 19 22:01:21 2009 GMT
Module: SPECS Tag: HEAD
---- Log message:
- added initrd package
- proper BRs for initrd stuff
- fixed static glibc build
- bcond clenup
---- Files affected:
SPECS:
xfsprogs.spec (1.119 -> 1.120)
---- Diffs:
================================================================
Index: SPECS/xfsprogs.spec
diff -u SPECS/xfsprogs.spec:1.119 SPECS/xfsprogs.spec:1.120
--- SPECS/xfsprogs.spec:1.119 Thu Mar 19 16:50:23 2009
+++ SPECS/xfsprogs.spec Thu Mar 19 23:01:15 2009
@@ -20,11 +20,20 @@
Patch4: %{name}-dynamic_exe.patch
Patch5: %{name}-LDFLAGS.patch
Patch6: %{name}-diet.patch
+Patch7: %{name}-static-librt.patch
URL: http://oss.sgi.com/projects/xfs/
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: bash
-%{?with_dietlibc:BuildRequires: dietlibc-static >= 2:0.31-6}
+%if %{with initrd}
+ %if %{with dietlibc}
+BuildRequires: dietlibc-static >= 2:0.31-6
+BuildRequires: libuuid-dietlibc
+ %else
+BuildRequires: glibc-static
+BuildRequires: libuuid-static
+ %endif
+%endif
BuildRequires: gettext-devel
BuildRequires: libtool
BuildRequires: libuuid-devel
@@ -85,6 +94,19 @@
%description static -l pl.UTF-8
Biblioteki statyczne do XFS.
+%package initrd
+Summary: Tools for the XFS filesystem - initrd version
+Summary(pl.UTF-8): Narzędzia do systemu plików XFS - wersja dla initrd
+Group: Base
+
+%description initrd
+A set of commands to use the XFS filesystem, including mkfs.xfs
+ - initrd version.
+
+%description initrd -l pl.UTF-8
+Zbiór komend do użytku z systemem plików XFS, włączając w to mkfs.xfs
+ - wersja dla initrd.
+
%prep
%setup -q
%patch0 -p1
@@ -95,6 +117,7 @@
%patch4 -p1
%patch5 -p1
%patch6 -p1
+%patch7 -p1
rm -f include/{builddefs,platform_defs}.h
@@ -102,32 +125,44 @@
%{__aclocal} -I m4
%if %{with initrd}
+%if %{with dietlibc}
+# dietlibc doesn't have aio.h (and xfsprogs does not need it really)
+# dietlibc has needed librt stuff in libc/libpthread
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
+%endif
%{__autoconf}
%configure \
- CC="diet %{__cc} -static" \
+ %{?with_dietlibc: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"
+ OPTIMIZER="-Wno-deprecated-declarations -Os -D_BSD_SOURCE -D__USE_XOPEN_EXTENDED"
%{__make} -j1 include libxfs libxlog libxcmd libhandle libdisk
-%{__make} -j1 db growfs logprint mkfs mdrestore repair
+%{__make} -j1 db growfs logprint mkfs mdrestore repair \
+ LDFLAGS="%{rpmldflags} -all-static"
+mv -f db/xfs_db initrd-xfs_db
+mv -f growfs/xfs_growfs initrd-xfs_growfs
+mv -f logprint/xfs_logprint initrd-xfs_logprint
+mv -f mkfs/mkfs.xfs initrd-mkfs.xfs
+mv -f mdrestore/xfs_mdrestore initrd-xfs_mdrestore
+mv -f repair/xfs_repair initrd-xfs_repair
+
+%if %{with dietlibc}
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|^# \(LIBRT.*=.*\)|\1|' include/builddefs.in
sed -i -e 's|\(^LLDLIBS.*=.*\) -lcompat|\1|' db/Makefile mkfs/Makefile
+%endif
-#{__make} clean
+%{__make} clean
%endif
%{__autoconf}
@@ -168,6 +203,15 @@
%{__sed} -i -e "s| %{_libdir}/libxfs.la | %{_libexecdir}/libxfs.la |" \
$RPM_BUILD_ROOT%{_libexecdir}/libxlog.la
+%if %{with initrd}
+install initrd-xfs_db $RPM_BUILD_ROOT%{_sbindir}
+install initrd-xfs_growfs $RPM_BUILD_ROOT%{_sbindir}
+install initrd-xfs_logprint $RPM_BUILD_ROOT%{_sbindir}
+install initrd-mkfs.xfs $RPM_BUILD_ROOT%{_sbindir}
+install initrd-xfs_mdrestore $RPM_BUILD_ROOT%{_sbindir}
+install initrd-xfs_repair $RPM_BUILD_ROOT%{_sbindir}
+%endif
+
%find_lang %{name}
rm -rf $RPM_BUILD_ROOT%{_docdir}/%{name}
@@ -231,12 +275,24 @@
%{_libexecdir}/libxfs.a
%{_libexecdir}/libxlog.a
+%if %{with initrd}
+%files initrd
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_sbindir}/initrd-*
+%endif
+
%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
%changelog
* %{date} PLD Team <feedback at pld-linux.org>
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.120 2009/03/19 22:01:15 baggins
+- added initrd package
+- proper BRs for initrd stuff
+- fixed static glibc build
+- bcond clenup
+
Revision 1.119 2009/03/19 15:50:23 baggins
- BR diet with memalign, valloc and getsubopt
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/xfsprogs.spec?r1=1.119&r2=1.120&f=u
More information about the pld-cvs-commit
mailing list