]> git.pld-linux.org Git - packages/klibc.git/blob - klibc.spec
2cd98626c0558ba30adb124f28c310f387af7958
[packages/klibc.git] / klibc.spec
1 #
2 # Conditional build:
3 %bcond_without  dist_kernel     # build without distribution kernel-headers
4 #
5 Summary:        Minimalistic libc subset for use with initramfs
6 Summary(pl):    Zminimalizowany podzbiór biblioteki C do u¿ywania z initramfs
7 Name:           klibc
8 Version:        1.0
9 Release:        0.9
10 License:        BSD/GPL
11 Group:          Libraries
12 Source0:        http://www.kernel.org/pub/linux/libs/klibc/%{name}-%{version}.tar.bz2
13 # Source0-md5:  daaa233fb7905cbe110896fcad9bec7f
14 Patch0:         %{name}-ksh-quotation.patch
15 Patch1:         %{name}-dirent.patch
16 URL:            http://www.zytor.com/mailman/listinfo/klibc/
17 %{?with_dist_kernel:BuildRequires:      kernel-headers >= 2.4}
18 BuildRequires:  rpmbuild(macros) >= 1.153
19 BuildRequires:  perl-base
20 %{?with_dist_kernel:Requires:   kernel-headers >= 2.4}
21 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22
23 %define         no_install_post_strip   1
24
25 %description
26 klibc, what is intended to be a minimalistic libc subset for use with
27 initramfs. It is deliberately written for small size, minimal
28 entaglement and portability, not speed. It is definitely a work in
29 progress, and a lot of things are still missing.
30
31 %description -l pl
32 klibc w zamierzeniu ma byæ minimalistycznym podzbiorem biblioteki libc
33 do u¿ycia z initramfs. Celem jest minimalizacja, przeno¶no¶æ ale nie
34 szybko¶æ. klibc jest rozwijan± bibliotek± w zwi±zku z czym nadal
35 brakuje wielu rzeczy.
36
37 %package utils-shared
38 Summary:        Utilities dynamically linked with klibc
39 Summary(pl):    Narzêdzia dynamicznie zlinkowane z klibc
40 Group:          Base
41 Requires:       %{name} = %{version}-%{release}
42
43 %description utils-shared
44 Utilities dynamically linked with klibc.
45
46 %description utils-shared -l pl
47 Narzêdzia dynamicznie zlinkowane z klibc.
48
49 %package utils-static
50 Summary:        Utilities statically linked with klibc
51 Summary(pl):    Narzêdzia statycznie zlinkowane z klibc
52 Group:          Base
53
54 %description utils-static
55 Utilities staticly linked with klibc.
56
57 %description utils-static -l pl
58 Narzêdzia statycznie zlinkowane z klibc.
59
60 %prep
61 %setup -q
62 %patch0 -p1
63
64 %build
65 rm -rf include/{asm,asm-generic,linux}
66 ln -sf %{_kernelsrcdir}/include/asm-%{_target_base_arch} include/asm
67 ln -sf %{_kernelsrcdir}/include/asm-generic include/asm-generic
68 cp -ar %{_kernelsrcdir}/include/linux include/linux
69 ln -sf %{_kernelsrcdir}/include/linux/autoconf-up.h include/linux/autoconf.h
70
71 %{__make} \
72 %if 0
73         ARCH=%{_target_base_arch} \
74         CROSS=%{_target_base_arch}-pld-linux- \
75 %else
76         CC=%{__cc} \
77 %endif
78         OPTFLAGS="%{rpmcflags} -Os -fomit-frame-pointer -falign-functions=0 \
79                 -falign-jumps=0 -falign-loops=0 -ffreestanding"
80
81 %install
82 rm -rf $RPM_BUILD_ROOT
83 install -d $RPM_BUILD_ROOT%{_includedir}/klibc
84 install -d $RPM_BUILD_ROOT%{_libdir}/klibc/bin-{shared,static}
85
86 cp -a include/* $RPM_BUILD_ROOT%{_includedir}/klibc
87 install klcc -D $RPM_BUILD_ROOT%{_bindir}/klcc
88 install klcc.1 -D $RPM_BUILD_ROOT%{_mandir}/man1/klcc.1
89 install klibc/libc.* klibc/crt0.o $RPM_BUILD_ROOT%{_libdir}/klibc
90 install utils/shared/* $RPM_BUILD_ROOT%{_libdir}/klibc/bin-shared
91 install utils/static/* $RPM_BUILD_ROOT%{_libdir}/klibc/bin-static
92
93 %clean
94 rm -rf $RPM_BUILD_ROOT
95
96 %files
97 %defattr(644,root,root,755)
98 %attr(755,root,root) %{_bindir}/klcc
99 %{_includedir}/klibc
100 %dir %{_libdir}/klibc
101 %attr(755,root,root) %{_libdir}/klibc/*.so
102 %{_libdir}/klibc/*.[ao]
103 %{_mandir}/man1/*
104
105 %files utils-shared
106 %defattr(644,root,root,755)
107 %dir %{_libdir}/klibc/bin-shared
108 %attr(755,root,root) %{_libdir}/klibc/bin-shared/*
109
110 %files utils-static
111 %defattr(644,root,root,755)
112 %dir %{_libdir}/klibc/bin-static
113 %attr(755,root,root) %{_libdir}/klibc/bin-static/*
This page took 5.782141 seconds and 3 git commands to generate.