/[gentoo-x86]/eclass/openib.eclass
Gentoo

Diff of /eclass/openib.eclass

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

Revision 1.7 Revision 1.8
1# Copyright 1999-2012 Gentoo Foundation 1# Copyright 1999-2012 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/openib.eclass,v 1.7 2012/10/12 13:20:56 alexxy Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/openib.eclass,v 1.8 2012/10/12 16:49:59 alexxy Exp $
4 4
5# @ECLASS: openib.eclass 5# @ECLASS: openib.eclass
6# @AUTHOR: 6# @AUTHOR:
7# Original Author: Alexey Shvetsov <alexxy@gentoo.org> 7# Original Author: Alexey Shvetsov <alexxy@gentoo.org>
8# @BLURB: Simplify working with OFED packages 8# @BLURB: Simplify working with OFED packages
15LICENSE="|| ( GPL-2 BSD-2 )" 15LICENSE="|| ( GPL-2 BSD-2 )"
16 16
17# @ECLASS-VARIABLE: OFED_VER 17# @ECLASS-VARIABLE: OFED_VER
18# @DESCRIPTION: 18# @DESCRIPTION:
19# Defines OFED version eg 1.4 or 1.4.0.1 19# Defines OFED version eg 1.4 or 1.4.0.1
20
21# @ECLASS-VARIABLE: OFED_RC
22# @DESCRIPTION:
23# Sets if this version is RC
24
25# @ECLASS-VARIABLE: OFED_RC_VER
26# @DESCRIPTION:
27# Sets RC version
28
20 29
21# @ECLASS-VARIABLE: OFED_SUFFIX 30# @ECLASS-VARIABLE: OFED_SUFFIX
22# @DESCRIPTION: 31# @DESCRIPTION:
23# Defines OFED package suffix eg -1.ofed1.4 32# Defines OFED package suffix eg -1.ofed1.4
24 33
38 "1.5.3" 47 "1.5.3"
39 "1.5.3.1" 48 "1.5.3.1"
40 "1.5.3.2" 49 "1.5.3.2"
41 "1.5.4" 50 "1.5.4"
42 "1.5.4.1" 51 "1.5.4.1"
43 "3.5-rc2" 52 "3.5"
44 ) 53 )
45 54
46# @FUNCTION: block_other_ofed_versions 55# @FUNCTION: block_other_ofed_versions
47# @DESCRIPTION: 56# @DESCRIPTION:
48# function that creates blockers list for ofed 57# function that creates blockers list for ofed
49block_other_ofed_versions() { 58block_other_ofed_versions() {
50 local slot 59 local slot
51 RDEPEND+=" !sys-infiniband/${PN}:0" 60 RDEPEND="${RDEPEND} !sys-infiniband/${PN}:0"
52 for slot in ${OFED_VERSIONS[@]}; do 61 for slot in ${OFED_VERSIONS[@]}; do
53 if [[ ${slot} != ${SLOT} ]]; then 62 if [[ ${slot} != ${SLOT} ]]; then
54 RDEPEDN+=" !sys-infiniband/${PN}:${slot}" 63 RDEPEND+=" !sys-infiniband/${PN}:${slot}"
55 fi 64 fi
56 done 65 done
57} 66}
58 67
59OFED_BASE_VER=$(get_version_component_range 1 '-' $(get_version_component_range 1-3 ${OFED_VER})) 68OFED_BASE_VER=$(get_version_component_range 1-3 ${OFED_VER})
60 69
70if [ -z $OFED_RC ] ; then
61SRC_URI="http://www.openfabrics.org/downloads/OFED/ofed-${OFED_BASE_VER}/OFED-${OFED_VER}.tgz" 71 SRC_URI="http://www.openfabrics.org/downloads/OFED/ofed-${OFED_BASE_VER}/OFED-${OFED_VER}.tgz"
72else
73 SRC_URI="http://www.openfabrics.org/downloads/OFED/ofed-${OFED_BASE_VER}/OFED-${OFED_VER}-rc${OFED_RC_VER}.tgz"
74fi
62 75
63case ${PN} in 76case ${PN} in
64 ofed) 77 ofed)
65 case ${PV} in 78 case ${PV} in
66 1.5.*|1.5.*.*) 79 1.5.*|1.5.*.*)
104# @FUNCTION: openib_src_unpack 117# @FUNCTION: openib_src_unpack
105# @DESCRIPTION: 118# @DESCRIPTION:
106# This function will unpack OFED packages 119# This function will unpack OFED packages
107openib_src_unpack() { 120openib_src_unpack() {
108 unpack ${A} 121 unpack ${A}
122 if [ -z ${OFED_RC} ]; then
109 rpm_unpack "./OFED-${OFED_VER}/SRPMS/${MY_PN}-${MY_PV}-${OFED_SUFFIX}.src.rpm" 123 rpm_unpack "./OFED-${OFED_VER}/SRPMS/${MY_PN}-${MY_PV}-${OFED_SUFFIX}.src.rpm"
124 else
125 rpm_unpack "./OFED-${OFED_VER}-rc${OFED_RC_VER}/SRPMS/${MY_PN}-${MY_PV}-${OFED_SUFFIX}.src.rpm"
126 fi
110 if [ -z ${OFED_SNAPSHOT} ]; then 127 if [ -z ${OFED_SNAPSHOT} ]; then
111 unpack ./${MY_PN}-${MY_PV}.${EXT} 128 unpack ./${MY_PN}-${MY_PV}.${EXT}
112 else 129 else
113 unpack ./${MY_PN}-${MY_PV}-${OFED_SUFFIX}.${EXT} 130 unpack ./${MY_PN}-${MY_PV}-${OFED_SUFFIX}.${EXT}
114 fi 131 fi

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

  ViewVC Help
Powered by ViewVC 1.1.20