]> git.pld-linux.org Git - packages/klibc.git/blob - klibc.spec
- TODO fixed in recent pld 2.6.14 kernel
[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.1.1
9 Release:        1
10 License:        BSD/GPL
11 Group:          Libraries
12 Source0:        http://www.kernel.org/pub/linux/libs/klibc/Testing/%{name}-%{version}.tar.bz2
13 # Source0-md5:  baa1f6e0b6acbf9576bb28cca5c32c89
14 Patch0:         %{name}-ksh-quotation.patch
15 Patch1:         %{name}-klcc.patch
16 Patch2:         %{name}-fstype_jfs.patch
17 Patch3:         %{name}-ksh-syntax.patch
18 Patch4:         %{name}-kill_interp_sohash.patch
19 URL:            http://www.zytor.com/mailman/listinfo/klibc/
20 %{?with_dist_kernel:BuildRequires:      kernel-headers >= 2.4}
21 BuildRequires:  rpmbuild(macros) >= 1.153
22 BuildRequires:  perl-base
23 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25 %define         no_install_post_strip   1
26
27 %description
28 klibc, what is intended to be a minimalistic libc subset for use with
29 initramfs. It is deliberately written for small size, minimal
30 entaglement and portability, not speed. It is definitely a work in
31 progress, and a lot of things are still missing.
32
33 %description -l pl
34 klibc w zamierzeniu ma byæ minimalistycznym podzbiorem biblioteki libc
35 do u¿ycia z initramfs. Celem jest minimalizacja, przeno¶no¶æ ale nie
36 szybko¶æ. klibc jest rozwijan± bibliotek± w zwi±zku z czym nadal
37 brakuje wielu rzeczy.
38
39 %package devel
40 Summary:        Development files for klibc
41 Summary(pl):    Pliki dla programistów klibc
42 Group:          Development/Libraries
43 Requires:       %{name} = %{version}-%{release}
44 Requires:       binutils
45 %{?with_dist_kernel:Requires:   kernel-headers >= 2.4}
46
47 %description devel
48 Small libc for building embedded applications - development files.
49
50 %description devel -l pl
51 Ma³a libc do budowania aplikacji wbudowanych - pliki dla programistów.
52
53 %package static
54 Summary:        Static klibc libraries
55 Summary(pl):    Biblioteki statyczne klibc
56 Group:          Development/Libraries
57 Requires:       %{name}-devel = %{version}-%{release}
58
59 %description static
60 Static klibc libraries.
61
62 %description static -l pl
63 Biblioteki statyczne klibc.
64
65 %package utils-shared
66 Summary:        Utilities dynamically linked with klibc
67 Summary(pl):    Narzêdzia dynamicznie zlinkowane z klibc
68 Group:          Base
69 Requires:       %{name} = %{version}-%{release}
70
71 %description utils-shared
72 Utilities dynamically linked with klibc.
73
74 %description utils-shared -l pl
75 Narzêdzia dynamicznie zlinkowane z klibc.
76
77 %package utils-static
78 Summary:        Utilities statically linked with klibc
79 Summary(pl):    Narzêdzia statycznie zlinkowane z klibc
80 Group:          Base
81
82 %description utils-static
83 Utilities staticly linked with klibc.
84
85 %description utils-static -l pl
86 Narzêdzia statycznie zlinkowane z klibc.
87
88 %prep
89 %setup -q
90 %patch0 -p1
91 %patch1 -p1
92 %patch2 -p0
93 %patch3 -p1
94 %patch4 -p1
95
96 %build
97 cd include
98 rm -rf asm asm-generic linux
99 ln -sf %{_kernelsrcdir}/include/asm-%{_target_base_arch} .
100 ln -sf asm-%{_target_base_arch} asm
101 ln -sf %{_kernelsrcdir}/include/asm-generic .
102 ln -sf %{_kernelsrcdir}/include/linux .
103 %if %{with dist_kernel}
104 [ ! -d arch/%{_target_base_arch}/linux ] && mkdir arch/%{_target_base_arch}/linux
105 ln -sf  %{_kernelsrcdir}/include/linux/autoconf-up.h arch/%{_target_base_arch}/linux/autoconf.h
106 %endif
107 for a in `ls arch`; do [ "$a" != "%{_target_base_arch}" ] && rm -rf arch/$a; done
108 cd ..
109
110 %{__make} \
111         ARCH=%{_target_base_arch} \
112         CC="%{__cc}" \
113         prefix=%{_prefix} \
114         bindir=%{_bindir} \
115         includedir=%{_includedir}/klibc \
116         libdir=%{_libdir} \
117         SHLIBDIR=/%{_lib} \
118         OPTFLAGS="%{rpmcflags} -Os -fomit-frame-pointer -falign-functions=0 \
119                 -falign-jumps=0 -falign-loops=0 -ffreestanding"
120
121 %install
122 rm -rf $RPM_BUILD_ROOT
123 install -d $RPM_BUILD_ROOT/%{_lib}
124 install -d $RPM_BUILD_ROOT%{_includedir}/klibc
125 install -d $RPM_BUILD_ROOT%{_libdir}/klibc/bin-{shared,static}
126
127 cp -a include/* $RPM_BUILD_ROOT%{_includedir}/klibc
128 install klcc -D $RPM_BUILD_ROOT%{_bindir}/klcc
129 install klcc.1 -D $RPM_BUILD_ROOT%{_mandir}/man1/klcc.1
130 install klibc/libc.* klibc/crt0.o klibc/interp.o $RPM_BUILD_ROOT%{_libdir}/klibc
131 install klibc/klibc.so $RPM_BUILD_ROOT/%{_lib}
132 install utils/shared/* $RPM_BUILD_ROOT%{_libdir}/klibc/bin-shared
133 install utils/static/* $RPM_BUILD_ROOT%{_libdir}/klibc/bin-static
134
135 %clean
136 rm -rf $RPM_BUILD_ROOT
137
138 %files
139 %defattr(644,root,root,755)
140 %attr(755,root,root) /%{_lib}/klibc.so
141
142 %files devel
143 %defattr(644,root,root,755)
144 %attr(755,root,root) %{_bindir}/klcc
145 %{_includedir}/klibc
146 %dir %{_libdir}/klibc
147 %attr(755,root,root) %{_libdir}/klibc/*.so
148 %{_libdir}/klibc/*.o
149 %{_mandir}/man1/*
150
151 %files static
152 %defattr(644,root,root,755)
153 %{_libdir}/klibc/*.a
154
155 %files utils-shared
156 %defattr(644,root,root,755)
157 %dir %{_libdir}/klibc/bin-shared
158 %attr(755,root,root) %{_libdir}/klibc/bin-shared/*
159
160 %files utils-static
161 %defattr(644,root,root,755)
162 %dir %{_libdir}/klibc/bin-static
163 %attr(755,root,root) %{_libdir}/klibc/bin-static/*
This page took 0.049089 seconds and 4 git commands to generate.