3 %bcond_without dist_kernel # build without distribution kernel-headers
5 Summary: Minimalistic libc subset for use with initramfs
6 Summary(pl): Zminimalizowany podzbiór biblioteki C do u¿ywania z initramfs
12 Source0: ftp://ftp.kernel.org/pub/linux/libs/klibc/%{name}-%{version}.tar.bz2
13 # Source0-md5: d2616bbc5762dc1f2f9ebd87b597644e
14 Patch0: %{name}-ksh-quotation.patch
15 URL: http://www.zytor.com/mailman/listinfo/klibc/
16 %{?with_dist_kernel:BuildRequires: kernel-headers >= 2.4}
17 BuildRequires: rpmbuild(macros) >= 1.153
18 BuildRequires: perl-base
19 %{?with_dist_kernel:Requires: kernel-headers >= 2.4}
20 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22 %define no_install_post_strip 1
25 klibc, what is intended to be a minimalistic libc subset for use with
26 initramfs. It is deliberately written for small size, minimal
27 entaglement and portability, not speed. It is definitely a work in
28 progress, and a lot of things are still missing.
31 klibc w zamierzeniu ma byæ minimalistycznym podzbiorem biblioteki libc
32 do u¿ycia z initramfs. Celem jest minimalizacja, przeno¶no¶æ ale nie
33 szybko¶æ. klibc jest rozwijan± bibliotek± w zwi±zku z czym nadal
37 Summary: Utilities dynamically linked with klibc
38 Summary(pl): Narzêdzia dynamicznie zlinkowane z klibc
40 Requires: %{name} = %{version}-%{release}
42 %description utils-shared
43 Utilities dynamically linked with klibc.
45 %description utils-shared -l pl
46 Narzêdzia dynamicznie zlinkowane z klibc.
49 Summary: Utilities statically linked with klibc
50 Summary(pl): Narzêdzia statycznie zlinkowane z klibc
53 %description utils-static
54 Utilities staticly linked with klibc.
56 %description utils-static -l pl
57 Narzêdzia statycznie zlinkowane z klibc.
64 rm -rf include/{asm,generic,linux}
65 ln -sf %{_kernelsrcdir}/include/asm-%{_target_base_arch} include/asm
66 ln -sf %{_kernelsrcdir}/include/asm-generic include/asm-generic
67 ln -sf %{_kernelsrcdir}/include/linux include/linux
71 OPTFLAGS="%{rpmcflags} -Os -fomit-frame-pointer -falign-functions=0 \
72 -falign-jumps=0 -falign-loops=0"
75 rm -rf $RPM_BUILD_ROOT
76 install -d $RPM_BUILD_ROOT%{_includedir}/klibc
77 install -d $RPM_BUILD_ROOT%{_libdir}/klibc/bin-{shared,static}
79 cp -a include/* $RPM_BUILD_ROOT%{_includedir}/klibc
80 install klibc/libc.* klibc/crt0.o $RPM_BUILD_ROOT%{_libdir}/klibc
82 install utils/shared/* $RPM_BUILD_ROOT%{_libdir}/klibc/bin-shared
83 install utils/static/* $RPM_BUILD_ROOT%{_libdir}/klibc/bin-static
86 rm -rf $RPM_BUILD_ROOT
89 %defattr(644,root,root,755)
91 %attr(755,root,root) %{_libdir}/klibc/*.so
92 %{_libdir}/klibc/*.[ao]
96 %defattr(644,root,root,755)
97 %dir %{_libdir}/klibc/bin-shared
98 %attr(755,root,root) %{_libdir}/klibc/bin-shared/*
101 %defattr(644,root,root,755)
102 %dir %{_libdir}/klibc/bin-static
103 %attr(755,root,root) %{_libdir}/klibc/bin-static/*