games-board/freedoko: Drop old
[gentoo.git] / sys-block / targetcli / targetcli-9999.ebuild
1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 PYTHON_COMPAT=( python2_7 )
7
8 inherit distutils-r1 linux-info
9
10 if [[ ${PV} == 9999 ]]; then
11         inherit git-r3
12         EGIT_REPO_URI="https://github.com/Datera/${PN}.git"
13         KEYWORDS=""
14 else
15         MY_PV=${PV/_/-}
16         SRC_URI="https://github.com/Datera/${PN}/archive/${PV/_/-}.tar.gz -> ${P}.tar.gz"
17         S="${WORKDIR}/${PN}-${MY_PV}"
18         KEYWORDS="~amd64"
19 fi
20
21 DESCRIPTION="CLI and shell for the Linux SCSI target"
22 HOMEPAGE="http://linux-iscsi.org/wiki/targetcli"
23
24 LICENSE="Apache-2.0"
25 SLOT="0"
26 IUSE=""
27
28 DEPEND="dev-python/configshell[${PYTHON_USEDEP}]
29         dev-python/prettytable[${PYTHON_USEDEP}]
30         dev-python/rtslib[${PYTHON_USEDEP}]"
31 RDEPEND="${DEPEND}
32         dev-python/urwid[${PYTHON_USEDEP}]"
33
34 pkg_pretend() {
35         if use kernel_linux; then
36                 linux-info_get_any_version
37                 if ! linux_config_exists; then
38                         eerror "Unable to check your kernel for SCSI target support"
39                 else
40                         CONFIG_CHECK="~TARGET_CORE"
41                         check_extra_config
42                 fi
43         fi
44 }