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