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