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