1 Summary: Linux kernel headers for use with C libraries
2 Summary(pl): 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
25 BuildRequires: rpmbuild(macros) >= 1.213
26 Requires(pre): fileutils
27 Provides: alsa-driver-devel
28 Provides: glibc-kernel-headers = %{epoch}:%{version}-%{release}
29 Provides: i2c-devel = 2.8.2
30 Obsoletes: alsa-driver-devel
31 Obsoletes: glibc-kernel-headers
32 Obsoletes: glibc-kernheaders
33 Conflicts: lm_sensors-devel < 2.8.2-2
35 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37 %define no_install_post_strip 1
39 %ifarch %{x8664} ppc64 s390x sparc sparc64 sparcv9
46 This package includes the C header files that specify the interface
47 between the Linux kernel and userspace libraries and programs. The
48 header files define structures and constants that are needed for
49 building most standard programs and are also needed for rebuilding the
53 Ten pakiet zawiera pliki nag³ówkowe C, które definiuj± interfejs
54 miêdzy j±drem Linuksa a bibliotekami i programami dzia³aj±cymi w
55 przestrzeni u¿ytkownika. Pliki nag³ówkowe definiuj± struktury i sta³e
56 potrzebne do zbudowania wiêkszo¶ci standardowych programów, s± tak¿e
57 potrzebne do przebudowania pakietu glibc.
76 c1='defined(__i386__)'
77 c2='defined(__x86_64__)'
83 c1='defined(__powerpc__) && !defined(__powerpc64__)'
84 c2='defined(__powerpc64__)'
89 c1='defined(__s390__) && !defined(__s390x__)'
90 c2='defined(__s390x__)'
92 %ifarch sparc sparcv9 sparc64
95 c1='defined(__sparc__) && !defined(__arch64__)'
96 c2='defined(__sparc__) && defined(__arch64__)'
104 for h in `( ls asm-${a1}; ls asm-${a2} ) | grep '\.h$' | sort -u`; do
105 name=`echo $h | tr a-z. A-Z_`
108 /* All asm/ files are generated and point to the corresponding
109 * file in asm-${a1} or asm-${a2}.
112 #ifndef __ASM_STUB_${name}__
113 #define __ASM_STUB_${name}__
118 if [ -f asm-${a1}/$h ]; then
119 echo "# include <asm-${a1}/$h>" >> asm/$h
121 echo "# error <asm-${a1}/$h> does not exist" >> asm/$h
129 if [ -f asm-${a2}/$h ]; then
130 echo "# include <asm-${a2}/$h>" >> asm/$h
132 echo "# error <asm-${a2}/$h> does not exist" >> asm/$h
139 #endif /* !__ASM_STUB_${name}__ */
143 echo "asm asm-${a1} asm-${a2}" > asmdirs
147 rm -rf $RPM_BUILD_ROOT
148 install -d $RPM_BUILD_ROOT%{_includedir}
152 cp -a `cat asmdirs` $RPM_BUILD_ROOT%{_includedir}
154 cp -a asm-%{_target_base_arch} $RPM_BUILD_ROOT%{_includedir}/asm
156 cp -a linux $RPM_BUILD_ROOT%{_includedir}
157 cp -a sound $RPM_BUILD_ROOT%{_includedir}
159 install -d $RPM_BUILD_ROOT%{_includedir}/linux/ieee1394/
160 install %{SOURCE1} $RPM_BUILD_ROOT%{_includedir}/linux/ieee1394/dv1394.h
161 install %{SOURCE2} $RPM_BUILD_ROOT%{_includedir}/linux/ieee1394/ieee1394-ioctl.h
163 find $RPM_BUILD_ROOT%{_includedir} -type f \
164 '(' -name '*.orig' -o -name '*~' ')' | xargs -r rm
167 rm -rf $RPM_BUILD_ROOT
170 [ ! -L /usr/include/linux ] || rm -f /usr/include/linux
171 [ ! -L /usr/include/asm ] || rm -f /usr/include/asm
172 [ ! -L /usr/include/sound ] || rm -f /usr/include/sound
173 %ifarch sparc sparcv9 sparc64
174 [ ! -L /usr/include/asm-sparc ] || rm -f /usr/include/asm-sparc
175 [ ! -L /usr/include/asm-sparc64 ] || rm -f /usr/include/asm-sparc64
179 %defattr(644,root,root,755)