]> git.pld-linux.org Git - packages/linux-libc-headers.git/blob - linux-libc-headers.spec
- release 3 - to fix problem.
[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.11.0
5 Release:        3
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:  7dc73cdc8198f6f8ba25515aea799bbd
11 Patch0:         %{name}-esfq.patch
12 Patch1:         %{name}-wrr.patch
13 Patch2:         %{name}-netfilter.patch
14 Patch3:         %{name}-fbsplash.patch
15 BuildRequires:  rpmbuild(macros) >= 1.153
16 AutoReqProv:    no
17 Requires(pre):  fileutils
18 Provides:       alsa-driver-devel
19 Provides:       i2c-devel = 2.8.2
20 Provides:       glibc-kernel-headers = %{epoch}:%{version}-%{release}
21 Obsoletes:      alsa-driver-devel
22 Obsoletes:      glibc-kernheaders
23 Obsoletes:      glibc-kernel-headers
24 Conflicts:      lm_sensors-devel < 2.8.2-2
25 ExclusiveOS:    Linux
26 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
28 %define         no_install_post_strip           1
29
30 %ifarch amd64 ppc64 s390x sparc sparc64 sparcv9
31 %define         dodual  1
32 %else
33 %define         dodual  0
34 %endif
35
36 %description
37 This package includes the C header files that specify the interface
38 between the Linux kernel and userspace libraries and programs. The
39 header files define structures and constants that are needed for
40 building most standard programs and are also needed for rebuilding the
41 glibc package.
42
43 %description -l pl
44 Ten pakiet zawiera pliki nag³ówkowe C, które definiuj± interfejs
45 miêdzy j±drem Linuksa a bibliotekami i programami dzia³aj±cymi w
46 przestrzeni u¿ytkownika. Pliki nag³ówkowe definiuj± struktury i sta³e
47 potrzebne do zbudowania wiêkszo¶ci standardowych programów, s± tak¿e
48 potrzebne do przebudowania pakietu glibc.
49
50 %prep
51 %setup -q
52 %patch0 -p1
53 %patch1 -p1
54 %patch2 -p1
55 %patch3 -p1
56
57 %build
58 %ifarch amd64
59 a1=i386
60 a2=x86_64
61 c1='defined(__i386__)'
62 c2='defined(__x86_64__)'
63 cond1=
64 %endif
65 %ifarch ppc64
66 a1=ppc
67 a2=ppc64
68 c1='defined(__powerpc__) && !defined(__powerpc64__)'
69 c2='defined(__powerpc64__)'
70 %endif
71 %ifarch s390 s390x
72 a1=sparc
73 a2=sparc64
74 c1='defined(__s390__) && !defined(__s390x__)'
75 c2='defined(__s390x__)'
76 %endif
77 %ifarch sparc sparcv9 sparc64
78 a1=sparc
79 a2=sparc64
80 c1='defined(__sparc__) && !defined(__arch64__)'
81 c2='defined(__sparc__) && defined(__arch64__)'
82 %endif
83
84 %if %{dodual}
85 cd include
86 rm -f asm
87 mkdir asm
88
89 for h in `( ls asm-${a1}; ls asm-${a2} ) | grep '\.h$' | sort -u`; do
90         name=`echo $h | tr a-z. A-Z_`
91         # common header
92         cat > asm/$h << EOF
93 /* All asm/ files are generated and point to the corresponding
94  * file in asm-${a1} or asm-${a2}. To regenerate, run "generate-asm"
95  */
96
97 #ifndef __ASM_STUB_${name}__
98 #define __ASM_STUB_${name}__
99
100 #  if ${c1}
101 EOF
102
103         if [ -f asm-${a1}/$h ]; then
104                 echo "#    include <asm-${a1}/$h>" >> asm/$h
105         else
106                 echo "#    error <asm-${a1}/$h> does not exist" >> asm/$h
107         fi
108
109         cat >> asm/$h <<EOF
110 #  endif
111 #  if ${c2}
112 EOF
113
114         if [ -f asm-${a2}/$h ]; then
115                 echo "#    include <asm-${a2}/$h>" >> asm/$h
116         else
117                 echo "#    error <asm-${a2}/$h> does not exist" >> asm/$h
118         fi
119
120         # common footer
121         cat >> asm/$h <<EOF
122 #  endif
123
124 #endif /* !__ASM_STUB_${name}__ */
125 EOF
126
127 done
128 echo "asm asm-${a1} asm-${a2}" > asmdirs
129 %endif
130
131 %install
132 rm -rf $RPM_BUILD_ROOT
133 install -d $RPM_BUILD_ROOT%{_includedir}
134
135 cd include
136 %if %{dodual}
137 cp -a `cat asmdirs` $RPM_BUILD_ROOT%{_includedir}
138 %else
139 cp -a asm-%{_target_base_arch} $RPM_BUILD_ROOT%{_includedir}/asm
140 %endif
141 cp -a linux $RPM_BUILD_ROOT%{_includedir}
142 cp -a sound $RPM_BUILD_ROOT%{_includedir}
143
144 %clean
145 rm -rf $RPM_BUILD_ROOT
146
147 %pre
148 [ ! -L /usr/include/linux ] || rm -f /usr/include/linux
149 [ ! -L /usr/include/asm ] || rm -f /usr/include/asm
150 [ ! -L /usr/include/sound ] || rm -f /usr/include/sound
151 %ifarch sparc sparcv9 sparc64
152 [ ! -L /usr/include/asm-sparc ] || rm -f /usr/include/asm-sparc
153 [ ! -L /usr/include/asm-sparc64 ] || rm -f /usr/include/asm-sparc64
154 %endif
155
156 %files
157 %defattr(644,root,root,755)
158 %{_includedir}/linux
159 %{_includedir}/asm*
160 %{_includedir}/sound
This page took 0.040414 seconds and 3 git commands to generate.