summaryrefslogtreecommitdiff
path: root/sys-block/tgt/tgt-1.0.79-r1.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-01-16 20:27:28 +0000
committerV3n3RiX <venerix@koprulu.sector>2022-01-16 20:27:28 +0000
commit2fd57282f0262ca084e05b0f2c63fbada395d02b (patch)
tree4e0f23cea9ce9fd972e70ebc5214bf36fed465cc /sys-block/tgt/tgt-1.0.79-r1.ebuild
parentc3bc61051d7f12b4c682efa7a5460bbc8815649e (diff)
gentoo resync : 16.01.2021
Diffstat (limited to 'sys-block/tgt/tgt-1.0.79-r1.ebuild')
-rw-r--r--sys-block/tgt/tgt-1.0.79-r1.ebuild59
1 files changed, 59 insertions, 0 deletions
diff --git a/sys-block/tgt/tgt-1.0.79-r1.ebuild b/sys-block/tgt/tgt-1.0.79-r1.ebuild
new file mode 100644
index 000000000000..3ab65a930348
--- /dev/null
+++ b/sys-block/tgt/tgt-1.0.79-r1.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit toolchain-funcs
+
+DESCRIPTION="Linux SCSI target framework (tgt)"
+HOMEPAGE="http://stgt.sourceforge.net"
+SRC_URI="https://github.com/fujita/tgt/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 arm64 ~ppc x86"
+IUSE="fcoe fcp ibmvio infiniband rbd"
+
+DEPEND="
+ app-text/docbook-xsl-stylesheets
+ dev-libs/libxslt
+ dev-perl/Config-General
+ rbd? ( sys-cluster/ceph )
+ infiniband? ( sys-cluster/rdma-core )
+"
+RDEPEND="${DEPEND}
+ dev-libs/libaio
+ sys-apps/sg3_utils"
+
+PATCHES=( "${FILESDIR}"/${P}-fno-common.patch )
+
+pkg_setup() {
+ tc-export CC
+}
+
+src_prepare() {
+ default
+ sed -i -e 's:\($(CC)\) $^:\1 $(LDFLAGS) $^:' usr/Makefile || die
+ # make sure xml docs are generated before trying to install them
+ sed -i -e "s@install: @& all @g" doc/Makefile || die
+ sed -i -e 's|-Werror||g' usr/Makefile || die
+}
+
+src_compile() {
+ local myconf
+ use ibmvio && myconf="${myconf} IBMVIO=1"
+ use infiniband && myconf="${myconf} ISCSI_RDMA=1"
+ use fcp && myconf="${myconf} FCP=1"
+ use fcoe && myconf="${myconf} FCOE=1"
+ use rbd && myconf="${myconf} CEPH_RBD=1"
+
+ emake -C usr/ KERNELSRC="${KERNEL_DIR}" ISCSI=1 ${myconf}
+ emake -C doc
+}
+
+src_install() {
+ emake install-programs install-scripts install-doc DESTDIR="${D}" docdir=/usr/share/doc/${PF}
+ newinitd "${FILESDIR}"/tgtd.initd tgtd
+ newconfd "${FILESDIR}"/tgtd.confd tgtd
+ dodir /etc/tgt
+ keepdir /etc/tgt
+}