diff options
| author | Mihai Prica <prica.mihai@gmail.com> | 2013-06-11 14:44:55 +0300 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2013-08-28 18:41:56 -0400 |
| commit | b72360be0414ce6f9c7dba877617ef336034109d (patch) | |
| tree | 4016f9f04dc2e159a9bba3246bf753eba7d6b855 /meta-openstack/recipes-support | |
| parent | 89f005550007fbaf1d9a8fa0013a0f8d12262a40 (diff) | |
| download | meta-cloud-services-b72360be0414ce6f9c7dba877617ef336034109d.tar.gz | |
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.init | 61 | ||||
| -rw-r--r-- | meta-openstack/recipes-support/tgt/tgt_git.bb | 59 |
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 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | DESC="tgtd" | ||
| 4 | DAEMON="/usr/sbin/tgtd" | ||
| 5 | PIDFILE="/var/run/tgtd.pid" | ||
| 6 | |||
| 7 | start () | ||
| 8 | { | ||
| 9 | if [ -e $PIDFILE ]; then | ||
| 10 | PIDDIR=/proc/$(cat $PIDFILE) | ||
| 11 | if [ -d ${PIDDIR} ]; then | ||
| 12 | echo "$DESC already running." | ||
| 13 | exit 1 | ||
| 14 | else | ||
| 15 | echo "Removing stale PID file $PIDFILE" | ||
| 16 | rm -f $PIDFILE | ||
| 17 | fi | ||
| 18 | fi | ||
| 19 | |||
| 20 | echo -n "Starting $DESC..." | ||
| 21 | |||
| 22 | start-stop-daemon --start --quiet --pidfile ${PIDFILE} \ | ||
| 23 | --make-pidfile --exec ${DAEMON} | ||
| 24 | |||
| 25 | if [ $? -eq 0 ]; then | ||
| 26 | echo "done." | ||
| 27 | else | ||
| 28 | echo "failed." | ||
| 29 | fi | ||
| 30 | } | ||
| 31 | |||
| 32 | stop () | ||
| 33 | { | ||
| 34 | echo -n "Stopping $DESC..." | ||
| 35 | start-stop-daemon --stop --quiet --pidfile $PIDFILE | ||
| 36 | if [ $? -eq 0 ]; then | ||
| 37 | echo "done." | ||
| 38 | else | ||
| 39 | echo "failed." | ||
| 40 | fi | ||
| 41 | rm -f $PIDFILE | ||
| 42 | } | ||
| 43 | |||
| 44 | case "$1" in | ||
| 45 | start) | ||
| 46 | start | ||
| 47 | ;; | ||
| 48 | stop) | ||
| 49 | stop | ||
| 50 | ;; | ||
| 51 | restart|force-reload) | ||
| 52 | stop | ||
| 53 | start | ||
| 54 | ;; | ||
| 55 | *) | ||
| 56 | echo "Usage: $0 {start|stop|force-reload|restart}" | ||
| 57 | exit 1 | ||
| 58 | ;; | ||
| 59 | esac | ||
| 60 | |||
| 61 | 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 @@ | |||
| 1 | DESCRIPTION = "Linux SCSI target framework (tgt)" | ||
| 2 | HOMEPAGE = "http://stgt.sourceforge.net" | ||
| 3 | LICENSE = "GPLv2" | ||
| 4 | LIC_FILES_CHKSUM = "file://scripts/tgtd.spec;beginline=7;endline=7;md5=21c19ea7dad04648b9c2f791b6e29b4c" | ||
| 5 | DEPENDS = "sg3-utils" | ||
| 6 | |||
| 7 | SRCREV = "0ee382bab57a8ecd9ece18d511bd098298478409" | ||
| 8 | PV = "1.0.36+git${SRCPV}" | ||
| 9 | PR = "r0" | ||
| 10 | |||
| 11 | SRC_URI = "git://github.com/fujita/${PN}.git;protocol=git \ | ||
| 12 | file://tgtd.init" | ||
| 13 | |||
| 14 | S = "${WORKDIR}/git" | ||
| 15 | |||
| 16 | do_compile() { | ||
| 17 | oe_runmake -e programs conf scripts | ||
| 18 | } | ||
| 19 | |||
| 20 | do_install() { | ||
| 21 | #Quick don't build docs | ||
| 22 | oe_runmake -e DESTDIR="${D}" install-programs install-conf install-scripts | ||
| 23 | |||
| 24 | if ${@base_contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then | ||
| 25 | install -d ${D}${sysconfdir}/init.d | ||
| 26 | install -m 0755 ${WORKDIR}/tgtd.init ${D}${sysconfdir}/init.d/tgtd | ||
| 27 | fi | ||
| 28 | } | ||
| 29 | |||
| 30 | RDEPENDS_${PN} = "perl-tests \ | ||
| 31 | libconfig-general-perl \ | ||
| 32 | perl-module-english \ | ||
| 33 | perl-module-tie-hash-namedcapture \ | ||
| 34 | perl-module-xsloader \ | ||
| 35 | perl-module-carp \ | ||
| 36 | perl-module-exporter \ | ||
| 37 | perl-module-errno \ | ||
| 38 | perl-module-exporter-heavy \ | ||
| 39 | perl-module-symbol \ | ||
| 40 | perl-module-selectsaver \ | ||
| 41 | perl-module-dynaloader \ | ||
| 42 | perl-module-carp-heavy \ | ||
| 43 | perl-module-filehandle \ | ||
| 44 | perl-module-feature \ | ||
| 45 | perl-module-overload \ | ||
| 46 | perl-module-fcntl \ | ||
| 47 | perl-module-io \ | ||
| 48 | perl-module-io-file \ | ||
| 49 | perl-module-io-handle \ | ||
| 50 | perl-module-io-seekable \ | ||
| 51 | perl-module-file-glob \ | ||
| 52 | perl-module-base \ | ||
| 53 | perl-module-encoding-warnings \ | ||
| 54 | perl-module-file-spec-unix \ | ||
| 55 | perl-module-file-spec \ | ||
| 56 | perl-module-file-spec-functions \ | ||
| 57 | " | ||
| 58 | |||
| 59 | INITSCRIPT_NAME_${tgt} = "tgtd" | ||
