summaryrefslogtreecommitdiff
path: root/klibc/klibc.spec.in
diff options
context:
space:
mode:
authorkay.sievers@vrfy.org <kay.sievers@vrfy.org>2005-03-04 04:26:44 +0100
committerGreg KH <gregkh@suse.de>2005-04-26 23:39:48 -0700
commite5f053b5312a0f8d62a2bcff8ddb095052d228bc (patch)
tree54fa17afcdb1c8919710da70f55e267d2a758e8e /klibc/klibc.spec.in
parent6d7a6d08c2386611e4ccb62ce660ceb53b1bf79f (diff)
[PATCH] klibc: update v0.205
Diffstat (limited to 'klibc/klibc.spec.in')
-rw-r--r--klibc/klibc.spec.in141
1 files changed, 43 insertions, 98 deletions
diff --git a/klibc/klibc.spec.in b/klibc/klibc.spec.in
index 8f5b2618d0..237771532a 100644
--- a/klibc/klibc.spec.in
+++ b/klibc/klibc.spec.in
@@ -7,44 +7,39 @@ Group: Development/Libraries
URL: http://www.zytor.com/mailman/listinfo/klibc
Source: http://www.kernel.org/pub/linux/libs/klibc-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
-BuildRequires: kernel-source >= 2.6.0
+BuildRequires: kernel >= 2.6.0
Packager: H. Peter Anvin <hpa@zytor.com>
Prefix: /usr
Vendor: Starving Linux Artists
+%define klibcdir %{_prefix}/lib/klibc
+%define libdocdir %{_docdir}/%{name}-%{version}-%{release}
+%define bindocdir %{_docdir}/%{name}-utils-%{version}-%{release}
+
%description
%{name} is intended to be a minimalistic libc subset for use with
initramfs. It is deliberately written for small size, minimal
entanglement, and portability, not speed. It is definitely a work in
progress, and a lot of things are still missing.
-%package kernheaders
-Summary: Kernel headers used during the build of klibc.
-Group: Development/Libraries
-
-%description kernheaders
-This package contains the set of kernel headers that were required to
-build %{name} and the utilities that ship with it. This may or may
-not be a complete enough set to build other programs that link against
-%{name}. If in doubt, use real kernel headers instead.
-
%package utils
-Summary: Small statically-linked utilities built with klibc.
+Summary: Small utilities built with klibc.
Group: Utilities/System
+Requires: klibc = %{version}
%description utils
-
-This package contains a collection of programs that are statically
-linked against klibc. These duplicate some of the functionality of a
-regular Linux toolset, but are typically much smaller than their
-full-function counterparts. They are intended for inclusion in
-initramfs images and embedded systems.
+This package contains a collection of programs that are linked against
+klibc. These duplicate some of the functionality of a regular Linux
+toolset, but are typically much smaller than their full-function
+counterparts. They are intended for inclusion in initramfs images and
+embedded systems.
%prep
%setup -q
-cp -as /usr/src/linux-`rpm -q kernel-source | tail -1 | cut -d- -f3-` ./linux
-make -C linux defconfig ARCH=%{_target_cpu}
-make -C linux prepare ARCH=%{_target_cpu}
+cp -dRs /lib/modules/`uname -r`/build ./linux
+# Shouldn't need this when getting the build tree from /lib/modules
+# make -C linux defconfig ARCH=%{_target_cpu}
+# make -C linux prepare ARCH=%{_target_cpu}
# Deal with braindamage in RedHat's kernel-source RPM
rm -f linux/include/linux/config.h
cat <<EOF > linux/include/linux/config.h
@@ -58,98 +53,48 @@ EOF
mkdir -p %{buildroot}
%build
-make ARCH=%{_target_cpu}
+make ARCH=%{_target_cpu} prefix=%{_prefix} bindir=%{_bindir} \
+ INSTALLDIR=%{klibcdir} mandir=%{_mandir} INSTALLROOT=%{buildroot}
%install
rm -rf %{buildroot}
+make ARCH=%{_target_cpu} prefix=%{_prefix} bindir=%{_bindir} \
+ INSTALLDIR=%{klibcdir} mandir=%{_mandir} INSTALLROOT=%{buildroot} \
+ install
-dest=%{buildroot}/%{prefix}
-lib=$dest/%{_lib}/klibc
-inc=$dest/include/klibc
-exe=$dest/libexec/klibc
-doc=$dest/share/doc/%{name}-%{version}
-udoc=$dest/share/doc/%{name}-utils-%{version}
-
-# First, the library.
-
-install -dD -m 755 $lib $inc/kernel $exe $doc $udoc
-install -m 755 klibc/klibc.so $lib
-install -m 644 klibc/libc.a $lib
-install -m 644 klibc/crt0.o $lib
-install -m 644 klibc/libc.so.hash $lib
-ln $lib/klibc.so $lib/libc.so
-ln $lib/klibc.so $lib/klibc-$(cat $lib/libc.so.hash).so
-
-# Next, the generated binaries.
-# These are currently static binaries, should we go for shared?
-
-install -m 755 ash/sh $exe
-install -m 755 gzip/gzip $exe
-ln $exe/gzip $exe/gunzip
-ln $exe/gzip $exe/zcat
-install -m 755 ipconfig/ipconfig $exe
-install -m 755 kinit/kinit $exe
-install -m 755 nfsmount/nfsmount $exe
-install -m 755 utils/static/* $exe
-
-# The docs.
-
-install -m 444 README $doc
-install -m 444 klibc/README $doc/README.klibc
-install -m 444 klibc/arch/README $doc/README.klibc.arch
-
-install -m 444 gzip/COPYING $udoc/COPYING.gzip
-install -m 444 gzip/README $udoc/README.gzip
-install -m 444 ipconfig/README $udoc/README.ipconfig
-install -m 444 kinit/README $udoc/README.kinit
-
-# Finally, the include files.
-
-bitsize=$(make --no-print-directory -C klibc bitsize ARCH=%{_target_cpu})
-cp --parents $(find klibc/include \( -name CVS -o -name SCCS \) -prune \
- -o -name '*.h' -print) $inc
-mv $inc/klibc $inc/klibc.$$
-mv $inc/klibc.$$/include/* $inc
-mv $inc/bits$bitsize/bitsize $inc
-rm -rf $inc/klibc.$$ $inc/bits[0-9]*
-pushd klibc/arch/%{_arch}/include
-cp --parents -f $(find . \( -name CVS -o -name SCCS \) -prune \
- -o -name '*.h' -print) $inc
-popd
-
-# Yeugh. Find the transitive closure over all kernel headers included
-# by klibc, and copy them into place.
-
-find . -name '.*.d' | xargs -r sed -e 's,[ \t][ \t]*,\n,g' | sed -n -e 's,^\.\./linux/include/,,p' | sort | uniq | (cd linux/include && xargs -ri cp --parents '{}' $inc/kernel)
+# Install the docs
+
+mkdir -p %{buildroot}%{bindocdir} %{buildroot}%{libdocdir}
+install -m 444 README %{buildroot}%{libdocdir}
+install -m 444 klibc/README %{buildroot}%{libdocdir}/README.klibc
+install -m 444 klibc/arch/README %{buildroot}%{libdocdir}/README.klibc.arch
+
+install -m 444 gzip/COPYING %{buildroot}%{bindocdir}/COPYING.gzip
+install -m 444 gzip/README %{buildroot}%{bindocdir}/README.gzip
+install -m 444 ipconfig/README %{buildroot}%{bindocdir}/README.ipconfig
+install -m 444 kinit/README %{buildroot}%{bindocdir}/README.kinit
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
-%docdir %{prefix}/share/doc/%{name}-%{version}
-%{prefix}/%{_lib}/klibc
-%dir %{prefix}/include/klibc
-%{prefix}/include/klibc/*.h
-%{prefix}/include/klibc/arpa
-%{prefix}/include/klibc/bitsize
-%{prefix}/include/klibc/klibc
-%{prefix}/include/klibc/net
-%{prefix}/include/klibc/netinet
-%{prefix}/include/klibc/sys
-%{prefix}/share/doc/%{name}-%{version}
-
-%files kernheaders
-%defattr(-,root,root,-)
-%{prefix}/include/klibc/kernel
+%{klibcdir}/lib
+%{klibcdir}/include
+%{_bindir}/klcc
+/lib/klibc-*.so
+%doc %{_mandir}/man1/*
+%doc %{libdocdir}/*
%files utils
%defattr(-,root,root,-)
-%{prefix}/libexec/klibc
-%docdir %{prefix}/share/doc/%{name}-utils-%{version}
-%{prefix}/share/doc/%{name}-utils-%{version}
+%{klibcdir}/bin
+%doc %{bindocdir}/*
%changelog
+* Tue Mar 1 2005 H. Peter Anvin <hpa@zytor.com>
+- New "make install" scheme, klcc
+
* Tue Jul 6 2004 H. Peter Anvin <hpa@zytor.com>
- Update to use kernel-source RPM for the kernel symlink.