summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/sys-block/tgt/tgt-scm.exheres-07
-rw-r--r--packages/sys-block/tgt/tgt.exlib28
2 files changed, 35 insertions, 0 deletions
diff --git a/packages/sys-block/tgt/tgt-scm.exheres-0 b/packages/sys-block/tgt/tgt-scm.exheres-0
new file mode 100644
index 0000000..00dab4f
--- /dev/null
+++ b/packages/sys-block/tgt/tgt-scm.exheres-0
@@ -0,0 +1,7 @@
+# Copyright 2019 Gluzskiy Alexandr <sss@sss.chaoslab.ru>
+# Distributed under the terms of the GNU General Public License v2
+
+require tgt
+
+PLATFORMS="~amd64 ~x86"
+
diff --git a/packages/sys-block/tgt/tgt.exlib b/packages/sys-block/tgt/tgt.exlib
new file mode 100644
index 0000000..a37721e
--- /dev/null
+++ b/packages/sys-block/tgt/tgt.exlib
@@ -0,0 +1,28 @@
+# Distributed under the terms of the GNU General Public License v2
+# Copyright 2019 Gluzskiy Alexandr <sss@sss.chaoslab.ru>
+
+require github [ user=fujita tag=v${PV} ] systemd-service
+export_exlib_phases src_install
+
+SUMMARY="Linux SCSI target framework (tgt)"
+
+SLOT="0"
+LICENCES="GPL-2"
+
+DEPENDENCIES="
+ build:
+ dev-libs/libxslt
+ run:
+ dev-perl/Config-General
+"
+
+DEFAULT_SRC_INSTALL_PARAMS=(
+ sbindir="/usr/$(exhost --target)/bin"
+)
+
+tgt_src_install () {
+ default
+ edo mkdir -p "${IMAGE}/${SYSTEMDSYSTEMUNITDIR}/"
+ edo cp "${WORK}"/scripts/tgtd.service "${IMAGE}/${SYSTEMDSYSTEMUNITDIR}"/
+ keepdir /etc/tgt/conf.d
+}