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