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