diff options
| author | Adrian Dudau <adrian.dudau@enea.com> | 2013-12-12 13:38:32 +0100 |
|---|---|---|
| committer | Adrian Dudau <adrian.dudau@enea.com> | 2013-12-12 13:50:20 +0100 |
| commit | e2e6f6fe07049f33cb6348780fa975162752e421 (patch) | |
| tree | b1813295411235d1297a0ed642b1346b24fdfb12 /meta/recipes-devtools/tcf-agent | |
| download | poky-e2e6f6fe07049f33cb6348780fa975162752e421.tar.gz | |
initial commit of Enea Linux 3.1
Migrated from the internal git server on the dora-enea branch
Signed-off-by: Adrian Dudau <adrian.dudau@enea.com>
Diffstat (limited to 'meta/recipes-devtools/tcf-agent')
3 files changed, 156 insertions, 0 deletions
diff --git a/meta/recipes-devtools/tcf-agent/tcf-agent/fix_ranlib.patch b/meta/recipes-devtools/tcf-agent/tcf-agent/fix_ranlib.patch new file mode 100644 index 0000000000..5d704567c8 --- /dev/null +++ b/meta/recipes-devtools/tcf-agent/tcf-agent/fix_ranlib.patch | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | Upstream-Status: Inappropriate [poky-specific fix] | ||
| 2 | |||
| 3 | --- a/Makefile.inc | ||
| 4 | +++ b/Makefile.inc | ||
| 5 | @@ -57,6 +57,9 @@ | ||
| 6 | ifeq ($(NO_UUID),) | ||
| 7 | LIBS += -luuid | ||
| 8 | endif | ||
| 9 | + ifneq ($(RANLIB),) | ||
| 10 | + RANLIB += $@ | ||
| 11 | + endif | ||
| 12 | endif | ||
| 13 | |||
| 14 | ifneq ($(OPSYS),Windows) | ||
diff --git a/meta/recipes-devtools/tcf-agent/tcf-agent/fix_tcf-agent.init.patch b/meta/recipes-devtools/tcf-agent/tcf-agent/fix_tcf-agent.init.patch new file mode 100644 index 0000000000..8ea5b43d53 --- /dev/null +++ b/meta/recipes-devtools/tcf-agent/tcf-agent/fix_tcf-agent.init.patch | |||
| @@ -0,0 +1,96 @@ | |||
| 1 | Upstream-Status: Inappropriate [poky-specific script] | ||
| 2 | |||
| 3 | --- a/Makefile | ||
| 4 | +++ b/Makefile | ||
| 5 | @@ -64,7 +64,7 @@ | ||
| 6 | install -d -m 755 $(INSTALLROOT)$(INCLUDE)/tcf/services | ||
| 7 | install -c $(BINDIR)/agent -m 755 $(INSTALLROOT)$(SBIN)/tcf-agent | ||
| 8 | install -c $(BINDIR)/client -m 755 $(INSTALLROOT)$(SBIN)/tcf-client | ||
| 9 | - install -c main/tcf-agent.init -m 755 $(INSTALLROOT)$(INIT)/tcf-agent | ||
| 10 | + install -c tcf-agent.init -m 755 $(INSTALLROOT)$(INIT)/tcf-agent | ||
| 11 | install -c config.h -m 755 $(INSTALLROOT)$(INCLUDE)/tcf/config.h | ||
| 12 | install -c -t $(INSTALLROOT)$(INCLUDE)/tcf/framework -m 644 framework/*.h | ||
| 13 | install -c -t $(INSTALLROOT)$(INCLUDE)/tcf/services -m 644 services/*.h | ||
| 14 | --- /dev/null | ||
| 15 | +++ b/tcf-agent.init | ||
| 16 | @@ -0,0 +1,80 @@ | ||
| 17 | +#!/bin/sh | ||
| 18 | +### BEGIN INIT INFO | ||
| 19 | +# Provides: tcf-agent | ||
| 20 | +# Default-Start: 3 5 | ||
| 21 | +# Default-Stop: 0 1 2 6 | ||
| 22 | +# Short-Description: Target Communication Framework agent | ||
| 23 | +### END INIT INFO | ||
| 24 | + | ||
| 25 | +DAEMON_PATH=/usr/sbin/tcf-agent | ||
| 26 | +DAEMON_NAME=`basename $DAEMON_PATH` | ||
| 27 | + | ||
| 28 | +. /etc/init.d/functions | ||
| 29 | + | ||
| 30 | +test -x $DAEMON_PATH || exit 0 | ||
| 31 | + | ||
| 32 | +PATH=/sbin:/usr/sbin:/bin:/usr/bin | ||
| 33 | +export PATH | ||
| 34 | + | ||
| 35 | +RETVAL=0 | ||
| 36 | + | ||
| 37 | +case "$1" in | ||
| 38 | + start) | ||
| 39 | + echo -n "Starting $DAEMON_NAME: " | ||
| 40 | + $DAEMON_PATH -d -L- -l0 | ||
| 41 | + RETVAL=$? | ||
| 42 | + if [ $RETVAL -eq 0 ] ; then | ||
| 43 | + echo "OK" | ||
| 44 | + touch /var/lock/subsys/$DAEMON_NAME | ||
| 45 | + else | ||
| 46 | + echo "FAIL" | ||
| 47 | + fi | ||
| 48 | + ;; | ||
| 49 | + | ||
| 50 | + stop) | ||
| 51 | + echo -n "Stopping $DAEMON_NAME: " | ||
| 52 | + count=0 | ||
| 53 | + pid=$(/bin/pidof $DAEMON_PATH) | ||
| 54 | + while [ -n "`/bin/pidof $DAEMON_PATH`" -a $count -lt 10 ] ; do | ||
| 55 | + kill $pid > /dev/null 2>&1 | ||
| 56 | + sleep 1 | ||
| 57 | + RETVAL=$? | ||
| 58 | + if [ $RETVAL != 0 -o -n "`/bin/pidof $DAEMON_PATH`" ] ; then | ||
| 59 | + sleep 3 | ||
| 60 | + fi | ||
| 61 | + count=`expr $count + 1` | ||
| 62 | + pid=$(/bin/pidof $DAEMON_PATH) | ||
| 63 | + done | ||
| 64 | + rm -f /var/lock/subsys/$DAEMON_NAME | ||
| 65 | + if [ -n "`/bin/pidof $DAEMON_PATH`" ] ; then | ||
| 66 | + echo "FAIL" | ||
| 67 | + else | ||
| 68 | + echo "OK" | ||
| 69 | + fi | ||
| 70 | + ;; | ||
| 71 | + | ||
| 72 | + restart) | ||
| 73 | + $0 stop | ||
| 74 | + sleep 1 | ||
| 75 | + $0 start | ||
| 76 | + ;; | ||
| 77 | + | ||
| 78 | + status) | ||
| 79 | + if [ -n "`/bin/pidof $DAEMON_PATH`" ] ; then | ||
| 80 | + echo "$DAEMON_NAME is running" | ||
| 81 | + else | ||
| 82 | + echo "$DAEMON_NAME is not running" | ||
| 83 | + fi | ||
| 84 | + ;; | ||
| 85 | + | ||
| 86 | + condrestart) | ||
| 87 | + [ -f /var/lock/subsys/$DAEMON_NAME ] && $0 restart | ||
| 88 | + ;; | ||
| 89 | + | ||
| 90 | + *) | ||
| 91 | + echo "usage: $0 { start | stop | restart | condrestart | status }" | ||
| 92 | + ;; | ||
| 93 | +esac | ||
| 94 | + | ||
| 95 | +exit $RETVAL | ||
| 96 | + | ||
diff --git a/meta/recipes-devtools/tcf-agent/tcf-agent_git.bb b/meta/recipes-devtools/tcf-agent/tcf-agent_git.bb new file mode 100644 index 0000000000..09b153ed57 --- /dev/null +++ b/meta/recipes-devtools/tcf-agent/tcf-agent_git.bb | |||
| @@ -0,0 +1,46 @@ | |||
| 1 | DESCRIPTION = "Target Communication Framework" | ||
| 2 | HOMEPAGE = "http://wiki.eclipse.org/TCF" | ||
| 3 | BUGTRACKER = "https://bugs.eclipse.org/bugs/" | ||
| 4 | |||
| 5 | LICENSE = "EPL-1.0 | EDL-1.0" | ||
| 6 | LIC_FILES_CHKSUM = "file://edl-v10.html;md5=522a390a83dc186513f0500543ad3679" | ||
| 7 | |||
| 8 | SRCREV = "4ef94ecb927a8912c3d79ce137182247786cff8f" | ||
| 9 | PV = "0.4.0+git${SRCPV}" | ||
| 10 | PR = "r2" | ||
| 11 | |||
| 12 | SRC_URI = "git://git.eclipse.org/gitroot/tcf/org.eclipse.tcf.agent.git \ | ||
| 13 | file://fix_ranlib.patch \ | ||
| 14 | file://fix_tcf-agent.init.patch \ | ||
| 15 | " | ||
| 16 | |||
| 17 | DEPENDS = "util-linux openssl" | ||
| 18 | RDEPENDS_${PN} = "bash" | ||
| 19 | |||
| 20 | S = "${WORKDIR}/git" | ||
| 21 | |||
| 22 | inherit update-rc.d | ||
| 23 | |||
| 24 | INITSCRIPT_NAME = "tcf-agent" | ||
| 25 | INITSCRIPT_PARAMS = "start 99 3 5 . stop 20 0 1 2 6 ." | ||
| 26 | |||
| 27 | # mangling needed for make | ||
| 28 | MAKE_ARCH = "`echo ${TARGET_ARCH} | sed s,i.86,i686,`" | ||
| 29 | MAKE_OS = "`echo ${TARGET_OS} | sed s,^linux.*,GNU/Linux,`" | ||
| 30 | |||
| 31 | EXTRA_OEMAKE = "MACHINE=${MAKE_ARCH} OPSYS=${MAKE_OS} 'CC=${CC}' 'AR=${AR}'" | ||
| 32 | |||
| 33 | # They don't build on ARM and we don't need them actually. | ||
| 34 | CFLAGS += "-DSERVICE_RunControl=0 -DSERVICE_Breakpoints=0 \ | ||
| 35 | -DSERVICE_Memory=0 -DSERVICE_Registers=0 -DSERVICE_MemoryMap=0 \ | ||
| 36 | -DSERVICE_StackTrace=0 -DSERVICE_Symbols=0 -DSERVICE_LineNumbers=0 \ | ||
| 37 | -DSERVICE_Expressions=0" | ||
| 38 | |||
| 39 | do_compile() { | ||
| 40 | oe_runmake | ||
| 41 | } | ||
| 42 | |||
| 43 | do_install() { | ||
| 44 | oe_runmake install INSTALLROOT=${D} | ||
| 45 | } | ||
| 46 | |||
