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