Пакет glibc-kernheaders: Specfile

Name: glibc-kernheaders
Version: 2.6.17
Release: alt6

Summary: Linux kernel C header files for use by glibc and other userspace software
License: GPL
Group: Development/Kernel
Url: ftp://ftp.kernel.org/pub/linux/kernel/v2.6
Packager: Linux Kernel Development Team <kernel@packages.altlinux.org>

ExclusiveOS: Linux
ExclusiveArch: %ix86 x86_64
Provides: kernel-headers = %version-%release

# No need to waste time on this.
AutoReqProv: no

%ifarch %ix86
%define base_arch i386
%else
%define base_arch %_target_cpu
%endif

Source0: kernheaders-%version.tar
Source1: autoconf.h
Source2: version.h
Source3: sanitize.sh

Patch1: kernheaders-2.6.9-alt-MAX_NESTED_LINKS.patch
Patch2: kernheaders-2.6.17-alt-linux-types.patch
Patch3: kernheaders-2.6.17-alt-linux-ustat.patch
Patch4: kernheaders-2.6.17-alt-linux-cciss_ioctl.patch
Patch5: kernheaders-2.6.17-alt-linux-joystick.patch
Patch6: kernheaders-2.6.17-alt-asm-i386-system.patch
Patch7: kernheaders-2.6.17-alt-linux-futex.patch
Patch11: kernheaders-suse.patch

%description 
This package includes the C header files that specify the interface
between the Linux kernel and userspace libraries and programs.  The header
files define structures and constants that are needed for building most
standard programs and are also needed for rebuilding the glibc package.

%prep
%setup -qc
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
cd include
%patch11 -p0
install -pm644 %_sourcedir/{autoconf.h,version.h} linux/
find -type f -not -name compiler\*.h -print0 |
	xargs -r0 %_sourcedir/sanitize.sh

%build
ln -s asm-%base_arch include/asm

%install
mkdir -p %buildroot%_includedir/linux-default/include
cp -a include/{asm,asm-generic,asm-%base_arch,linux} \
	%buildroot%_includedir/linux-default/include/

d="$PWD"
pushd %buildroot%_includedir/linux-default/include
	for f in {asm,linux}/*.h; do
		printf '#include <%%s>\n' "$f" |
			%__cc %optflags -xc -c -I"$PWD" -o/dev/null - ||
			echo "$f"
	done >"$d/fail.log"
popd

%files
%_includedir/linux-default

%changelog
* Thu Apr 12 2007 Dmitry V. Levin <ldv@altlinux.org> 2.6.17-alt6
- Updated linux/futex.h (Kirill A. Shutemov):
  + Backported FUTEX_* constants.
  + Fixed linux/futex.h compilation.

* Thu Jan 25 2007 Dmitry V. Levin <ldv@altlinux.org> 2.6.17-alt5
- Disabled sanitization of compiler*.h.

* Thu Jan 25 2007 Dmitry V. Levin <ldv@altlinux.org> 2.6.17-alt4
- Sanitize headers (#10634).

* Sun Oct 08 2006 Dmitry V. Levin <ldv@altlinux.org> 2.6.17-alt3
- linux/joystick.h: Include <linux/types.h> instead of <asm/types.h>.
- asm-i386/system.h: Replace u(8|16|32) types with __u(8|16|32).

* Fri Oct 06 2006 Dmitry V. Levin <ldv@altlinux.org> 2.6.17-alt2
- Removed improper kernheaders-2.6.9-alt-byteorder.patch, see
  https://bugzilla.altlinux.org/show_bug.cgi?id=5409#c5 for details.
- linux/types.h:
  + Include <sys/types.h>;
  + Hide "struct ustat" definition from userspace.
- linux/cciss_ioctl.h: Include <linux/compiler.h>.

* Mon Oct 02 2006 Dmitry V. Levin <ldv@altlinux.org> 2.6.17-alt1
- Updated to linux-2.6.17.
- Applied patch from SuSE to make headers more ready for userspace.
- Backported byteorder and MAX_NESTED_LINKS fixes from std26 headers.

* Tue Oct 04 2005 Dmitry V. Levin <ldv@altlinux.org> 2.4.29-alt2
- Fixed linux/if_fddi.h (see #8122).

* Tue Aug 09 2005 Anton D. Kachalov <mouse@altlinux.org> 2.4.29-alt1
- Updated headers to 2.4.29.
- Updated asm/unistd.h to linux-2.6.12.
- Added headers for x86_64 architecture.
- Added URL.

* Tue May 10 2005 Dmitry V. Levin <ldv@altlinux.org> 2.4.25-alt2
- Updated asm/termbits.h to linux-2.6.11.
- Updated asm/unistd.h to linux-2.6.11.
- Updated linux/prctl.h to linux-2.6.11.

* Sat Apr 10 2004 Dmitry V. Levin <ldv@altlinux.org> 2.4.25-alt1
- Updated to linux-2.4.25.
- Updated linux/prctl.h to linux-2.6.5.
- Updated asm/unistd.h to linux-2.6.5.

* Fri Jun 20 2003 Dmitry V. Levin <ldv@altlinux.org> 2.4.21-alt1
- Updated to linux-2.4.21.

* Mon Jun 09 2003 Dmitry V. Levin <ldv@altlinux.org> 2.4-alt4
- Relocated to proper place, %_includedir/linux-default/include/.

* Tue Jun 03 2003 Dmitry V. Levin <ldv@altlinux.org> 2.4-alt3
- Tarball and specfile cleanup.

* Wed May 28 2003 Peter Novodvorsky <nidd@altlinux.com> 2.4-alt2
- Removed all requires.

* Tue May 27 2003 Peter Novodvorsky <nidd@altlinux.com> 2.4-alt1
- Rebuilt with ALTLinux adaptations for new kernel policy. 

* Sun Apr 13 2003 Ajran van de Ven <arjanv@redhat.com> 2.4-8.13
- remove more kernel private files

* Fri Apr 11 2003 Jakub Jelinek <jakub@redhat.com> 2.4-8.12
- update <linux/prctl.h> header
- remove i386 <asm/io.h>, replace it with a warning and <sys/io.h> include
  (Arjan van de Ven)

* Mon Feb 10 2003 Jakub Jelinek <jakub@redhat.com> 2.4-8.11
- update syscall numbers for all arches from 2.5.64 headers

* Fri Feb  7 2003 Bill Nottingham <notting@redhat.com> 2.4-8.10
- update more wireless headers

* Wed Feb  5 2003 Bill Nottingham <notting@redhat.com> 2.4-8.9
- update wireless headers

* Thu Jan 30 2003 Jakub Jelinek <jakub@redhat.com> 2.4-8.7
- make /usr/include/asm during build if it doesn't exist

* Thu Jan 30 2003 Jakub Jelinek <jakub@redhat.com> 2.4-8.6
- remove unpackaged file

* Thu Jan 30 2003 Bill Nottingham <notting@redhat.com>
- update netfilter headers

* Thu Jan 30 2003 Jakub Jelinek <jakub@redhat.com> 2.4-8.5
- don't include <linux/types.h> etc. in <asm-s390*/ptrace.h>

* Thu Jan 16 2003 Jakub Jelinek <jakub@redhat.com> 2.4-8.4
- updated s390 headers, added s390x headers
- HTB in <linux/pkt_sched.h>
- no -debuginfo subpackage

* Thu Dec 12 2002 Jakub Jelinek <jakub@redhat.com> 2.4-8.3
- update version.h from kernel-2.4.20-0.pp.6

* Tue Nov 26 2002 Jakub Jelinek <jakub@redhat.com> 2.4-8.2
- update unistd.h from kernel-2.4.19-0.pp.19

* Thu Oct 10 2002 Jakub Jelinek <jakub@redhat.com>
- generate stubs automatically
- remove /usr/include/scsi from file list

* Thu Oct 10 2002 Arjan van de Ven <arjanv@redhat.com
- added support for mixed 32/64 headers

* Tue Mar 21 2002 Arjan van de Ven <arjanv@redhat.com
- update ethtool and other network ioctls

* Tue Feb 10 2002 Arjan van de Ven <arjanv@redhat.com
- removed autoconf.h content

* Sun Feb 10 2002 Arjan van de Ven <arjanv@redhat.com
- fix missing include that broke quota.h

* Mon Jan 07 2002 Arjan van de Ven <arjanv@redhat.com
- fix rhconfig.h include file to not care about /boot/kernel.h

* Wed Jan 02 2002 Florian La Roche <Florian.LaRoche@redhat.de>
- fix #warning in <asm-i386/rwlock.h> and <asm-i386/spinlock.h>

* Thu Dec 6 2001 Arjan van de Ven <arjanv@redhat.com>
- fix misplaced #endif

* Tue Dec 4 2001 Arjan van de Ven <arjanv@redhat.com>
- fix version.h to not include /boot/kernel.h

* Wed Oct 31 2001 Arjan van de Ven <arjanv@redhat.com>
- Initial packaging