- updated to 1.5.19
[packages/klibc.git] / klibc.spec
CommitLineData
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 10Summary: Minimalistic libc subset for use with initramfs
8690a6c0 11Summary(pl.UTF-8): Zminimalizowany podzbiór biblioteki C do używania z initramfs
d3eef778 12Name: klibc
b920e5ff 13Version: 1.5.19
e0821253 14Release: 1
8c66903c 15License: BSD/GPL
d3eef778 16Group: Libraries
e0821253 17Source0: http://www.kernel.org/pub/linux/libs/klibc/Current/%{name}-%{version}.tar.bz2
b920e5ff 18# Source0-md5: 1b713fe65c345e687666b9f94b12f0a0
0de29ff3 19Patch0: %{name}-klcc.patch
b920e5ff 20Patch1: %{name}-make.patch
321006c0 21URL: http://www.zytor.com/mailman/listinfo/klibc/
580efb58 22BuildRequires: bison
23BuildRequires: flex
3f35718a 24BuildRequires: linux-libc-headers >= 7:2.6.24-1
e17d518f 25BuildRequires: perl-base
f18cfcaa 26BuildRequires: perl-modules
27BuildRequires: rpmbuild(macros) >= 1.153
d3eef778
AM
28BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29
e17d518f 30%define no_install_post_strip 1
d3eef778
AM
31
32%description
33klibc, what is intended to be a minimalistic libc subset for use with
34initramfs. It is deliberately written for small size, minimal
35entaglement and portability, not speed. It is definitely a work in
36progress, and a lot of things are still missing.
37
df4dc817
JR
38%description -l pl.UTF-8
39klibc w zamierzeniu ma być minimalistycznym podzbiorem biblioteki libc
40do użycia z initramfs. Celem jest minimalizacja, przenośność ale nie
41szybkość. klibc jest rozwijaną biblioteką w związku z czym nadal
d3eef778
AM
42brakuje wielu rzeczy.
43
bdde959a
PS
44%package devel
45Summary: Development files for klibc
8690a6c0 46Summary(pl.UTF-8): Pliki dla programistów klibc
bdde959a 47Group: Development/Libraries
d5f6848a 48Requires: %{name} = %{version}-%{release}
bdde959a 49Requires: binutils
3f35718a 50Requires: linux-libc-headers >= 7:2.6.24-1
bdde959a
PS
51
52%description devel
53Small libc for building embedded applications - development files.
54
df4dc817
JR
55%description devel -l pl.UTF-8
56Mała libc do budowania aplikacji wbudowanych - pliki dla programistów.
bdde959a
PS
57
58%package static
59Summary: Static klibc libraries
8690a6c0 60Summary(pl.UTF-8): Biblioteki statyczne klibc
bdde959a 61Group: Development/Libraries
d5f6848a 62Requires: %{name}-devel = %{version}-%{release}
bdde959a
PS
63
64%description static
65Static klibc libraries.
66
df4dc817 67%description static -l pl.UTF-8
bdde959a
PS
68Biblioteki statyczne klibc.
69
7a694fa4 70%package utils-shared
2c601817 71Summary: Utilities dynamically linked with klibc
8690a6c0 72Summary(pl.UTF-8): Narzędzia dynamicznie zlinkowane z klibc
2c601817 73Group: Base
036f735f 74Requires: %{name} = %{version}-%{release}
7a694fa4
AM
75
76%description utils-shared
036f735f
JB
77Utilities dynamically linked with klibc.
78
df4dc817
JR
79%description utils-shared -l pl.UTF-8
80Narzędzia dynamicznie zlinkowane z klibc.
7a694fa4 81
a78269a3
JR
82%package utils-shared-debug
83Summary: Utilities dynamically linked with klibc (unstripped)
40258091 84Summary(pl.UTF-8): Narzędzia dynamicznie zlinkowane z klibc (z informacjami dla debuggera)
a78269a3
JR
85Group: Base
86Requires: %{name}-utils-shared = %{version}-%{release}
87
88%description utils-shared-debug
89Utilities dynamically linked with klibc.
40258091 90
9cab31ae 91Programs in this package have debugging information not stripped.
a78269a3
JR
92
93%description utils-shared-debug -l pl.UTF-8
94Narzędzia dynamicznie zlinkowane z klibc.
40258091
JB
95
96Programy zawarte w tym pakiecie zawierają informacje dla debuggera.
a78269a3 97
7a694fa4 98%package utils-static
2c601817 99Summary: Utilities statically linked with klibc
8690a6c0 100Summary(pl.UTF-8): Narzędzia statycznie zlinkowane z klibc
2c601817 101Group: Base
7a694fa4
AM
102
103%description utils-static
104Utilities staticly linked with klibc.
105
df4dc817
JR
106%description utils-static -l pl.UTF-8
107Narzędzia statycznie zlinkowane z klibc.
a78269a3
JR
108
109%package utils-static-debug
110Summary: Utilities statically linked with klibc (unstripped)
40258091 111Summary(pl.UTF-8): Narzędzia statycznie zlinkowane z klibc (z informacjami dla debuggera)
a78269a3
JR
112Group: Base
113Requires: %{name}-utils-static = %{version}-%{release}
114
115%description utils-static-debug
116Utilities staticly linked with klibc.
40258091 117
5018c634 118Programs in this package have debugging information not stripped.
a78269a3
JR
119
120%description utils-static-debug -l pl.UTF-8
121Narzędzia statycznie zlinkowane z klibc.
40258091
JB
122
123Programy 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 131cd usr/include
30162054
JB
132ln -sf /usr/include/asm .
133ln -sf /usr/include/asm-generic .
4f5f4ff4 134%ifarch sparc64
135ln -sf /usr/include/asm-sparc .
136ln -sf /usr/include/asm-sparc64 .
137%endif
3f35718a
PS
138ln -sf /usr/include/linux .
139# early-userspace needs acces to e.g. uvesafb.h.
140ln -sf /usr/include/video .
4f5f4ff4 141
cfacef84 142cd ../..
291edbfa
JB
143install -d linux
144ln -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
159rm -rf $RPM_BUILD_ROOT
a8f95f0f 160install -d $RPM_BUILD_ROOT/%{_lib}
d3eef778 161install -d $RPM_BUILD_ROOT%{_includedir}/klibc
7a694fa4 162install -d $RPM_BUILD_ROOT%{_libdir}/klibc/bin-{shared,static}
d3eef778 163
cfacef84 164cp -a usr/include/* $RPM_BUILD_ROOT%{_includedir}/klibc
0de29ff3
AM
165install klcc/klcc -D $RPM_BUILD_ROOT%{_bindir}/klcc
166install klcc/klcc.1 -D $RPM_BUILD_ROOT%{_mandir}/man1/klcc.1
cfacef84 167install usr/klibc/libc.* usr/klibc/arch/%{_target_base_arch}/crt0.o usr/klibc/interp.o $RPM_BUILD_ROOT%{_libdir}/klibc
201b5da4 168install usr/klibc/klibc-*.so $RPM_BUILD_ROOT/%{_lib}
cfacef84
PS
169install usr/dash/sh.shared $RPM_BUILD_ROOT%{_libdir}/klibc/bin-shared/sh
170install usr/dash/sh.shared.g $RPM_BUILD_ROOT%{_libdir}/klibc/bin-shared/sh.g
171install usr/dash/sh $RPM_BUILD_ROOT%{_libdir}/klibc/bin-static/sh
172install usr/dash/sh.g $RPM_BUILD_ROOT%{_libdir}/klibc/bin-static/sh.g
386f9626 173install usr/kinit/*/shared/* $RPM_BUILD_ROOT%{_libdir}/klibc/bin-shared
174install usr/kinit/*/static/* $RPM_BUILD_ROOT%{_libdir}/klibc/bin-static
cfacef84
PS
175install usr/utils/shared/* $RPM_BUILD_ROOT%{_libdir}/klibc/bin-shared
176install usr/utils/static/* $RPM_BUILD_ROOT%{_libdir}/klibc/bin-static
7a694fa4 177
a78269a3
JR
178ln -s %{_libdir}/klibc/bin-shared $RPM_BUILD_ROOT%{_libdir}/klibc/bin
179
d3eef778
AM
180%clean
181rm -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
This page took 0.320015 seconds and 4 git commands to generate.