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