1 Summary: A minimal libc subset for use with initramfs.
6 Group: Development/Libraries
7 URL: http://www.zytor.com/mailman/listinfo/klibc
8 Source: http://www.kernel.org/pub/linux/libs/klibc-%{version}.tar.gz
9 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
10 BuildRequires: kernel >= 2.6.0
11 Packager: H. Peter Anvin <hpa@zytor.com>
13 Vendor: Starving Linux Artists
15 %define klibcdir %{_prefix}/lib/klibc
16 %define libdocdir %{_docdir}/%{name}-%{version}-%{release}
17 %define bindocdir %{_docdir}/%{name}-utils-%{version}-%{release}
20 %{name} is intended to be a minimalistic libc subset for use with
21 initramfs. It is deliberately written for small size, minimal
22 entanglement, and portability, not speed.
25 Summary: Libraries and tools needed to compile applications against klibc.
26 Group: Development/Libraries
27 Requires: klibc = %{version}-%{release}
30 This package contains the link libraries, header files, and gcc
31 wrapper scripts needed to compile applications against klibc.
34 Summary: Small utilities built with klibc.
35 Group: Utilities/System
36 Requires: klibc = %{version}-%{release}
39 This package contains a collection of programs that are linked against
40 klibc. These duplicate some of the functionality of a regular Linux
41 toolset, but are typically much smaller than their full-function
42 counterparts. They are intended for inclusion in initramfs images and
47 cp -dRs /lib/modules/`uname -r`/build ./linux
48 # Shouldn't need this when getting the build tree from /lib/modules
49 # make -C linux defconfig ARCH=%{_target_cpu}
50 # make -C linux prepare ARCH=%{_target_cpu}
51 # Deal with braindamage in RedHat's kernel-source RPM
52 rm -f linux/include/linux/config.h
53 cat <<EOF > linux/include/linux/config.h
54 #ifndef _LINUX_CONFIG_H
55 #define _LINUX_CONFIG_H
57 #include <linux/autoconf.h>
64 make ARCH=%{_target_cpu} prefix=%{_prefix} bindir=%{_bindir} \
65 INSTALLDIR=%{klibcdir} mandir=%{_mandir} INSTALLROOT=%{buildroot}
69 make ARCH=%{_target_cpu} prefix=%{_prefix} bindir=%{_bindir} \
70 INSTALLDIR=%{klibcdir} mandir=%{_mandir} INSTALLROOT=%{buildroot} \
73 # Make the .so file in /lib a hardlink (they will be expanded as two
74 # files automatically if it crosses filesystems when extracted.)
75 ln -f %{buildroot}%{klibcdir}/lib/klibc-*.so %{buildroot}/lib
78 mkdir -p %{buildroot}%{bindocdir} %{buildroot}%{libdocdir}
79 install -m 444 README %{buildroot}%{libdocdir}
80 install -m 444 klibc/README %{buildroot}%{libdocdir}/README.klibc
81 install -m 444 klibc/arch/README %{buildroot}%{libdocdir}/README.klibc.arch
83 install -m 444 gzip/COPYING %{buildroot}%{bindocdir}/COPYING.gzip
84 install -m 444 gzip/README %{buildroot}%{bindocdir}/README.gzip
85 install -m 444 ipconfig/README %{buildroot}%{bindocdir}/README.ipconfig
86 install -m 444 kinit/README %{buildroot}%{bindocdir}/README.kinit
89 rm -rf $RPM_BUILD_ROOT
92 # Note: libc.so and interp.o are technically -devel files, but
93 # put them in this package until we can make really, really sure
94 # the dependency system can avoid confusion. (In fact, it would be
95 # good to eventually get them out of here, so that multiple runtimes
96 # can be installed should it be necessary.)
99 %defattr(-,root,root,-)
102 %{klibcdir}/lib/interp.o
105 %defattr(-,root,root,-)
108 %{klibcdir}/lib/crt0.o
110 %doc %{_mandir}/man1/*
114 %defattr(-,root,root,-)
119 * Tue Mar 1 2005 H. Peter Anvin <hpa@zytor.com>
120 - New "make install" scheme, klcc
122 * Tue Jul 6 2004 H. Peter Anvin <hpa@zytor.com>
123 - Update to use kernel-source RPM for the kernel symlink.
125 * Sat Nov 29 2003 Bryan O'Sullivan <bos@serpentine.com> -