]>
Commit | Line | Data |
---|---|---|
e17d518f | 1 | # |
e0821253 JK |
2 | # TODO: |
3 | # - warning: Installed (but unpackaged) file(s) found: | |
4 | # /usr/lib/klibc/libc.so.hash | |
5 | # | |
e17d518f JB |
6 | # Conditional build: |
7 | %bcond_without dist_kernel # build without distribution kernel-headers | |
4f5f4ff4 | 8 | %bcond_with verbose # verbose build |
e17d518f | 9 | # |
d3eef778 | 10 | Summary: Minimalistic libc subset for use with initramfs |
8690a6c0 | 11 | Summary(pl.UTF-8): Zminimalizowany podzbiór biblioteki C do używania z initramfs |
d3eef778 | 12 | Name: klibc |
b8016b7e | 13 | Version: 1.5.24 |
e0821253 | 14 | Release: 1 |
8c66903c | 15 | License: BSD/GPL |
d3eef778 | 16 | Group: Libraries |
e0821253 | 17 | Source0: http://www.kernel.org/pub/linux/libs/klibc/Current/%{name}-%{version}.tar.bz2 |
b8016b7e | 18 | # Source0-md5: 4df9b0d3d7f9f366c4b5c171cac3c6c3 |
0de29ff3 | 19 | Patch0: %{name}-klcc.patch |
321006c0 | 20 | URL: http://www.zytor.com/mailman/listinfo/klibc/ |
e65c6b5d JB |
21 | # ld.bfd binary |
22 | BuildRequires: binutils >= 2.20.51.0.6 | |
580efb58 | 23 | BuildRequires: bison |
24 | BuildRequires: flex | |
3f35718a | 25 | BuildRequires: linux-libc-headers >= 7:2.6.24-1 |
e17d518f | 26 | BuildRequires: perl-base |
f18cfcaa | 27 | BuildRequires: perl-modules |
28 | BuildRequires: rpmbuild(macros) >= 1.153 | |
d3eef778 AM |
29 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
30 | ||
e17d518f | 31 | %define no_install_post_strip 1 |
d3eef778 AM |
32 | |
33 | %description | |
34 | klibc, what is intended to be a minimalistic libc subset for use with | |
35 | initramfs. It is deliberately written for small size, minimal | |
36 | entaglement and portability, not speed. It is definitely a work in | |
37 | progress, and a lot of things are still missing. | |
38 | ||
df4dc817 JR |
39 | %description -l pl.UTF-8 |
40 | klibc w zamierzeniu ma być minimalistycznym podzbiorem biblioteki libc | |
41 | do użycia z initramfs. Celem jest minimalizacja, przenośność ale nie | |
42 | szybkość. klibc jest rozwijaną biblioteką w związku z czym nadal | |
d3eef778 AM |
43 | brakuje wielu rzeczy. |
44 | ||
bdde959a PS |
45 | %package devel |
46 | Summary: Development files for klibc | |
8690a6c0 | 47 | Summary(pl.UTF-8): Pliki dla programistów klibc |
bdde959a | 48 | Group: Development/Libraries |
d5f6848a | 49 | Requires: %{name} = %{version}-%{release} |
bdde959a | 50 | Requires: binutils |
3f35718a | 51 | Requires: linux-libc-headers >= 7:2.6.24-1 |
bdde959a PS |
52 | |
53 | %description devel | |
54 | Small libc for building embedded applications - development files. | |
55 | ||
df4dc817 JR |
56 | %description devel -l pl.UTF-8 |
57 | Mała libc do budowania aplikacji wbudowanych - pliki dla programistów. | |
bdde959a PS |
58 | |
59 | %package static | |
60 | Summary: Static klibc libraries | |
8690a6c0 | 61 | Summary(pl.UTF-8): Biblioteki statyczne klibc |
bdde959a | 62 | Group: Development/Libraries |
d5f6848a | 63 | Requires: %{name}-devel = %{version}-%{release} |
bdde959a PS |
64 | |
65 | %description static | |
66 | Static klibc libraries. | |
67 | ||
df4dc817 | 68 | %description static -l pl.UTF-8 |
bdde959a PS |
69 | Biblioteki statyczne klibc. |
70 | ||
7a694fa4 | 71 | %package utils-shared |
2c601817 | 72 | Summary: Utilities dynamically linked with klibc |
8690a6c0 | 73 | Summary(pl.UTF-8): Narzędzia dynamicznie zlinkowane z klibc |
2c601817 | 74 | Group: Base |
036f735f | 75 | Requires: %{name} = %{version}-%{release} |
7a694fa4 AM |
76 | |
77 | %description utils-shared | |
036f735f JB |
78 | Utilities dynamically linked with klibc. |
79 | ||
df4dc817 JR |
80 | %description utils-shared -l pl.UTF-8 |
81 | Narzędzia dynamicznie zlinkowane z klibc. | |
7a694fa4 | 82 | |
a78269a3 JR |
83 | %package utils-shared-debug |
84 | Summary: Utilities dynamically linked with klibc (unstripped) | |
40258091 | 85 | Summary(pl.UTF-8): Narzędzia dynamicznie zlinkowane z klibc (z informacjami dla debuggera) |
a78269a3 JR |
86 | Group: Base |
87 | Requires: %{name}-utils-shared = %{version}-%{release} | |
88 | ||
89 | %description utils-shared-debug | |
90 | Utilities dynamically linked with klibc. | |
40258091 | 91 | |
9cab31ae | 92 | Programs in this package have debugging information not stripped. |
a78269a3 JR |
93 | |
94 | %description utils-shared-debug -l pl.UTF-8 | |
95 | Narzędzia dynamicznie zlinkowane z klibc. | |
40258091 JB |
96 | |
97 | Programy zawarte w tym pakiecie zawierają informacje dla debuggera. | |
a78269a3 | 98 | |
7a694fa4 | 99 | %package utils-static |
2c601817 | 100 | Summary: Utilities statically linked with klibc |
8690a6c0 | 101 | Summary(pl.UTF-8): Narzędzia statycznie zlinkowane z klibc |
2c601817 | 102 | Group: Base |
7a694fa4 AM |
103 | |
104 | %description utils-static | |
105 | Utilities staticly linked with klibc. | |
106 | ||
df4dc817 JR |
107 | %description utils-static -l pl.UTF-8 |
108 | Narzędzia statycznie zlinkowane z klibc. | |
a78269a3 JR |
109 | |
110 | %package utils-static-debug | |
111 | Summary: Utilities statically linked with klibc (unstripped) | |
40258091 | 112 | Summary(pl.UTF-8): Narzędzia statycznie zlinkowane z klibc (z informacjami dla debuggera) |
a78269a3 JR |
113 | Group: Base |
114 | Requires: %{name}-utils-static = %{version}-%{release} | |
115 | ||
116 | %description utils-static-debug | |
117 | Utilities staticly linked with klibc. | |
40258091 | 118 | |
5018c634 | 119 | Programs in this package have debugging information not stripped. |
a78269a3 JR |
120 | |
121 | %description utils-static-debug -l pl.UTF-8 | |
122 | Narzędzia statycznie zlinkowane z klibc. | |
40258091 JB |
123 | |
124 | Programy zawarte w tym pakiecie zawierają informacje dla debuggera. | |
036f735f | 125 | |
d3eef778 AM |
126 | %prep |
127 | %setup -q | |
1a41b530 | 128 | %patch0 -p1 |
d3eef778 AM |
129 | |
130 | %build | |
cfacef84 | 131 | cd usr/include |
30162054 JB |
132 | ln -sf /usr/include/asm . |
133 | ln -sf /usr/include/asm-generic . | |
4f5f4ff4 | 134 | %ifarch sparc64 |
135 | ln -sf /usr/include/asm-sparc . | |
136 | ln -sf /usr/include/asm-sparc64 . | |
137 | %endif | |
3f35718a PS |
138 | ln -sf /usr/include/linux . |
139 | # early-userspace needs acces to e.g. uvesafb.h. | |
140 | ln -sf /usr/include/video . | |
4f5f4ff4 | 141 | |
cfacef84 | 142 | cd ../.. |
291edbfa JB |
143 | install -d linux |
144 | ln -sf ../usr/include linux/include | |
d3eef778 | 145 | |
d3eef778 | 146 | %{__make} \ |
8c66903c | 147 | ARCH=%{_target_base_arch} \ |
f2698199 | 148 | HOSTCC="%{__cc}" \ |
e65c6b5d JB |
149 | CC="%{__cc}" \ |
150 | LD="ld.bfd" \ | |
278b233a AM |
151 | rpm_prefix=%{_prefix} \ |
152 | rpm_bindir=%{_bindir} \ | |
153 | rpm_includedir=%{_includedir}/klibc \ | |
154 | rpm_libdir=%{_libdir} \ | |
09055665 | 155 | SHLIBDIR=/%{_lib} \ |
4f5f4ff4 | 156 | %{?with_verbose:KBUILD_VERBOSE=1} \ |
d3eef778 | 157 | OPTFLAGS="%{rpmcflags} -Os -fomit-frame-pointer -falign-functions=0 \ |
368a55c7 | 158 | -falign-jumps=0 -falign-loops=0 -ffreestanding" |
d3eef778 AM |
159 | |
160 | %install | |
161 | rm -rf $RPM_BUILD_ROOT | |
a8f95f0f | 162 | install -d $RPM_BUILD_ROOT/%{_lib} |
d3eef778 | 163 | install -d $RPM_BUILD_ROOT%{_includedir}/klibc |
7a694fa4 | 164 | install -d $RPM_BUILD_ROOT%{_libdir}/klibc/bin-{shared,static} |
d3eef778 | 165 | |
cfacef84 | 166 | cp -a usr/include/* $RPM_BUILD_ROOT%{_includedir}/klibc |
0de29ff3 AM |
167 | install klcc/klcc -D $RPM_BUILD_ROOT%{_bindir}/klcc |
168 | install klcc/klcc.1 -D $RPM_BUILD_ROOT%{_mandir}/man1/klcc.1 | |
cfacef84 | 169 | install usr/klibc/libc.* usr/klibc/arch/%{_target_base_arch}/crt0.o usr/klibc/interp.o $RPM_BUILD_ROOT%{_libdir}/klibc |
201b5da4 | 170 | install usr/klibc/klibc-*.so $RPM_BUILD_ROOT/%{_lib} |
cfacef84 PS |
171 | install usr/dash/sh.shared $RPM_BUILD_ROOT%{_libdir}/klibc/bin-shared/sh |
172 | install usr/dash/sh.shared.g $RPM_BUILD_ROOT%{_libdir}/klibc/bin-shared/sh.g | |
173 | install usr/dash/sh $RPM_BUILD_ROOT%{_libdir}/klibc/bin-static/sh | |
174 | install usr/dash/sh.g $RPM_BUILD_ROOT%{_libdir}/klibc/bin-static/sh.g | |
386f9626 | 175 | install usr/kinit/*/shared/* $RPM_BUILD_ROOT%{_libdir}/klibc/bin-shared |
176 | install usr/kinit/*/static/* $RPM_BUILD_ROOT%{_libdir}/klibc/bin-static | |
cfacef84 PS |
177 | install usr/utils/shared/* $RPM_BUILD_ROOT%{_libdir}/klibc/bin-shared |
178 | install usr/utils/static/* $RPM_BUILD_ROOT%{_libdir}/klibc/bin-static | |
7a694fa4 | 179 | |
a78269a3 JR |
180 | ln -s %{_libdir}/klibc/bin-shared $RPM_BUILD_ROOT%{_libdir}/klibc/bin |
181 | ||
d3eef778 AM |
182 | %clean |
183 | rm -rf $RPM_BUILD_ROOT | |
184 | ||
185 | %files | |
186 | %defattr(644,root,root,755) | |
201b5da4 | 187 | %attr(755,root,root) /%{_lib}/klibc-*.so |
bdde959a PS |
188 | |
189 | %files devel | |
190 | %defattr(644,root,root,755) | |
00a0ff6f PS |
191 | %attr(755,root,root) %{_bindir}/klcc |
192 | %{_includedir}/klibc | |
d3eef778 | 193 | %dir %{_libdir}/klibc |
d3eef778 | 194 | %attr(755,root,root) %{_libdir}/klibc/*.so |
bdde959a | 195 | %{_libdir}/klibc/*.o |
e65c6b5d | 196 | %{_mandir}/man1/klcc.1* |
7a694fa4 | 197 | |
bdde959a PS |
198 | %files static |
199 | %defattr(644,root,root,755) | |
200 | %{_libdir}/klibc/*.a | |
201 | ||
7a694fa4 AM |
202 | %files utils-shared |
203 | %defattr(644,root,root,755) | |
a78269a3 | 204 | %{_libdir}/klibc/bin |
7a694fa4 AM |
205 | %dir %{_libdir}/klibc/bin-shared |
206 | %attr(755,root,root) %{_libdir}/klibc/bin-shared/* | |
a78269a3 JR |
207 | %exclude %{_libdir}/klibc/bin-shared/*.g |
208 | ||
209 | %files utils-shared-debug | |
210 | %defattr(644,root,root,755) | |
211 | %attr(755,root,root) %{_libdir}/klibc/bin-shared/*.g | |
7a694fa4 AM |
212 | |
213 | %files utils-static | |
214 | %defattr(644,root,root,755) | |
215 | %dir %{_libdir}/klibc/bin-static | |
216 | %attr(755,root,root) %{_libdir}/klibc/bin-static/* | |
a78269a3 JR |
217 | %exclude %{_libdir}/klibc/bin-static/*.g |
218 | ||
219 | %files utils-static-debug | |
220 | %defattr(644,root,root,755) | |
221 | %attr(755,root,root) %{_libdir}/klibc/bin-static/*.g |