]> git.pld-linux.org Git - packages/klibc.git/blob - klibc.spec
- release 1.
[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:        1
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 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)
21
22 %define         no_install_post_strip   1
23
24 %description
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.
29
30 %description -l pl
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
34 brakuje wielu rzeczy.
35
36 %package utils-shared
37 Summary:        Utilities dynamically linked with klibc
38 Summary(pl):    Narzêdzia dynamicznie zlinkowane z klibc
39 Group:          Base
40 Requires:       %{name} = %{version}-%{release}
41
42 %description utils-shared
43 Utilities dynamically linked with klibc.
44
45 %description utils-shared -l pl
46 Narzêdzia dynamicznie zlinkowane z klibc.
47
48 %package utils-static
49 Summary:        Utilities statically linked with klibc
50 Summary(pl):    Narzêdzia statycznie zlinkowane z klibc
51 Group:          Base
52
53 %description utils-static
54 Utilities staticly linked with klibc.
55
56 %description utils-static -l pl
57 Narzêdzia statycznie zlinkowane z klibc.
58
59 %prep
60 %setup -q
61 %patch0 -p1
62
63 %build
64 rm -rf include/{asm,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 cp -ar %{_kernelsrcdir}/include/linux include/linux
68 ln -sf %{_kernelsrcdir}/include/linux/autoconf-up.h include/linux/autoconf.h
69
70 %{__make} \
71 %if 0
72         ARCH=%{_target_base_arch} \
73         CROSS=%{_target_base_arch}-pld-linux- \
74 %else
75         CC=%{__cc} \
76 %endif
77         OPTFLAGS="%{rpmcflags} -Os -fomit-frame-pointer -falign-functions=0 \
78                 -falign-jumps=0 -falign-loops=0 -ffreestanding"
79
80 %install
81 rm -rf $RPM_BUILD_ROOT
82 install -d $RPM_BUILD_ROOT%{_includedir}/klibc
83 install -d $RPM_BUILD_ROOT%{_libdir}/klibc/bin-{shared,static}
84
85 cp -a include/* $RPM_BUILD_ROOT%{_includedir}/klibc
86 install klcc -D $RPM_BUILD_ROOT%{_bindir}/klcc
87 install klcc.1 -D $RPM_BUILD_ROOT%{_mandir}/man1/klcc.1
88 install klibc/libc.* klibc/crt0.o $RPM_BUILD_ROOT%{_libdir}/klibc
89 install utils/shared/* $RPM_BUILD_ROOT%{_libdir}/klibc/bin-shared
90 install utils/static/* $RPM_BUILD_ROOT%{_libdir}/klibc/bin-static
91
92 %clean
93 rm -rf $RPM_BUILD_ROOT
94
95 %files
96 %defattr(644,root,root,755)
97 %attr(755,root,root) %{_bindir}/klcc
98 %{_includedir}/klibc
99 %dir %{_libdir}/klibc
100 %attr(755,root,root) %{_libdir}/klibc/*.so
101 %{_libdir}/klibc/*.[ao]
102 %{_mandir}/man1/*
103
104 %files utils-shared
105 %defattr(644,root,root,755)
106 %dir %{_libdir}/klibc/bin-shared
107 %attr(755,root,root) %{_libdir}/klibc/bin-shared/*
108
109 %files utils-static
110 %defattr(644,root,root,755)
111 %dir %{_libdir}/klibc/bin-static
112 %attr(755,root,root) %{_libdir}/klibc/bin-static/*
This page took 0.043167 seconds and 4 git commands to generate.