chiark / gitweb /
[PATCH] klibc: update v0.205
[elogind.git] / klibc / klibc.spec
1 Summary: A minimal libc subset for use with initramfs.
2 Name: klibc
3 Version: 0.205
4 Release: 1
5 License: BSD/GPL
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>
12 Prefix: /usr
13 Vendor: Starving Linux Artists
14
15 %define klibcdir  %{_prefix}/lib/klibc
16 %define libdocdir %{_docdir}/%{name}-%{version}-%{release}
17 %define bindocdir %{_docdir}/%{name}-utils-%{version}-%{release}
18
19 %description
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.  It is definitely a work in
23 progress, and a lot of things are still missing.
24
25 %package utils
26 Summary: Small utilities built with klibc.
27 Group: Utilities/System
28 Requires: klibc = %{version}
29
30 %description utils
31 This package contains a collection of programs that are linked against
32 klibc.  These duplicate some of the functionality of a regular Linux
33 toolset, but are typically much smaller than their full-function
34 counterparts.  They are intended for inclusion in initramfs images and
35 embedded systems.
36
37 %prep
38 %setup -q
39 cp -dRs /lib/modules/`uname -r`/build ./linux
40 # Shouldn't need this when getting the build tree from /lib/modules
41 # make -C linux defconfig ARCH=%{_target_cpu}
42 # make -C linux prepare ARCH=%{_target_cpu}
43 # Deal with braindamage in RedHat's kernel-source RPM
44 rm -f linux/include/linux/config.h
45 cat <<EOF > linux/include/linux/config.h
46 #ifndef _LINUX_CONFIG_H
47 #define _LINUX_CONFIG_H
48
49 #include <linux/autoconf.h>
50
51 #endif
52 EOF
53 mkdir -p %{buildroot}
54
55 %build
56 make  ARCH=%{_target_cpu} prefix=%{_prefix} bindir=%{_bindir} \
57         INSTALLDIR=%{klibcdir} mandir=%{_mandir} INSTALLROOT=%{buildroot}
58
59 %install
60 rm -rf %{buildroot}
61 make  ARCH=%{_target_cpu} prefix=%{_prefix} bindir=%{_bindir} \
62         INSTALLDIR=%{klibcdir} mandir=%{_mandir} INSTALLROOT=%{buildroot} \
63         install
64
65 # Install the docs
66
67 mkdir -p %{buildroot}%{bindocdir} %{buildroot}%{libdocdir}
68 install -m 444 README %{buildroot}%{libdocdir}
69 install -m 444 klibc/README %{buildroot}%{libdocdir}/README.klibc
70 install -m 444 klibc/arch/README %{buildroot}%{libdocdir}/README.klibc.arch
71
72 install -m 444 gzip/COPYING %{buildroot}%{bindocdir}/COPYING.gzip
73 install -m 444 gzip/README %{buildroot}%{bindocdir}/README.gzip
74 install -m 444 ipconfig/README %{buildroot}%{bindocdir}/README.ipconfig
75 install -m 444 kinit/README %{buildroot}%{bindocdir}/README.kinit
76
77 %clean
78 rm -rf $RPM_BUILD_ROOT
79
80 %files
81 %defattr(-,root,root,-)
82 %{klibcdir}/lib
83 %{klibcdir}/include
84 %{_bindir}/klcc
85 /lib/klibc-*.so
86 %doc %{_mandir}/man1/*
87 %doc %{libdocdir}/*
88
89 %files utils
90 %defattr(-,root,root,-)
91 %{klibcdir}/bin
92 %doc %{bindocdir}/*
93
94 %changelog
95 * Tue Mar 1 2005 H. Peter Anvin <hpa@zytor.com>
96 - New "make install" scheme, klcc
97
98 * Tue Jul 6 2004 H. Peter Anvin <hpa@zytor.com>
99 - Update to use kernel-source RPM for the kernel symlink.
100
101 * Sat Nov 29 2003 Bryan O'Sullivan <bos@serpentine.com> - 
102 - Initial build.