]> git.pld-linux.org Git - packages/linux-libc-headers.git/blob - linux-libc-headers.spec
779cf0e8ac4b8e99a1ac8e643bf564275ab857b1
[packages/linux-libc-headers.git] / linux-libc-headers.spec
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
4 Version:        2.6.12.0
5 Release:        15
6 Epoch:          7
7 License:        GPL
8 Group:          Development
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
25 AutoReqProv:    no
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
35 ExclusiveOS:    Linux
36 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38 %define         no_install_post_strip           1
39
40 %ifarch %{x8664} ppc64 s390x sparc sparc64 sparcv9
41 %define         dodual  1
42 %else
43 %define         dodual  0
44 %endif
45
46 %description
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
51 glibc package.
52
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.
59
60 %prep
61 %setup -q
62 %patch0 -p1
63 %patch1 -p1
64 %patch2 -p0
65 %patch3 -p1
66 %patch4 -p1
67 %patch5 -p1
68 %patch6 -p1
69 %patch7 -p1
70 %patch8 -p1
71 %patch9 -p1
72 %patch10 -p1
73
74 %build
75 %ifarch %{x8664}
76 a1=i386
77 a2=x86_64
78 c1='defined(__i386__)'
79 c2='defined(__x86_64__)'
80 cond1=
81 %endif
82 %ifarch ppc64
83 a1=ppc
84 a2=ppc64
85 c1='defined(__powerpc__) && !defined(__powerpc64__)'
86 c2='defined(__powerpc64__)'
87 %endif
88 %ifarch s390 s390x
89 a1=sparc
90 a2=sparc64
91 c1='defined(__s390__) && !defined(__s390x__)'
92 c2='defined(__s390x__)'
93 %endif
94 %ifarch sparc sparcv9 sparc64
95 a1=sparc
96 a2=sparc64
97 c1='defined(__sparc__) && !defined(__arch64__)'
98 c2='defined(__sparc__) && defined(__arch64__)'
99 %endif
100
101 %if %{dodual}
102 cd include
103 rm -f asm
104 mkdir asm
105
106 for h in `( ls asm-${a1}; ls asm-${a2} ) | grep '\.h$' | sort -u`; do
107         name=`echo $h | tr a-z. A-Z_`
108         # common header
109         cat > asm/$h << EOF
110 /* All asm/ files are generated and point to the corresponding
111  * file in asm-${a1} or asm-${a2}.
112  */
113
114 #ifndef __ASM_STUB_${name}__
115 #define __ASM_STUB_${name}__
116
117 #  if ${c1}
118 EOF
119
120         if [ -f asm-${a1}/$h ]; then
121                 echo "#    include <asm-${a1}/$h>" >> asm/$h
122         else
123                 echo "#    error <asm-${a1}/$h> does not exist" >> asm/$h
124         fi
125
126         cat >> asm/$h <<EOF
127 #  endif
128 #  if ${c2}
129 EOF
130
131         if [ -f asm-${a2}/$h ]; then
132                 echo "#    include <asm-${a2}/$h>" >> asm/$h
133         else
134                 echo "#    error <asm-${a2}/$h> does not exist" >> asm/$h
135         fi
136
137         # common footer
138         cat >> asm/$h <<EOF
139 #  endif
140
141 #endif /* !__ASM_STUB_${name}__ */
142 EOF
143
144 done
145 echo "asm asm-${a1} asm-${a2}" > asmdirs
146 %endif
147
148 %install
149 rm -rf $RPM_BUILD_ROOT
150 install -d $RPM_BUILD_ROOT%{_includedir}
151
152 cd include
153 %if %{dodual}
154 cp -a `cat asmdirs` $RPM_BUILD_ROOT%{_includedir}
155 %else
156 cp -a asm-%{_target_base_arch} $RPM_BUILD_ROOT%{_includedir}/asm
157 %endif
158 cp -a linux $RPM_BUILD_ROOT%{_includedir}
159 cp -a sound $RPM_BUILD_ROOT%{_includedir}
160
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
164
165 find $RPM_BUILD_ROOT%{_includedir} -type f \
166         '(' -name '*.orig' -o -name '*~' ')' | xargs -r rm
167
168 %clean
169 rm -rf $RPM_BUILD_ROOT
170
171 %pre
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
178 %endif
179
180 %files
181 %defattr(644,root,root,755)
182 %{_includedir}/linux
183 %{_includedir}/asm*
184 %{_includedir}/sound
This page took 0.032523 seconds and 2 git commands to generate.