Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37741680
en ru br
Репозитории ALT
4.0: 2.6.12.0-alt6.1
3.0:
+backports:2.6.12.0-alt6.1.0.M30
www.altlinux.org/Changes

Группа :: Разработка/Ядро
Пакет: linux-libc-headers

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

# vim:set ft=spec: -*- rpm-spec -*-
# $Id: linux-libc-headers,v 1.1 2005/09/12 09:26:54 raorn Exp $

%define includedir %_includedir/linux-libc-headers/include
%define cvs_date 20060105

Name: linux-libc-headers
Version: 2.6.12.0
Release: alt6.1.0.M30

Summary: Linux kernel headers for use with C libraries
Group: Development/Kernel
License: GPL
Url: http://ep09.pld-linux.org/~mmazur/linux-libc-headers/
Packager: LAKostis <lakostis at altlinux.ru>

%ifarch ppc64 s390x sparc sparc64 sparcv9
%define dodual 1
%else
%define dodual 0
%endif

Source: %url/%name-%version-%cvs_date.tar.bz2

Patch: %name-2.6.12.0-alt-kernel-fix-core-headers-fix.patch
Patch1: %name-2.6.12.0-alt-kernel-fix-core-max_nested_links-8.patch
Patch2: %name-2.6.12.0-fix-agpgart.patch
Patch3: %name-2.6.12.0-2.6.16-syscalls-add.patch

Requires: kernel-headers-common >= 1.1.5
BuildRequires: kernel-build-tools >= 0.8

%define base_arch %(echo %_target_cpu | sed 's/i.86/i386/;s/athlon/i386/;s/pentium4/i386/;s/athlon-?xp/i386/')

%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 -q
%patch -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1

%build
%ifarch ppc64
a1=ppc
a2=ppc64
c1='defined(__powerpc__) && !defined(__powerpc64__)'
c2='defined(__powerpc64__)'
%endif
%ifarch s390 s390x
a1=sparc
a2=sparc64
c1='defined(__s390__) && !defined(__s390x__)'
c2='defined(__s390x__)'
%endif
%ifarch sparc sparcv9 sparc64
a1=sparc
a2=sparc64
c1='defined(__sparc__) && !defined(__arch64__)'
c2='defined(__sparc__) && defined(__arch64__)'
%endif

%if %dodual
pushd include
%__rm -f asm
%__mkdir asm

for h in `( ls asm-${a1}; ls asm-${a2} ) | grep '\.h$' | sort -u`; do
name=`echo $h | tr a-z. A-Z_`
# common header
%__cat > asm/$h << EOF
/* All asm/ files are generated and point to the corresponding
* file in asm-${a1} or asm-${a2}.
*/

#ifndef __ASM_STUB_${name}__

#define __ASM_STUB_${name}__

#  if ${c1}

EOF

if [ -f asm-${a1}/$h ]; then
echo "#    include <asm-${a1}/$h>" >> asm/$h
else
echo "#    error <asm-${a1}/$h> does not exist" >> asm/$h
fi

%__cat >> asm/$h <<EOF
#  endif
#  if ${c2}
EOF

if [ -f asm-${a2}/$h ]; then
echo "#    include <asm-${a2}/$h>" >> asm/$h
else
echo "#    error <asm-${a2}/$h> does not exist" >> asm/$h
fi

# common footer

%__cat >> asm/$h <<EOF
#  endif

#endif /* !__ASM_STUB_${name}__ */

EOF

done
echo "asm asm-${a1} asm-${a2}" > asmdirs
popd
%endif


%install
%__mkdir_p %buildroot%includedir

pushd include
%if %dodual
%__cp -a `%__cat asmdirs` %buildroot%includedir
%else
%__cp -a asm-%base_arch %buildroot%includedir/asm
%endif
popd
%__cp -a include/linux %buildroot%includedir

# To avoid broken symlinks...

%__mkdir_p %buildroot%includedir/asm-generic

bzip2 -9 doc/ChangeLog

%post
%post_kernel_headers libc-headers

%postun
%postun_kernel_headers libc-headers

%files
%includedir
%doc doc/*

%changelog

Полный changelog можно просмотреть здесь

 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin