Merge oe-devel@oe-devel.bkbits.net:packages
[vuplus_openembedded] / linux-libc-headers / linux-libc-headers_2.6.8.1.oe
1 SECTION = "devel"
2 DESCRIPTION = "Sanitized set of 2.6 kernel headers for the C library's use."
3 HOMEPAGE = "http://ep09.pld-linux.org/~mmazur/linux-libc-headers/"
4 # license note from the package: 
5 #   Linux-libc-headers are derived from linux kernel headers. For license of a
6 #   particular header, check it's content, and if copyright notice isn't present,
7 #   standard linux kernel license applies. 
8 # since we assume GPL for linux i think we can also assume it here
9 LICENSE = "GPL"
10 MAINTAINER = "Chris Larson <kergoth@handhelds.org>"
11 INHIBIT_DEFAULT_DEPS = "1"
12 PR = "r7"
13
14 # NOTE: no need to package these headers, since the c library includes them.
15 PACKAGES = ""
16
17 SRC_URI = "http://ep09.pld-linux.org/~mmazur/linux-libc-headers/linux-libc-headers-${PV}.tar.bz2 \
18         file://mips-asm-atomic-system.diff;patch=1;pnum=0 \
19         file://keyboard.patch;patch=1"
20         
21 S = "${WORKDIR}/linux-libc-headers-${PV}"
22
23 do_configure () {
24         case ${TARGET_ARCH} in
25                 alpha*)   ARCH=alpha ;;
26                 arm*)     ARCH=arm ;;
27                 cris*)    ARCH=cris ;;
28                 hppa*)    ARCH=parisc ;;
29                 i*86*)    ARCH=i386 ;;
30                 ia64*)    ARCH=ia64 ;;
31                 mips*)    ARCH=mips ;;
32                 m68k*)    ARCH=m68k ;;
33                 powerpc*) ARCH=ppc ;;
34                 s390*)    ARCH=s390 ;;
35                 sh*)      ARCH=sh ;;
36                 sparc64*) ARCH=sparc64 ;;
37                 sparc*)   ARCH=sparc ;;
38                 x86_64*)  ARCH=x86_64 ;;
39         esac
40         if test !  -e include/asm-$ARCH; then
41                 oefatal unable to create asm symlink in kernel headers
42         fi
43         cp -a "include/asm-$ARCH" "include/asm"
44         if test "$ARCH" = "arm"; then
45                 cp -a include/asm/arch-ebsa285 include/asm/arch
46         elif test "$ARCH" = "sh"; then
47                 cp -a include/asm/cpu-${TARGET_ARCH} include/asm/cpu || die "unable to create include/asm/cpu"
48         fi
49 }
50
51 do_stage () {
52         install -d ${STAGING_INCDIR}
53         rm -rf ${STAGING_INCDIR}/linux ${STAGING_INCDIR}/asm
54         cp -pfLR include/linux ${STAGING_INCDIR}/
55         cp -pfLR include/asm ${STAGING_INCDIR}/
56         rm -rf ${CROSS_DIR}/${TARGET_SYS}/include/linux
57         rm -rf ${CROSS_DIR}/${TARGET_SYS}/include/asm
58         install -d ${CROSS_DIR}/${TARGET_SYS}/include
59         cp -pfLR include/linux ${CROSS_DIR}/${TARGET_SYS}/include/
60         cp -pfLR include/asm ${CROSS_DIR}/${TARGET_SYS}/include/
61 }