]> git.pld-linux.org Git - packages/klibc.git/blob - klibc.spec
- typo
[packages/klibc.git] / klibc.spec
1 #
2 # Conditional build:
3 %bcond_without  dist_kernel     # build without distribution kernel-headers
4 %bcond_with     verbose         # verbose build
5 #
6 Summary:        Minimalistic libc subset for use with initramfs
7 Summary(pl.UTF-8):      Zminimalizowany podzbiór biblioteki C do używania z initramfs
8 Name:           klibc
9 Version:        1.5.15
10 Release:        2
11 License:        BSD/GPL
12 Group:          Libraries
13 Source0:        http://www.kernel.org/pub/linux/libs/klibc/Testing/%{name}-%{version}.tar.bz2
14 # Source0-md5:  db2152a8a03bd81e21a5f451f537ae3d
15 Patch0:         %{name}-klcc.patch
16 Patch1:         %{name}-kill_interp_sohash.patch
17 URL:            http://www.zytor.com/mailman/listinfo/klibc/
18 BuildRequires:  bison
19 BuildRequires:  flex
20 BuildRequires:  linux-libc-headers >= 7:2.6.24-1
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.UTF-8
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.UTF-8):      Pliki dla programistów klibc
42 Group:          Development/Libraries
43 Requires:       %{name} = %{version}-%{release}
44 Requires:       binutils
45 Requires:       linux-libc-headers >= 7:2.6.24-1
46
47 %description devel
48 Small libc for building embedded applications - development files.
49
50 %description devel -l pl.UTF-8
51 Mała libc do budowania aplikacji wbudowanych - pliki dla programistów.
52
53 %package static
54 Summary:        Static klibc libraries
55 Summary(pl.UTF-8):      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.UTF-8
63 Biblioteki statyczne klibc.
64
65 %package utils-shared
66 Summary:        Utilities dynamically linked with klibc
67 Summary(pl.UTF-8):      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.UTF-8
75 Narzędzia dynamicznie zlinkowane z klibc.
76
77 %package utils-shared-debug
78 Summary:        Utilities dynamically linked with klibc (unstripped)
79 Summary(pl.UTF-8):      Narzędzia dynamicznie zlinkowane z klibc
80 Group:          Base
81 Requires:       %{name}-utils-shared = %{version}-%{release}
82
83 %description utils-shared-debug
84 Utilities dynamically linked with klibc.
85 Programs in this package have debugging information not stripped.
86
87 %description utils-shared-debug -l pl.UTF-8
88 Narzędzia dynamicznie zlinkowane z klibc.
89 Programy zawarte w tym pakiecie zawierają informację dla debugera.
90
91 %package utils-static
92 Summary:        Utilities statically linked with klibc
93 Summary(pl.UTF-8):      Narzędzia statycznie zlinkowane z klibc
94 Group:          Base
95
96 %description utils-static
97 Utilities staticly linked with klibc.
98 Programs in this package have debugging information not stripped.
99
100 %description utils-static -l pl.UTF-8
101 Narzędzia statycznie zlinkowane z klibc.
102 Programy zawarte w tym pakiecie zawierają informację dla debugera.
103
104 %package utils-static-debug
105 Summary:        Utilities statically linked with klibc (unstripped)
106 Summary(pl.UTF-8):      Narzędzia statycznie zlinkowane z klibc
107 Group:          Base
108 Requires:       %{name}-utils-static = %{version}-%{release}
109
110 %description utils-static-debug
111 Utilities staticly linked with klibc.
112
113 %description utils-static-debug -l pl.UTF-8
114 Narzędzia statycznie zlinkowane z klibc.
115
116 %prep
117 %setup -q
118 %patch0 -p1
119 %patch1 -p1
120
121 %build
122 cd usr/include
123 ln -sf /usr/include/asm .
124 ln -sf /usr/include/asm-generic .
125 %ifarch sparc64
126 ln -sf /usr/include/asm-sparc .
127 ln -sf /usr/include/asm-sparc64 .
128 %endif
129 ln -sf /usr/include/linux .
130 # early-userspace needs acces to e.g. uvesafb.h.
131 ln -sf /usr/include/video .
132
133 cd ../..
134 install -d linux
135 ln -sf ../usr/include linux/include
136
137 %{__make} \
138         ARCH=%{_target_base_arch} \
139         HOSTCC="%{__cc}" \
140         rpm_prefix=%{_prefix} \
141         rpm_bindir=%{_bindir} \
142         rpm_includedir=%{_includedir}/klibc \
143         rpm_libdir=%{_libdir} \
144         SHLIBDIR=/%{_lib} \
145         %{?with_verbose:KBUILD_VERBOSE=1} \
146         OPTFLAGS="%{rpmcflags} -Os -fomit-frame-pointer -falign-functions=0 \
147                 -falign-jumps=0 -falign-loops=0 -ffreestanding"
148
149 %install
150 rm -rf $RPM_BUILD_ROOT
151 install -d $RPM_BUILD_ROOT/%{_lib}
152 install -d $RPM_BUILD_ROOT%{_includedir}/klibc
153 install -d $RPM_BUILD_ROOT%{_libdir}/klibc/bin-{shared,static}
154
155 cp -a usr/include/* $RPM_BUILD_ROOT%{_includedir}/klibc
156 install klcc/klcc -D $RPM_BUILD_ROOT%{_bindir}/klcc
157 install klcc/klcc.1 -D $RPM_BUILD_ROOT%{_mandir}/man1/klcc.1
158 install usr/klibc/libc.* usr/klibc/arch/%{_target_base_arch}/crt0.o usr/klibc/interp.o $RPM_BUILD_ROOT%{_libdir}/klibc
159 install usr/klibc/klibc.so $RPM_BUILD_ROOT/%{_lib}
160 install usr/dash/sh.shared $RPM_BUILD_ROOT%{_libdir}/klibc/bin-shared/sh
161 install usr/dash/sh.shared.g $RPM_BUILD_ROOT%{_libdir}/klibc/bin-shared/sh.g
162 install usr/dash/sh $RPM_BUILD_ROOT%{_libdir}/klibc/bin-static/sh
163 install usr/dash/sh.g $RPM_BUILD_ROOT%{_libdir}/klibc/bin-static/sh.g
164 install usr/kinit/*/shared/* $RPM_BUILD_ROOT%{_libdir}/klibc/bin-shared
165 install usr/kinit/*/static/* $RPM_BUILD_ROOT%{_libdir}/klibc/bin-static
166 install usr/utils/shared/* $RPM_BUILD_ROOT%{_libdir}/klibc/bin-shared
167 install usr/utils/static/* $RPM_BUILD_ROOT%{_libdir}/klibc/bin-static
168
169 ln -s %{_libdir}/klibc/bin-shared $RPM_BUILD_ROOT%{_libdir}/klibc/bin
170
171 %clean
172 rm -rf $RPM_BUILD_ROOT
173
174 %files
175 %defattr(644,root,root,755)
176 %attr(755,root,root) /%{_lib}/klibc.so
177
178 %files devel
179 %defattr(644,root,root,755)
180 %attr(755,root,root) %{_bindir}/klcc
181 %{_includedir}/klibc
182 %dir %{_libdir}/klibc
183 %attr(755,root,root) %{_libdir}/klibc/*.so
184 %{_libdir}/klibc/*.o
185 %{_mandir}/man1/*
186
187 %files static
188 %defattr(644,root,root,755)
189 %{_libdir}/klibc/*.a
190
191 %files utils-shared
192 %defattr(644,root,root,755)
193 %{_libdir}/klibc/bin
194 %dir %{_libdir}/klibc/bin-shared
195 %attr(755,root,root) %{_libdir}/klibc/bin-shared/*
196 %exclude %{_libdir}/klibc/bin-shared/*.g
197
198 %files utils-shared-debug
199 %defattr(644,root,root,755)
200 %attr(755,root,root) %{_libdir}/klibc/bin-shared/*.g
201
202 %files utils-static
203 %defattr(644,root,root,755)
204 %dir %{_libdir}/klibc/bin-static
205 %attr(755,root,root) %{_libdir}/klibc/bin-static/*
206 %exclude %{_libdir}/klibc/bin-static/*.g
207
208 %files utils-static-debug
209 %defattr(644,root,root,755)
210 %attr(755,root,root) %{_libdir}/klibc/bin-static/*.g
This page took 0.045627 seconds and 4 git commands to generate.