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

Contents of /eclass/openib.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (hide annotations) (download)
Mon Aug 22 04:46:32 2011 UTC (2 years, 10 months ago) by vapier
Branch: MAIN
Changes since 1.1: +4 -4 lines
fix random bugs in eclass documentation, and convert to new @AUTHOR tag

1 alexxy 1.1 # Copyright 1999-2011 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 vapier 1.2 # $Header: /var/cvsroot/gentoo-x86/eclass/openib.eclass,v 1.1 2011/06/30 20:47:43 alexxy Exp $
4 alexxy 1.1
5 vapier 1.2 # @ECLASS: openib.eclass
6     # @AUTHOR:
7 alexxy 1.1 # Original Author: Alexey Shvetsov <alexxy@gentoo.org>
8 vapier 1.2 # @BLURB: Simplify working with OFED packages
9 alexxy 1.1
10     inherit base eutils rpm versionator
11    
12     EXPORT_FUNCTIONS src_unpack
13    
14     HOMEPAGE="http://www.openfabrics.org/"
15     LICENSE="|| ( GPL-2 BSD-2 )"
16     SLOT="0"
17    
18     # @ECLASS-VARIABLE: OFED_VER
19     # @DESCRIPTION:
20     # Defines OFED version eg 1.4 or 1.4.0.1
21    
22     # @ECLASS-VARIABLE: OFED_SUFFIX
23     # @DESCRIPTION:
24     # Defines OFED package suffix eg -1.ofed1.4
25    
26     # @ECLASS-VARIABLE: OFED_SNAPSHOT
27     # @DESCRIPTION:
28     # Defines if src tarball is git snapshot
29    
30     OFED_BASE_VER=$(get_version_component_range 1-3 ${OFED_VER})
31    
32     SRC_URI="http://www.openfabrics.org/downloads/OFED/ofed-${OFED_BASE_VER}/OFED-${OFED_VER}.tgz"
33    
34     case ${PN} in
35     openib-files)
36     MY_PN="ofa_kernel"
37     ;;
38     *)
39     MY_PN="${PN}"
40     ;;
41     esac
42    
43     case ${PV} in
44     *p*)
45     MY_PV="${PV/p/}"
46     ;;
47     *)
48     MY_PV="${PV}"
49     ;;
50     esac
51    
52     case ${MY_PN} in
53     ofa_kernel)
54     EXT="tgz"
55     ;;
56     *)
57     EXT="tar.gz"
58     ;;
59     esac
60    
61     S="${WORKDIR}/${MY_PN}-${MY_PV}"
62    
63     # @FUNCTION: openib_src_unpack
64     # @DESCRIPTION:
65     # This function will unpack OFED packages
66     openib_src_unpack() {
67     unpack ${A}
68     rpm_unpack "./OFED-${OFED_VER}/SRPMS/${MY_PN}-${MY_PV}-${OFED_SUFFIX}.src.rpm"
69     if [ -z ${OFED_SNAPSHOT} ]; then
70     unpack ./${MY_PN}-${MY_PV}.${EXT}
71     else
72     unpack ./${MY_PN}-${MY_PV}-${OFED_SUFFIX}.${EXT}
73     fi
74     }

  ViewVC Help
Powered by ViewVC 1.1.20