]>
Commit | Line | Data |
---|---|---|
e17d518f JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without dist_kernel # build without distribution kernel-headers | |
4 | # | |
d3eef778 | 5 | Summary: Minimalistic libc subset for use with initramfs |
8690a6c0 | 6 | Summary(pl.UTF-8): Zminimalizowany podzbiór biblioteki C do używania z initramfs |
d3eef778 | 7 | Name: klibc |
c1ca1f97 | 8 | Version: 1.5 |
9 | Release: 1 | |
8c66903c | 10 | License: BSD/GPL |
d3eef778 | 11 | Group: Libraries |
c1ca1f97 | 12 | Source0: http://www.kernel.org/pub/linux/libs/klibc/%{name}-%{version}.tar.bz2 |
13 | # Source0-md5: 481dfdef7273f2cc776c2637f481f017 | |
0de29ff3 AM |
14 | Patch0: %{name}-klcc.patch |
15 | Patch1: %{name}-kill_interp_sohash.patch | |
321006c0 | 16 | URL: http://www.zytor.com/mailman/listinfo/klibc/ |
580efb58 | 17 | BuildRequires: bison |
18 | BuildRequires: flex | |
291edbfa | 19 | BuildRequires: linux-libc-headers >= 7:2.6.20 |
1a41b530 | 20 | BuildRequires: rpmbuild(macros) >= 1.153 |
e17d518f | 21 | BuildRequires: perl-base |
d3eef778 AM |
22 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
23 | ||
e17d518f | 24 | %define no_install_post_strip 1 |
d3eef778 AM |
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 | ||
df4dc817 JR |
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 | |
d3eef778 AM |
36 | brakuje wielu rzeczy. |
37 | ||
bdde959a PS |
38 | %package devel |
39 | Summary: Development files for klibc | |
8690a6c0 | 40 | Summary(pl.UTF-8): Pliki dla programistów klibc |
bdde959a | 41 | Group: Development/Libraries |
d5f6848a | 42 | Requires: %{name} = %{version}-%{release} |
bdde959a | 43 | Requires: binutils |
291edbfa | 44 | Requires: linux-libc-headers >= 7:2.6.20 |
bdde959a PS |
45 | |
46 | %description devel | |
47 | Small libc for building embedded applications - development files. | |
48 | ||
df4dc817 JR |
49 | %description devel -l pl.UTF-8 |
50 | Mała libc do budowania aplikacji wbudowanych - pliki dla programistów. | |
bdde959a PS |
51 | |
52 | %package static | |
53 | Summary: Static klibc libraries | |
8690a6c0 | 54 | Summary(pl.UTF-8): Biblioteki statyczne klibc |
bdde959a | 55 | Group: Development/Libraries |
d5f6848a | 56 | Requires: %{name}-devel = %{version}-%{release} |
bdde959a PS |
57 | |
58 | %description static | |
59 | Static klibc libraries. | |
60 | ||
df4dc817 | 61 | %description static -l pl.UTF-8 |
bdde959a PS |
62 | Biblioteki statyczne klibc. |
63 | ||
7a694fa4 | 64 | %package utils-shared |
2c601817 | 65 | Summary: Utilities dynamically linked with klibc |
8690a6c0 | 66 | Summary(pl.UTF-8): Narzędzia dynamicznie zlinkowane z klibc |
2c601817 | 67 | Group: Base |
036f735f | 68 | Requires: %{name} = %{version}-%{release} |
7a694fa4 AM |
69 | |
70 | %description utils-shared | |
036f735f JB |
71 | Utilities dynamically linked with klibc. |
72 | ||
df4dc817 JR |
73 | %description utils-shared -l pl.UTF-8 |
74 | Narzędzia dynamicznie zlinkowane z klibc. | |
7a694fa4 AM |
75 | |
76 | %package utils-static | |
2c601817 | 77 | Summary: Utilities statically linked with klibc |
8690a6c0 | 78 | Summary(pl.UTF-8): Narzędzia statycznie zlinkowane z klibc |
2c601817 | 79 | Group: Base |
7a694fa4 AM |
80 | |
81 | %description utils-static | |
82 | Utilities staticly linked with klibc. | |
83 | ||
df4dc817 JR |
84 | %description utils-static -l pl.UTF-8 |
85 | Narzędzia statycznie zlinkowane z klibc. | |
036f735f | 86 | |
d3eef778 AM |
87 | %prep |
88 | %setup -q | |
1a41b530 | 89 | %patch0 -p1 |
65ee0145 | 90 | %patch1 -p1 |
d3eef778 AM |
91 | |
92 | %build | |
cfacef84 | 93 | cd usr/include |
291edbfa JB |
94 | ln -sf /usr/include/asm-generic . |
95 | ln -sf /usr/include/asm . | |
96 | ln -sf /usr/include/linux . | |
cfacef84 | 97 | cd ../.. |
291edbfa JB |
98 | install -d linux |
99 | ln -sf ../usr/include linux/include | |
d3eef778 | 100 | |
d3eef778 | 101 | %{__make} \ |
8c66903c | 102 | ARCH=%{_target_base_arch} \ |
f2698199 | 103 | HOSTCC="%{__cc}" \ |
278b233a AM |
104 | rpm_prefix=%{_prefix} \ |
105 | rpm_bindir=%{_bindir} \ | |
106 | rpm_includedir=%{_includedir}/klibc \ | |
107 | rpm_libdir=%{_libdir} \ | |
09055665 | 108 | SHLIBDIR=/%{_lib} \ |
d3eef778 | 109 | OPTFLAGS="%{rpmcflags} -Os -fomit-frame-pointer -falign-functions=0 \ |
368a55c7 | 110 | -falign-jumps=0 -falign-loops=0 -ffreestanding" |
d3eef778 AM |
111 | |
112 | %install | |
113 | rm -rf $RPM_BUILD_ROOT | |
a8f95f0f | 114 | install -d $RPM_BUILD_ROOT/%{_lib} |
d3eef778 | 115 | install -d $RPM_BUILD_ROOT%{_includedir}/klibc |
7a694fa4 | 116 | install -d $RPM_BUILD_ROOT%{_libdir}/klibc/bin-{shared,static} |
d3eef778 | 117 | |
cfacef84 | 118 | cp -a usr/include/* $RPM_BUILD_ROOT%{_includedir}/klibc |
0de29ff3 AM |
119 | install klcc/klcc -D $RPM_BUILD_ROOT%{_bindir}/klcc |
120 | install klcc/klcc.1 -D $RPM_BUILD_ROOT%{_mandir}/man1/klcc.1 | |
cfacef84 PS |
121 | install usr/klibc/libc.* usr/klibc/arch/%{_target_base_arch}/crt0.o usr/klibc/interp.o $RPM_BUILD_ROOT%{_libdir}/klibc |
122 | install usr/klibc/klibc.so $RPM_BUILD_ROOT/%{_lib} | |
123 | install usr/dash/sh.shared $RPM_BUILD_ROOT%{_libdir}/klibc/bin-shared/sh | |
124 | install usr/dash/sh.shared.g $RPM_BUILD_ROOT%{_libdir}/klibc/bin-shared/sh.g | |
125 | install usr/dash/sh $RPM_BUILD_ROOT%{_libdir}/klibc/bin-static/sh | |
126 | install usr/dash/sh.g $RPM_BUILD_ROOT%{_libdir}/klibc/bin-static/sh.g | |
386f9626 | 127 | install usr/kinit/*/shared/* $RPM_BUILD_ROOT%{_libdir}/klibc/bin-shared |
128 | install usr/kinit/*/static/* $RPM_BUILD_ROOT%{_libdir}/klibc/bin-static | |
cfacef84 PS |
129 | install usr/utils/shared/* $RPM_BUILD_ROOT%{_libdir}/klibc/bin-shared |
130 | install usr/utils/static/* $RPM_BUILD_ROOT%{_libdir}/klibc/bin-static | |
7a694fa4 | 131 | |
d3eef778 AM |
132 | %clean |
133 | rm -rf $RPM_BUILD_ROOT | |
134 | ||
135 | %files | |
136 | %defattr(644,root,root,755) | |
0806e28c | 137 | %attr(755,root,root) /%{_lib}/klibc.so |
bdde959a PS |
138 | |
139 | %files devel | |
140 | %defattr(644,root,root,755) | |
00a0ff6f PS |
141 | %attr(755,root,root) %{_bindir}/klcc |
142 | %{_includedir}/klibc | |
d3eef778 | 143 | %dir %{_libdir}/klibc |
d3eef778 | 144 | %attr(755,root,root) %{_libdir}/klibc/*.so |
bdde959a | 145 | %{_libdir}/klibc/*.o |
00a0ff6f | 146 | %{_mandir}/man1/* |
7a694fa4 | 147 | |
bdde959a PS |
148 | %files static |
149 | %defattr(644,root,root,755) | |
150 | %{_libdir}/klibc/*.a | |
151 | ||
7a694fa4 AM |
152 | %files utils-shared |
153 | %defattr(644,root,root,755) | |
154 | %dir %{_libdir}/klibc/bin-shared | |
155 | %attr(755,root,root) %{_libdir}/klibc/bin-shared/* | |
156 | ||
157 | %files utils-static | |
158 | %defattr(644,root,root,755) | |
159 | %dir %{_libdir}/klibc/bin-static | |
160 | %attr(755,root,root) %{_libdir}/klibc/bin-static/* |