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