/[gentoo-x86]/sys-infiniband/ofed/ofed-1.5.4.1-r1.ebuild
Gentoo

Contents of /sys-infiniband/ofed/ofed-1.5.4.1-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Sat Aug 11 12:51:47 2012 UTC (2 years, 3 months ago) by ssuominen
Branch: MAIN
Stop using /etc/udev which is reserved for user modified rules and read udevdir value from udev.pc pkg-config file instead.

(Portage version: 2.2.0_alpha120/cvs/Linux x86_64)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sys-infiniband/ofed/ofed-1.5.4.1.ebuild,v 1.4 2012/04/29 13:03:20 alexxy Exp $
4
5 EAPI="4"
6
7 OFED_VER="1.5.4.1"
8 OFED_SUFFIX="OFED.1.5.4.1"
9
10 IUSE_OFED_DRIVERS="
11 ofed_drivers_cxgb3
12 ofed_drivers_cxgb4
13 ofed_drivers_ehca
14 ofed_drivers_ipath
15 ofed_drivers_mlx4
16 ofed_drivers_mthca
17 ofed_drivers_nes
18 ofed_drivers_psm"
19
20 inherit openib toolchain-funcs
21
22 DESCRIPTION="OpenIB system files"
23 SCRIPTDIR="${S}/ofed_scripts"
24 KEYWORDS="~amd64 ~x86 ~amd64-linux"
25 IUSE="compat-dapl dapl +diags ibacm mstflint +opensm perftest rds sdp srp ${IUSE_OFED_DRIVERS}"
26
27 RDEPEND="!sys-infiniband/openib
28 !sys-infiniband/openib-files
29 sys-infiniband/libibcm:${SLOT}
30 sys-infiniband/libibmad:${SLOT}
31 sys-infiniband/libibumad:${SLOT}
32 sys-infiniband/librdmacm:${SLOT}
33 compat-dapl? ( sys-infiniband/compat-dapl:${SLOT} )
34 dapl? ( sys-infiniband/dapl:${SLOT} )
35 diags? ( sys-infiniband/infiniband-diags:${SLOT} )
36 ibacm? ( sys-infiniband/ibacm:${SLOT} )
37 mstflint? ( sys-infiniband/mstflint:${SLOT} )
38 opensm? ( sys-infiniband/opensm:${SLOT} )
39 perftest? ( sys-infiniband/perftest:${SLOT} )
40 sdp? ( sys-infiniband/libsdp:${SLOT} )
41 srp? ( sys-infiniband/srptools:${SLOT} )
42 ofed_drivers_cxgb3? ( sys-infiniband/libcxgb3:${SLOT} )
43 ofed_drivers_cxgb4? ( sys-infiniband/libcxgb4:${SLOT} )
44 ofed_drivers_ehca? ( sys-infiniband/libehca:${SLOT} )
45 ofed_drivers_ipath? ( sys-infiniband/libipathverbs:${SLOT} )
46 ofed_drivers_mlx4? ( sys-infiniband/libmlx4:${SLOT} )
47 ofed_drivers_mthca? ( sys-infiniband/libmthca:${SLOT} )
48 ofed_drivers_nes? ( sys-infiniband/libnes:${SLOT} )
49 ofed_drivers_psm? ( sys-infiniband/infinipath-psm:${SLOT} )
50 "
51 DEPEND="${RDEPEND}
52 virtual/pkgconfig
53 "
54
55 src_configure() { :; }
56 src_compile() { :; }
57
58 src_install() {
59 local udevdir=/lib/udev
60 has_version sys-fs/udev && udevdir="$($(tc-getPKG_CONFIG) --variable=udevdir udev)"
61 insinto "${udevdir}"/rules.d
62 newins "${SCRIPTDIR}/90-ib.rules" 40-ib.rules
63 insinto /etc/modprobe.d
64 newins "${FILESDIR}/openib.modprobe" openib.conf
65 newenvd "${FILESDIR}/openib.env" 02openib
66 insinto /etc/infiniband
67
68 doinitd "${FILESDIR}/openib"
69
70 # build openib.conf based on ofed_scripts/ofa_kernel.spec
71 build_ipoib=1
72 build_sdp=1
73 cp "${SCRIPTDIR}/openib.conf" "${T}"
74 IB_CONF_DIR=${T}
75 echo >> ${IB_CONF_DIR}/openib.conf
76 echo "# Load UCM module" >> ${IB_CONF_DIR}/openib.conf
77 echo "UCM_LOAD=no" >> ${IB_CONF_DIR}/openib.conf
78 echo >> ${IB_CONF_DIR}/openib.conf
79 echo "# Load RDMA_CM module" >> ${IB_CONF_DIR}/openib.conf
80 echo "RDMA_CM_LOAD=yes" >> ${IB_CONF_DIR}/openib.conf
81 echo >> ${IB_CONF_DIR}/openib.conf
82 echo "# Load RDMA_UCM module" >> ${IB_CONF_DIR}/openib.conf
83 echo "RDMA_UCM_LOAD=yes" >> ${IB_CONF_DIR}/openib.conf
84 echo >> ${IB_CONF_DIR}/openib.conf
85 echo "# Increase ib_mad thread priority" >> ${IB_CONF_DIR}/openib.conf
86 echo "RENICE_IB_MAD=no" >> ${IB_CONF_DIR}/openib.conf
87
88 echo >> ${IB_CONF_DIR}/openib.conf
89 echo "# Load MTHCA" >> ${IB_CONF_DIR}/openib.conf
90 echo "MTHCA_LOAD=yes" >> ${IB_CONF_DIR}/openib.conf
91 if use ofed_drivers_ipath; then
92 echo >> ${IB_CONF_DIR}/openib.conf
93 echo "# Load IPATH" >> ${IB_CONF_DIR}/openib.conf
94 echo "IPATH_LOAD=yes" >> ${IB_CONF_DIR}/openib.conf
95 fi
96 if use ofed_drivers_ehca; then
97 echo >> ${IB_CONF_DIR}/openib.conf
98 echo "# Load eHCA" >> ${IB_CONF_DIR}/openib.conf
99 echo "EHCA_LOAD=yes" >> ${IB_CONF_DIR}/openib.conf
100 fi
101 if use ofed_drivers_mlx4; then
102 echo >> ${IB_CONF_DIR}/openib.conf
103 echo "# Load MLX4 modules" >> ${IB_CONF_DIR}/openib.conf
104 echo "MLX4_LOAD=yes" >> ${IB_CONF_DIR}/openib.conf
105 fi
106 if (( build_ipoib )); then
107 echo >> ${IB_CONF_DIR}/openib.conf
108 echo "# Load IPoIB" >> ${IB_CONF_DIR}/openib.conf
109 echo "#IPOIB_LOAD=yes" >> ${IB_CONF_DIR}/openib.conf
110 echo >> ${IB_CONF_DIR}/openib.conf
111 echo "# Enable IPoIB Connected Mode" >> ${IB_CONF_DIR}/openib.conf
112 echo "#SET_IPOIB_CM=yes" >> ${IB_CONF_DIR}/openib.conf
113 # from ofa_user.spec:
114 echo >> ${IB_CONF_DIR}/openib.conf
115 echo "# Enable IPoIB High Availability daemon" >> ${IB_CONF_DIR}/openib.conf
116 echo "#IPOIBHA_ENABLE=no" >> ${IB_CONF_DIR}/openib.conf
117 echo "# PRIMARY_IPOIB_DEV=ib0" >> ${IB_CONF_DIR}/openib.conf
118 echo "# SECONDARY_IPOIB_DEV=ib1" >> ${IB_CONF_DIR}/openib.conf
119 fi
120 if (( build_sdp )); then
121 echo >> ${IB_CONF_DIR}/openib.conf
122 echo "# Load SDP module" >> ${IB_CONF_DIR}/openib.conf
123 echo "#SDP_LOAD=yes" >> ${IB_CONF_DIR}/openib.conf
124 fi
125 if use srp; then
126 echo >> ${IB_CONF_DIR}/openib.conf
127 echo "# Load SRP module" >> ${IB_CONF_DIR}/openib.conf
128 echo "#SRP_LOAD=no" >> ${IB_CONF_DIR}/openib.conf
129 # from ofa_user.spec:
130 echo >> ${IB_CONF_DIR}/openib.conf
131 echo "# Enable SRP High Availability daemon" >> ${IB_CONF_DIR}/openib.conf
132 echo "#SRPHA_ENABLE=no" >> ${IB_CONF_DIR}/openib.conf
133
134 fi
135 if use iser; then
136 echo >> ${IB_CONF_DIR}/openib.conf
137 echo "# Load ISER module" >> ${IB_CONF_DIR}/openib.conf
138 echo "#ISER_LOAD=no" >> ${IB_CONF_DIR}/openib.conf
139 fi
140 if use rds; then
141 echo >> ${IB_CONF_DIR}/openib.conf
142 echo "# Load RDS module" >> ${IB_CONF_DIR}/openib.conf
143 echo "#RDS_LOAD=no" >> ${IB_CONF_DIR}/openib.conf
144 fi
145 if use vnic; then
146 echo >> ${IB_CONF_DIR}/openib.conf
147 echo "# Load VNIC module" >> ${IB_CONF_DIR}/openib.conf
148 echo "#VNIC_LOAD=yes" >> ${IB_CONF_DIR}/openib.conf
149 fi
150
151 doins "${T}/openib.conf"
152 }
153
154 pkg_postinst() {
155 einfo "Configuration file installed in /etc/infiniband/openib.conf"
156 einfo "To automatically initialize infiniband on boot, add openib to your"
157 einfo "start-up scripts, like so:"
158 einfo "\`rc-update add openib default\`"
159
160 }

  ViewVC Help
Powered by ViewVC 1.1.20