Contents of /trunk/mkinitrd-magellan/klibc/klibc.spec
Parent Directory | Revision Log
Revision 1122 -
(show annotations)
(download)
Wed Aug 18 21:11:40 2010 UTC (14 years, 1 month ago) by niro
File size: 4036 byte(s)
Wed Aug 18 21:11:40 2010 UTC (14 years, 1 month ago) by niro
File size: 4036 byte(s)
-updated to klibc-1.5.19
1 | Summary: A minimal libc subset for use with initramfs. |
2 | Name: klibc |
3 | Version: 1.5.19 |
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, kernel-devel |
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. |
23 | |
24 | %package devel |
25 | Summary: Libraries and tools needed to compile applications against klibc. |
26 | Group: Development/Libraries |
27 | Requires: klibc = %{version}-%{release} |
28 | |
29 | %description devel |
30 | This package contains the link libraries, header files, and gcc |
31 | wrapper scripts needed to compile applications against klibc. |
32 | |
33 | %package utils |
34 | Summary: Small utilities built with klibc. |
35 | Group: Utilities/System |
36 | Requires: klibc = %{version}-%{release} |
37 | |
38 | %description utils |
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 |
43 | embedded systems. |
44 | |
45 | %prep |
46 | %setup -q |
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 |
56 | |
57 | #include <linux/autoconf.h> |
58 | |
59 | #endif |
60 | EOF |
61 | mkdir -p %{buildroot} |
62 | |
63 | %build |
64 | make %{_smp_mflags} \ |
65 | KLIBCARCH=%{_target_cpu} prefix=%{_prefix} bindir=%{_bindir} \ |
66 | INSTALLDIR=%{klibcdir} mandir=%{_mandir} INSTALLROOT=%{buildroot} |
67 | |
68 | %install |
69 | rm -rf %{buildroot} |
70 | make KLIBCARCH=%{_target_cpu} prefix=%{_prefix} bindir=%{_bindir} \ |
71 | INSTALLDIR=%{klibcdir} mandir=%{_mandir} INSTALLROOT=%{buildroot} \ |
72 | install |
73 | |
74 | # Make the .so file in /lib a hardlink (they will be expanded as two |
75 | # files automatically if it crosses filesystems when extracted.) |
76 | ln -f %{buildroot}%{klibcdir}/lib/klibc-*.so %{buildroot}/lib |
77 | |
78 | # Install the docs |
79 | mkdir -p %{buildroot}%{bindocdir} %{buildroot}%{libdocdir} |
80 | install -m 444 README %{buildroot}%{libdocdir} |
81 | install -m 444 usr/klibc/README.klibc %{buildroot}%{libdocdir} |
82 | install -m 444 usr/klibc/arch/README.klibc.arch %{buildroot}%{libdocdir} |
83 | |
84 | install -m 444 usr/gzip/COPYING %{buildroot}%{bindocdir}/COPYING.gzip |
85 | install -m 444 usr/gzip/README %{buildroot}%{bindocdir}/README.gzip |
86 | install -m 444 usr/kinit/ipconfig/README.ipconfig %{buildroot}%{bindocdir} |
87 | install -m 444 usr/kinit/README %{buildroot}%{bindocdir}/README.kinit |
88 | |
89 | %clean |
90 | rm -rf $RPM_BUILD_ROOT |
91 | |
92 | # |
93 | # Note: libc.so and interp.o are technically -devel files, but |
94 | # put them in this package until we can make really, really sure |
95 | # the dependency system can avoid confusion. (In fact, it would be |
96 | # good to eventually get them out of here, so that multiple runtimes |
97 | # can be installed should it be necessary.) |
98 | # |
99 | %files |
100 | %defattr(-,root,root,-) |
101 | /lib/klibc-*.so |
102 | %{klibcdir}/lib/*.so |
103 | %{klibcdir}/lib/interp.o |
104 | |
105 | %files devel |
106 | %defattr(-,root,root,-) |
107 | %{klibcdir}/include |
108 | %{klibcdir}/lib/*.a |
109 | %{klibcdir}/lib/crt0.o |
110 | %{_bindir}/klcc |
111 | %doc %{_mandir}/man1/* |
112 | %doc %{libdocdir}/* |
113 | |
114 | %files utils |
115 | %defattr(-,root,root,-) |
116 | %{klibcdir}/bin |
117 | %doc %{bindocdir}/* |
118 | |
119 | %changelog |
120 | * Tue Mar 1 2005 H. Peter Anvin <hpa@zytor.com> |
121 | - New "make install" scheme, klcc |
122 | |
123 | * Tue Jul 6 2004 H. Peter Anvin <hpa@zytor.com> |
124 | - Update to use kernel-source RPM for the kernel symlink. |
125 | |
126 | * Sat Nov 29 2003 Bryan O'Sullivan <bos@serpentine.com> - |
127 | - Initial build. |