diff options
author | Alexey Shvetsov <alexxy@gentoo.org> | 2012-04-16 21:09:32 +0000 |
---|---|---|
committer | Alexey Shvetsov <alexxy@gentoo.org> | 2012-04-16 21:09:32 +0000 |
commit | 7142b1fd159c8afbff41627d672abf270fc73cc9 (patch) | |
tree | b5dbc10ac0470b823fae15ca9dfc1dbb1041cf35 /sys-block/lio-utils/lio-utils-9999.ebuild | |
parent | Marking bchunk-1.2.0-r1 ppc for bug 394053 (diff) | |
download | gentoo-2-7142b1fd159c8afbff41627d672abf270fc73cc9.tar.gz gentoo-2-7142b1fd159c8afbff41627d672abf270fc73cc9.tar.bz2 gentoo-2-7142b1fd159c8afbff41627d672abf270fc73cc9.zip |
[sys-block/lio-utils] Initial import
(Portage version: 2.2.0_alpha100/cvs/Linux x86_64)
Diffstat (limited to 'sys-block/lio-utils/lio-utils-9999.ebuild')
-rw-r--r-- | sys-block/lio-utils/lio-utils-9999.ebuild | 99 |
1 files changed, 99 insertions, 0 deletions
diff --git a/sys-block/lio-utils/lio-utils-9999.ebuild b/sys-block/lio-utils/lio-utils-9999.ebuild new file mode 100644 index 000000000000..bc17df321140 --- /dev/null +++ b/sys-block/lio-utils/lio-utils-9999.ebuild @@ -0,0 +1,99 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-block/lio-utils/lio-utils-9999.ebuild,v 1.1 2012/04/16 21:09:32 alexxy Exp $ + +EAPI=4 + +EGIT_REPO_URI="git://linux-iscsi.org/lio-utils.git" +PYTHON_DEPEND="2" +RESTRICT_PYTHON_ABIS="3.*" +SUPPORT_PYTHON_ABIS="1" + +inherit eutils distutils git-2 python linux-info + +DESCRIPTION="Tools for controlling target_core_mod/ConfigFS" +HOMEPAGE="http://linux-iscsi.org/" +SRC_URI="" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="" +IUSE="snmp" + +DEPEND="snmp? ( net-analyzer/net-snmp )" +RDEPEND="${DEPEND}" + +CONFIG_CHECK="~TARGET_CORE" + +src_prepare(){ + local module + + for module in tcm-py lio-py; do + cd ${module} + distutils_src_prepare + cd .. + done + epatch "${FILESDIR}"/tools-makefile.patch + epatch "${FILESDIR}"/snmp-makefile.patch +} + +src_compile(){ + local module + + for module in tcm-py lio-py; do + cd ${module} + distutils_src_compile + cd .. + done + cd tools/ + emake || die "emake failed" + cd .. + if use snmp; then + cd mib-modules/ + emake || die "emake snmp failed" + cd .. + fi +} + +src_install(){ + local module + + for module in tcm-py lio-py; do + cd ${module} + distutils_src_install + cd .. + done + cd tools/ + emake DESTDIR="${ED}" install || die "emake install failed" + cd .. + + symlink_to_sbin(){ + local ver=$(python_get_version) sitedir="$(python_get_sitedir)" + ln -s "${sitedir}"/lio_dump.py \ + "${ED}"/usr/sbin/lio_dump-${ver} + python_convert_shebangs "${ver}" "${D}${sitedir}"/lio_dump.py + ln -s "${sitedir}"/lio_node.py \ + "${ED}"/usr/sbin/lio_node-${ver} + python_convert_shebangs "${ver}" "${D}${sitedir}"/lio_node.py + ln -s "${sitedir}"/tcm_dump.py \ + "${ED}"/usr/sbin/tcm_dump-${ver} + python_convert_shebangs "${ver}" "${D}${sitedir}"/tcm_dump.py + ln -s "${sitedir}"/tcm_node.py \ + "${ED}"/usr/sbin/tcm_node-${ver} + python_convert_shebangs "${ver}" "${D}${sitedir}"/tcm_node.py + ln -s "${sitedir}"/tcm_fabric.py \ + "${ED}"/usr/sbin/tcm_fabric-${ver} + python_convert_shebangs "${ver}" "${D}${sitedir}"/tcm_fabric.py + } + python_execute_function --action-message "Making symlinks to /usr/sbin" symlink_to_sbin + python_generate_wrapper_scripts "${ED}"/usr/sbin/{lio_dump,lio_node,tcm_node,tcm_dump,tcm_fabric} + + if use snmp; then + cd mib-modules/ + emake DESTDIR="${ED}" install || die "emake install snmp failed" + cd .. + fi + + emake DESTDIR="${ED}" conf_install || die "emake conf_install failed" + newinitd "${FILESDIR}/target.initd" target +} |