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 Patch0: %{name}-esfq.patch
12 Patch1: %{name}-wrr.patch
13 Patch2: %{name}-netfilter.patch
14 Patch3: %{name}-fbsplash.patch
15 Patch4: %{name}-tc-u32-mark.patch
16 Patch5: %{name}-imq.patch
17 Patch6: %{name}-endian.patch
18 # based on http://people.redhat.com/sgrubb/audit/audit.h
19 Patch7: %{name}-audit.patch
21 BuildRequires: rpmbuild(macros) >= 1.213
22 Requires(pre): fileutils
23 Provides: alsa-driver-devel
24 Provides: i2c-devel = 2.8.2
25 Provides: glibc-kernel-headers = %{epoch}:%{version}-%{release}
26 Obsoletes: alsa-driver-devel
27 Obsoletes: glibc-kernheaders
28 Obsoletes: glibc-kernel-headers
29 Conflicts: lm_sensors-devel < 2.8.2-2
31 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33 %define no_install_post_strip 1
35 %ifarch %{x8664} ppc64 s390x sparc sparc64 sparcv9
42 This package includes the C header files that specify the interface
43 between the Linux kernel and userspace libraries and programs. The
44 header files define structures and constants that are needed for
45 building most standard programs and are also needed for rebuilding the
49 Ten pakiet zawiera pliki nag³ówkowe C, które definiuj± interfejs
50 miêdzy j±drem Linuksa a bibliotekami i programami dzia³aj±cymi w
51 przestrzeni u¿ytkownika. Pliki nag³ówkowe definiuj± struktury i sta³e
52 potrzebne do zbudowania wiêkszo¶ci standardowych programów, s± tak¿e
53 potrzebne do przebudowania pakietu glibc.
70 c1='defined(__i386__)'
71 c2='defined(__x86_64__)'
77 c1='defined(__powerpc__) && !defined(__powerpc64__)'
78 c2='defined(__powerpc64__)'
83 c1='defined(__s390__) && !defined(__s390x__)'
84 c2='defined(__s390x__)'
86 %ifarch sparc sparcv9 sparc64
89 c1='defined(__sparc__) && !defined(__arch64__)'
90 c2='defined(__sparc__) && defined(__arch64__)'
98 for h in `( ls asm-${a1}; ls asm-${a2} ) | grep '\.h$' | sort -u`; do
99 name=`echo $h | tr a-z. A-Z_`
102 /* All asm/ files are generated and point to the corresponding
103 * file in asm-${a1} or asm-${a2}.
106 #ifndef __ASM_STUB_${name}__
107 #define __ASM_STUB_${name}__
112 if [ -f asm-${a1}/$h ]; then
113 echo "# include <asm-${a1}/$h>" >> asm/$h
115 echo "# error <asm-${a1}/$h> does not exist" >> asm/$h
123 if [ -f asm-${a2}/$h ]; then
124 echo "# include <asm-${a2}/$h>" >> asm/$h
126 echo "# error <asm-${a2}/$h> does not exist" >> asm/$h
133 #endif /* !__ASM_STUB_${name}__ */
137 echo "asm asm-${a1} asm-${a2}" > asmdirs
141 rm -rf $RPM_BUILD_ROOT
142 install -d $RPM_BUILD_ROOT%{_includedir}
146 cp -a `cat asmdirs` $RPM_BUILD_ROOT%{_includedir}
148 cp -a asm-%{_target_base_arch} $RPM_BUILD_ROOT%{_includedir}/asm
150 cp -a linux $RPM_BUILD_ROOT%{_includedir}
151 cp -a sound $RPM_BUILD_ROOT%{_includedir}
153 find $RPM_BUILD_ROOT%{_includedir} -type f \
154 '(' -name '*.orig' -o -name '*~' ')' | xargs -r rm
157 rm -rf $RPM_BUILD_ROOT
160 [ ! -L /usr/include/linux ] || rm -f /usr/include/linux
161 [ ! -L /usr/include/asm ] || rm -f /usr/include/asm
162 [ ! -L /usr/include/sound ] || rm -f /usr/include/sound
163 %ifarch sparc sparcv9 sparc64
164 [ ! -L /usr/include/asm-sparc ] || rm -f /usr/include/asm-sparc
165 [ ! -L /usr/include/asm-sparc64 ] || rm -f /usr/include/asm-sparc64
169 %defattr(644,root,root,755)