Summary(uk): GNU libc ×ÅÒÓ¦§ 2.3
Name: glibc
Version: 2.3.5
-Release: 3
+Release: 3.1
Epoch: 6
License: LGPL
Group: Libraries
Source6: %{name}-non-english-man-pages.tar.bz2
# Source6-md5: 6159f0a9b6426b5f6fc1b0d8d21b9b76
Source7: %{name}-localedb-gen
+Source8: %{name}-LD-path.c
Patch0: %{name}-info.patch
Patch1: %{name}-pl.po-update.patch
Patch2: %{name}-pld.patch
BuildRequires: rpmbuild(macros) >= 1.213
BuildRequires: sed >= 4.0.5
BuildRequires: texinfo
+BuildRequires: dietlibc-static
AutoReq: false
PreReq: basesystem
Requires: glibc-misc = %{epoch}:%{version}-%{release}
done
%endif
+diet -Os %{__cc} %{SOURCE8} %{rpmcflags} -static -o glibc-postinst
+# compiling static using diet vs glibc saves 400k
+# TODO: use SOURCEX
+# TODO2: remove fprintf/fopen from postshell.c to save 7kb?
+diet -Os %{__cc} elf/postshell.c %{rpmcflags} -static -o postshell
+
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT{/etc/{logrotate.d,rc.d/init.d,sysconfig},%{_mandir}/man{3,8},/var/log,/var/{lib,run}/nscd}
install $PICFILES $RPM_BUILD_ROOT%{_libdir}
install elf/soinit.os $RPM_BUILD_ROOT%{_libdir}/soinit.o
install elf/sofini.os $RPM_BUILD_ROOT%{_libdir}/sofini.o
-
-install elf/postshell $RPM_BUILD_ROOT/sbin
cd ..
+install postshell $RPM_BUILD_ROOT/sbin
+install glibc-postinst $RPM_BUILD_ROOT/sbin
+
%if %{with dual}
env LANGUAGE=C LC_ALL=C \
%{__make} -C builddir-nptl install \
%else
%post -p /sbin/postshell
%endif
+/sbin/glibc-postinst /%{_lib}/%{_host_cpu}
/sbin/ldconfig
-/sbin/telinit u
%defattr(644,root,root,755)
%doc README NEWS FAQ BUGS
%attr(755,root,root) /sbin/postshell
+%attr(755,root,root) /sbin/glibc-postinst
%attr(755,root,root) /sbin/ldconfig
# ld* and libc.so.6 SONAME symlinks must be in package because of
# chicken-egg problem (postshell is dynamically linked with libc);