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