1 Summary: Linux kernel headers for use with C libraries
2 Summary(pl.UTF-8): Nagłówki jądra Linuksa do użytku z bibliotekami C
3 Name: linux-libc-headers
9 Source0: http://ep09.pld-linux.org/~mmazur/linux-libc-headers/%{name}-%{version}.tar.bz2
10 # Source0-md5: eae2f562afe224ad50f65a6acfb4252c
11 Source1: %{name}-dv1394.h
12 Source2: %{name}-ieee1394-ioctl.h
13 Patch0: %{name}-esfq.patch
14 Patch1: %{name}-wrr.patch
15 Patch2: %{name}-netfilter.patch
16 Patch3: %{name}-fbsplash.patch
17 Patch4: %{name}-tc-u32-mark.patch
18 Patch5: %{name}-imq.patch
19 Patch6: %{name}-endian.patch
20 # based on http://people.redhat.com/sgrubb/audit/audit.h
21 Patch7: %{name}-audit.patch
22 Patch8: %{name}-partial-2.6.15.patch
23 Patch9: %{name}-nfc.patch
24 Patch10: linux-headers-2.6.17.11-08232006-unistd_x86_PIC-1.patch
26 BuildRequires: rpmbuild(macros) >= 1.213
27 Requires(pre): fileutils
28 Provides: alsa-driver-devel
29 Provides: glibc-kernel-headers = %{epoch}:%{version}-%{release}
30 Provides: i2c-devel = 2.8.2
31 Obsoletes: alsa-driver-devel
32 Obsoletes: glibc-kernel-headers
33 Obsoletes: glibc-kernheaders
34 Conflicts: lm_sensors-devel < 2.8.2-2
36 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38 %define no_install_post_strip 1
40 %ifarch %{x8664} ppc64 s390x sparc sparc64 sparcv9
47 This package includes the C header files that specify the interface
48 between the Linux kernel and userspace libraries and programs. The
49 header files define structures and constants that are needed for
50 building most standard programs and are also needed for rebuilding the
53 %description -l pl.UTF-8
54 Ten pakiet zawiera pliki nagłówkowe C, które definiują interfejs
55 między jądrem Linuksa a bibliotekami i programami działającymi w
56 przestrzeni użytkownika. Pliki nagłówkowe definiują struktury i stałe
57 potrzebne do zbudowania większości standardowych programów, są także
58 potrzebne do przebudowania pakietu glibc.
78 c1='defined(__i386__)'
79 c2='defined(__x86_64__)'
85 c1='defined(__powerpc__) && !defined(__powerpc64__)'
86 c2='defined(__powerpc64__)'
91 c1='defined(__s390__) && !defined(__s390x__)'
92 c2='defined(__s390x__)'
94 %ifarch sparc sparcv9 sparc64
97 c1='defined(__sparc__) && !defined(__arch64__)'
98 c2='defined(__sparc__) && defined(__arch64__)'
106 for h in `( ls asm-${a1}; ls asm-${a2} ) | grep '\.h$' | sort -u`; do
107 name=`echo $h | tr a-z. A-Z_`
110 /* All asm/ files are generated and point to the corresponding
111 * file in asm-${a1} or asm-${a2}.
114 #ifndef __ASM_STUB_${name}__
115 #define __ASM_STUB_${name}__
120 if [ -f asm-${a1}/$h ]; then
121 echo "# include <asm-${a1}/$h>" >> asm/$h
123 echo "# error <asm-${a1}/$h> does not exist" >> asm/$h
131 if [ -f asm-${a2}/$h ]; then
132 echo "# include <asm-${a2}/$h>" >> asm/$h
134 echo "# error <asm-${a2}/$h> does not exist" >> asm/$h
141 #endif /* !__ASM_STUB_${name}__ */
145 echo "asm asm-${a1} asm-${a2}" > asmdirs
149 rm -rf $RPM_BUILD_ROOT
150 install -d $RPM_BUILD_ROOT%{_includedir}
154 cp -a `cat asmdirs` $RPM_BUILD_ROOT%{_includedir}
156 cp -a asm-%{_target_base_arch} $RPM_BUILD_ROOT%{_includedir}/asm
158 cp -a linux $RPM_BUILD_ROOT%{_includedir}
159 cp -a sound $RPM_BUILD_ROOT%{_includedir}
161 install -d $RPM_BUILD_ROOT%{_includedir}/linux/ieee1394/
162 install %{SOURCE1} $RPM_BUILD_ROOT%{_includedir}/linux/ieee1394/dv1394.h
163 install %{SOURCE2} $RPM_BUILD_ROOT%{_includedir}/linux/ieee1394/ieee1394-ioctl.h
165 find $RPM_BUILD_ROOT%{_includedir} -type f \
166 '(' -name '*.orig' -o -name '*~' ')' | xargs -r rm
169 rm -rf $RPM_BUILD_ROOT
172 [ ! -L /usr/include/linux ] || rm -f /usr/include/linux
173 [ ! -L /usr/include/asm ] || rm -f /usr/include/asm
174 [ ! -L /usr/include/sound ] || rm -f /usr/include/sound
175 %ifarch sparc sparcv9 sparc64
176 [ ! -L /usr/include/asm-sparc ] || rm -f /usr/include/asm-sparc
177 [ ! -L /usr/include/asm-sparc64 ] || rm -f /usr/include/asm-sparc64
181 %defattr(644,root,root,755)