]> git.pld-linux.org Git - packages/klibc.git/blob - klibc.spec
- last change reverted. this is not a bashism. ksh bug?
[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 URL:            http://www.zytor.com/mailman/listinfo/klibc/
22 %{?with_dist_kernel:BuildRequires:      kernel-headers >= 2.4}
23 BuildRequires:  rpmbuild(macros) >= 1.153
24 BuildRequires:  perl-base
25 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26
27 %define         no_install_post_strip   1
28
29 %description
30 klibc, what is intended to be a minimalistic libc subset for use with
31 initramfs. It is deliberately written for small size, minimal
32 entaglement and portability, not speed. It is definitely a work in
33 progress, and a lot of things are still missing.
34
35 %description -l pl
36 klibc w zamierzeniu ma byæ minimalistycznym podzbiorem biblioteki libc
37 do u¿ycia z initramfs. Celem jest minimalizacja, przeno¶no¶æ ale nie
38 szybko¶æ. klibc jest rozwijan± bibliotek± w zwi±zku z czym nadal
39 brakuje wielu rzeczy.
40
41 %package devel
42 Summary:        Development files for klibc
43 Summary(pl):    Pliki dla programistów klibc
44 Group:          Development/Libraries
45 Requires:       %{name} = %{epoch}:%{version}-%{release}
46 Requires:       binutils
47 %{?with_dist_kernel:Requires:   kernel-headers >= 2.4}
48
49 %description devel
50 Small libc for building embedded applications - development files.
51
52 %description devel -l pl
53 Ma³a libc do budowania aplikacji wbudowanych - pliki dla programistów.
54
55 %package static
56 Summary:        Static klibc libraries
57 Summary(pl):    Biblioteki statyczne klibc
58 Group:          Development/Libraries
59 Requires:       %{name}-devel = %{epoch}:%{version}-%{release}
60
61 %description static
62 Static klibc libraries.
63
64 %description static -l pl
65 Biblioteki statyczne klibc.
66
67 %package utils-shared
68 Summary:        Utilities dynamically linked with klibc
69 Summary(pl):    Narzêdzia dynamicznie zlinkowane z klibc
70 Group:          Base
71 Requires:       %{name} = %{version}-%{release}
72
73 %description utils-shared
74 Utilities dynamically linked with klibc.
75
76 %description utils-shared -l pl
77 Narzêdzia dynamicznie zlinkowane z klibc.
78
79 %package utils-static
80 Summary:        Utilities statically linked with klibc
81 Summary(pl):    Narzêdzia statycznie zlinkowane z klibc
82 Group:          Base
83
84 %description utils-static
85 Utilities staticly linked with klibc.
86
87 %description utils-static -l pl
88 Narzêdzia statycznie zlinkowane z klibc.
89
90 %prep
91 %setup -q
92 %patch0 -p1
93 %patch1 -p1
94 %patch2 -p0
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         OPTFLAGS="%{rpmcflags} -Os -fomit-frame-pointer -falign-functions=0 \
118                 -falign-jumps=0 -falign-loops=0 -ffreestanding"
119
120 %install
121 rm -rf $RPM_BUILD_ROOT
122 install -d $RPM_BUILD_ROOT/%{_lib}
123 install -d $RPM_BUILD_ROOT%{_includedir}/klibc
124 install -d $RPM_BUILD_ROOT%{_libdir}/klibc/bin-{shared,static}
125
126 cp -a include/* $RPM_BUILD_ROOT%{_includedir}/klibc
127 install klcc -D $RPM_BUILD_ROOT%{_bindir}/klcc
128 install klcc.1 -D $RPM_BUILD_ROOT%{_mandir}/man1/klcc.1
129 install klibc/libc.* klibc/crt0.o klibc/interp.o $RPM_BUILD_ROOT%{_libdir}/klibc
130 install klibc/klibc-*.so $RPM_BUILD_ROOT/%{_lib}
131 install utils/shared/* $RPM_BUILD_ROOT%{_libdir}/klibc/bin-shared
132 install utils/static/* $RPM_BUILD_ROOT%{_libdir}/klibc/bin-static
133
134 %clean
135 rm -rf $RPM_BUILD_ROOT
136
137 %files
138 %defattr(644,root,root,755)
139 %attr(755,root,root) /%{_lib}/klibc*.so
140
141 %files devel
142 %defattr(644,root,root,755)
143 %attr(755,root,root) %{_bindir}/klcc
144 %{_includedir}/klibc
145 %dir %{_libdir}/klibc
146 %attr(755,root,root) %{_libdir}/klibc/*.so
147 %{_libdir}/klibc/*.o
148 %{_mandir}/man1/*
149
150 %files static
151 %defattr(644,root,root,755)
152 %{_libdir}/klibc/*.a
153
154 %files utils-shared
155 %defattr(644,root,root,755)
156 %dir %{_libdir}/klibc/bin-shared
157 %attr(755,root,root) %{_libdir}/klibc/bin-shared/*
158
159 %files utils-static
160 %defattr(644,root,root,755)
161 %dir %{_libdir}/klibc/bin-static
162 %attr(755,root,root) %{_libdir}/klibc/bin-static/*
This page took 0.093246 seconds and 4 git commands to generate.