/[gentoo-x86]/eclass/kernel-2.eclass
Gentoo

Diff of /eclass/kernel-2.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.90 Revision 1.91
1# Copyright 1999-2005 Gentoo Foundation 1# Copyright 1999-2005 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/kernel-2.eclass,v 1.90 2005/02/07 11:15:18 johnm Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/kernel-2.eclass,v 1.91 2005/02/07 12:44:23 johnm Exp $
4 4
5# Description: kernel.eclass rewrite for a clean base regarding the 2.6 5# Description: kernel.eclass rewrite for a clean base regarding the 2.6
6# series of kernel with back-compatibility for 2.4 6# series of kernel with back-compatibility for 2.4
7# 7#
8# Maintainer: John Mylchreest <johnm@gentoo.org> 8# Maintainer: John Mylchreest <johnm@gentoo.org>
743 [ "${PN/-*/}" == "wolk" ] && EXTRAVERSION="-${PN/-*/}-${PV}" 743 [ "${PN/-*/}" == "wolk" ] && EXTRAVERSION="-${PN/-*/}-${PV}"
744 [ "${PN/-*/}" == "vserver" ] && EXTRAVERSION="-${PN/-*/}-${PV}" 744 [ "${PN/-*/}" == "vserver" ] && EXTRAVERSION="-${PN/-*/}-${PV}"
745 [ "${PR}" != "r0" ] && EXTRAVERSION="${EXTRAVERSION}-${PR}" 745 [ "${PR}" != "r0" ] && EXTRAVERSION="${EXTRAVERSION}-${PR}"
746 fi 746 fi
747 747
748 KV_FULL=${OKV}${EXTRAVERSION} 748 KV_FULL=${OKV}${RELEASE}${EXTRAVERSION}
749 749
750 # -rcXX-bkXX pulls are *IMPOSSIBLE* to support within the portage naming convention 750 # -rc-bk pulls can be achieve by specifying CKV
751 # these cannot be supported, but the code here can handle it up until this point 751 # for example:
752 # and theoretically thereafter. 752 # CKV="2.6.11_rc3_pre2"
753 # will pull:
754 # linux-2.6.11-rc3.tbz & patch-2.6.11-rc3-bk2.bz2
753 755
754 if [ "${RELEASETYPE}" == "-rc" -o "${RELEASETYPE}" == "-pre" ] 756 if [ "${RELEASETYPE}" == "-rc" -o "${RELEASETYPE}" == "-pre" ]
755 then 757 then
756 OKV="${KV_MAJOR}.${KV_MINOR}.$([ $((${KV_PATCH} - 1)) -lt 0 ] && echo ${KV_PATCH} || echo $((${KV_PATCH} - 1)))" 758 OKV="${KV_MAJOR}.${KV_MINOR}.$([ $((${KV_PATCH} - 1)) -lt 0 ] && echo ${KV_PATCH} || echo $((${KV_PATCH} - 1)))"
757 KERNEL_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/testing/patch-${CKV//_/-}.bz2 759 KERNEL_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/testing/patch-${CKV//_/-}.bz2
758 mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/linux-${OKV}.tar.bz2" 760 mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/linux-${OKV}.tar.bz2"
759 UNIPATCH_LIST_DEFAULT="${DISTDIR}/patch-${CKV//_/-}.bz2" 761 UNIPATCH_LIST_DEFAULT="${DISTDIR}/patch-${CKV//_/-}.bz2"
760 KV_FULL=${CKV/[-_]*/}${EXTRAVERSION}
761 fi 762 fi
762 763
763 if [ "${RELEASETYPE}" == "-bk" ] 764 if [ "${RELEASETYPE}" == "-bk" ]
764 then 765 then
765 OKV="${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}" 766 OKV="${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}"
766 KERNEL_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/snapshots/patch-${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}${RELEASE}.bz2 767 KERNEL_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/snapshots/patch-${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}${RELEASE}.bz2
767 mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/linux-${OKV}.tar.bz2" 768 mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/linux-${OKV}.tar.bz2"
768 UNIPATCH_LIST_DEFAULT="${DISTDIR}/patch-${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}${RELEASE}.bz2" 769 UNIPATCH_LIST_DEFAULT="${DISTDIR}/patch-${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}${RELEASE}.bz2"
769 KV_FULL=${CKV/[-_]*/}${EXTRAVERSION}
770 fi 770 fi
771 771
772 if [ "${RELEASETYPE}" == "-rc-bk" ] 772 if [ "${RELEASETYPE}" == "-rc-bk" ]
773 then 773 then
774 OKV="${KV_MAJOR}.${KV_MINOR}.$((${KV_PATCH} - 1))-${RELEASE/-bk*}" 774 OKV="${KV_MAJOR}.${KV_MINOR}.$((${KV_PATCH} - 1))-${RELEASE/-bk*}"
775 EXTRAVERSION="$([ -n "${RELEASE}" ] && echo ${RELEASE/*-bk/-bk})$([ -n "${K_USENAME}" ] && echo -${PN/-*/})$([ ! "${PR}" == "r0" ] && echo -${PR})" 775 EXTRAVERSION="${RELEASE/*-bk/-bk}$([ -n "${K_USENAME}" ] && echo -${PN/-*/})$([ ! "${PR}" == "r0" ] && echo -${PR})"
776 776
777 KERNEL_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/snapshots/patch-${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}${RELEASE}.bz2 777 KERNEL_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/snapshots/patch-${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}${RELEASE}.bz2
778 mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/linux-${OKV}.tar.bz2" 778 mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/linux-${OKV}.tar.bz2"
779 UNIPATCH_LIST_DEFAULT="${DISTDIR}/patch-${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}${RELEASE}.bz2" 779 UNIPATCH_LIST_DEFAULT="${DISTDIR}/patch-${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}${RELEASE}.bz2"
780 KV_FULL=${CKV/[-_]*/}${EXTRAVERSION}
781 fi 780 fi
781
782 782
783 S=${WORKDIR}/linux-${KV_FULL} 783 S=${WORKDIR}/linux-${KV_FULL}
784 # we will set this for backwards compatibility. 784 # we will set this for backwards compatibility.
785 KV=${KV_FULL} 785 KV=${KV_FULL}
786} 786}

Legend:
Removed from v.1.90  
changed lines
  Added in v.1.91

  ViewVC Help
Powered by ViewVC 1.1.20