aboutsummaryrefslogtreecommitdiffstats
path: root/meta-openstack/recipes-support
diff options
context:
space:
mode:
authorMihai Prica <prica.mihai@gmail.com>2013-06-11 14:44:55 +0300
committerBruce Ashfield <bruce.ashfield@windriver.com>2013-08-28 18:41:56 -0400
commitb72360be0414ce6f9c7dba877617ef336034109d (patch)
tree4016f9f04dc2e159a9bba3246bf753eba7d6b855 /meta-openstack/recipes-support
parent89f005550007fbaf1d9a8fa0013a0f8d12262a40 (diff)
downloadmeta-cloud-services-b72360be0414ce6f9c7dba877617ef336034109d.tar.gz
meta-cloud-services-b72360be0414ce6f9c7dba877617ef336034109d.tar.bz2
meta-cloud-services-b72360be0414ce6f9c7dba877617ef336034109d.zip
tgt: added 1.0.36
Signed-off-by: Mihai Prica <prica.mihai@gmail.com>
Diffstat (limited to 'meta-openstack/recipes-support')
-rw-r--r--meta-openstack/recipes-support/tgt/files/tgtd.init61
-rw-r--r--meta-openstack/recipes-support/tgt/tgt_git.bb59
2 files changed, 120 insertions, 0 deletions
diff --git a/meta-openstack/recipes-support/tgt/files/tgtd.init b/meta-openstack/recipes-support/tgt/files/tgtd.init
new file mode 100644
index 0000000..656a243
--- /dev/null
+++ b/meta-openstack/recipes-support/tgt/files/tgtd.init
@@ -0,0 +1,61 @@
+#!/bin/sh
+
+DESC="tgtd"
+DAEMON="/usr/sbin/tgtd"
+PIDFILE="/var/run/tgtd.pid"
+
+start ()
+{
+ if [ -e $PIDFILE ]; then
+ PIDDIR=/proc/$(cat $PIDFILE)
+ if [ -d ${PIDDIR} ]; then
+ echo "$DESC already running."
+ exit 1
+ else
+ echo "Removing stale PID file $PIDFILE"
+ rm -f $PIDFILE
+ fi
+ fi
+
+ echo -n "Starting $DESC..."
+
+ start-stop-daemon --start --quiet --pidfile ${PIDFILE} \
+ --make-pidfile --exec ${DAEMON}
+
+ if [ $? -eq 0 ]; then
+ echo "done."
+ else
+ echo "failed."
+ fi
+}
+
+stop ()
+{
+ echo -n "Stopping $DESC..."
+ start-stop-daemon --stop --quiet --pidfile $PIDFILE
+ if [ $? -eq 0 ]; then
+ echo "done."
+ else
+ echo "failed."
+ fi
+ rm -f $PIDFILE
+}
+
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ restart|force-reload)
+ stop
+ start
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|force-reload|restart}"
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/meta-openstack/recipes-support/tgt/tgt_git.bb b/meta-openstack/recipes-support/tgt/tgt_git.bb
new file mode 100644
index 0000000..fd23ea5
--- /dev/null
+++ b/meta-openstack/recipes-support/tgt/tgt_git.bb
@@ -0,0 +1,59 @@
+DESCRIPTION = "Linux SCSI target framework (tgt)"
+HOMEPAGE = "http://stgt.sourceforge.net"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://scripts/tgtd.spec;beginline=7;endline=7;md5=21c19ea7dad04648b9c2f791b6e29b4c"
+DEPENDS = "sg3-utils"
+
+SRCREV = "0ee382bab57a8ecd9ece18d511bd098298478409"
+PV = "1.0.36+git${SRCPV}"
+PR = "r0"
+
+SRC_URI = "git://github.com/fujita/${PN}.git;protocol=git \
+ file://tgtd.init"
+
+S = "${WORKDIR}/git"
+
+do_compile() {
+ oe_runmake -e programs conf scripts
+}
+
+do_install() {
+ #Quick don't build docs
+ oe_runmake -e DESTDIR="${D}" install-programs install-conf install-scripts
+
+ if ${@base_contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
+ install -d ${D}${sysconfdir}/init.d
+ install -m 0755 ${WORKDIR}/tgtd.init ${D}${sysconfdir}/init.d/tgtd
+ fi
+}
+
+RDEPENDS_${PN} = "perl-tests \
+ libconfig-general-perl \
+ perl-module-english \
+ perl-module-tie-hash-namedcapture \
+ perl-module-xsloader \
+ perl-module-carp \
+ perl-module-exporter \
+ perl-module-errno \
+ perl-module-exporter-heavy \
+ perl-module-symbol \
+ perl-module-selectsaver \
+ perl-module-dynaloader \
+ perl-module-carp-heavy \
+ perl-module-filehandle \
+ perl-module-feature \
+ perl-module-overload \
+ perl-module-fcntl \
+ perl-module-io \
+ perl-module-io-file \
+ perl-module-io-handle \
+ perl-module-io-seekable \
+ perl-module-file-glob \
+ perl-module-base \
+ perl-module-encoding-warnings \
+ perl-module-file-spec-unix \
+ perl-module-file-spec \
+ perl-module-file-spec-functions \
+ "
+
+INITSCRIPT_NAME_${tgt} = "tgtd"