From 972dcfcdbfe75dcfeb777150c136576cf1a71e99 Mon Sep 17 00:00:00 2001 From: Tudor Florea Date: Fri, 9 Oct 2015 22:59:03 +0200 Subject: initial commit for Enea Linux 5.0 arm Signed-off-by: Tudor Florea --- .../tcf-agent/tcf-agent/fix_ranlib.patch | 14 ++++ .../tcf-agent/tcf-agent/tcf-agent.init | 75 ++++++++++++++++++++++ .../tcf-agent/tcf-agent/tcf-agent.service | 10 +++ meta/recipes-devtools/tcf-agent/tcf-agent_git.bb | 54 ++++++++++++++++ 4 files changed, 153 insertions(+) create mode 100644 meta/recipes-devtools/tcf-agent/tcf-agent/fix_ranlib.patch create mode 100755 meta/recipes-devtools/tcf-agent/tcf-agent/tcf-agent.init create mode 100644 meta/recipes-devtools/tcf-agent/tcf-agent/tcf-agent.service create mode 100644 meta/recipes-devtools/tcf-agent/tcf-agent_git.bb (limited to 'meta/recipes-devtools/tcf-agent') 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 @@ +Upstream-Status: Inappropriate [poky-specific fix] + +--- a/Makefile.inc ++++ b/Makefile.inc +@@ -57,6 +57,9 @@ + ifeq ($(NO_UUID),) + LIBS += -luuid + endif ++ ifneq ($(RANLIB),) ++ RANLIB += $@ ++ endif + endif + + ifneq ($(OPSYS),Windows) diff --git a/meta/recipes-devtools/tcf-agent/tcf-agent/tcf-agent.init b/meta/recipes-devtools/tcf-agent/tcf-agent/tcf-agent.init new file mode 100755 index 0000000000..6303280aae --- /dev/null +++ b/meta/recipes-devtools/tcf-agent/tcf-agent/tcf-agent.init @@ -0,0 +1,75 @@ +#!/bin/sh +### BEGIN INIT INFO +# Provides: tcf-agent +# Default-Start: 3 5 +# Default-Stop: 0 1 2 6 +# Short-Description: Target Communication Framework agent +### END INIT INFO + +DAEMON_PATH=/usr/sbin/tcf-agent +DAEMON_NAME=`basename $DAEMON_PATH` + +. /etc/init.d/functions + +test -x $DAEMON_PATH || exit 0 + +PATH=/sbin:/usr/sbin:/bin:/usr/bin +export PATH + +RETVAL=0 + +case "$1" in + start) + echo -n "Starting $DAEMON_NAME: " + $DAEMON_PATH -d -L- -l0 + RETVAL=$? + if [ $RETVAL -eq 0 ] ; then + echo "OK" + touch /var/lock/subsys/$DAEMON_NAME + else + echo "FAIL" + fi + ;; + + stop) + echo -n "Stopping $DAEMON_NAME: " + count=0 + while [ -n "`/bin/pidof $DAEMON_PATH`" -a $count -lt 10 ] ; do + killproc $DAEMON_PATH >& /dev/null + sleep 1 + RETVAL=$? + if [ $RETVAL != 0 -o -n "`/bin/pidof $DAEMON_PATH`" ] ; then + sleep 3 + fi + count=`expr $count + 1` + done + rm -f /var/lock/subsys/$DAEMON_NAME + if [ -n "`/bin/pidof $DAEMON_PATH`" ] ; then + echo "FAIL" + else + echo "OK" + fi + ;; + + restart) + $0 stop + sleep 1 + $0 start + ;; + + status) + status $DAEMON_NAME + RETVAL=$? + ;; + + condrestart) + [ -f /var/lock/subsys/$DAEMON_NAME ] && $0 restart + ;; + + *) + echo "usage: $0 { start | stop | status | restart | condrestart | status }" + ;; +esac + +exit $RETVAL + diff --git a/meta/recipes-devtools/tcf-agent/tcf-agent/tcf-agent.service b/meta/recipes-devtools/tcf-agent/tcf-agent/tcf-agent.service new file mode 100644 index 0000000000..fd9a6c4d56 --- /dev/null +++ b/meta/recipes-devtools/tcf-agent/tcf-agent/tcf-agent.service @@ -0,0 +1,10 @@ +[Unit] +Description=Target Communication Framework agent +After=network.target + +[Service] +Type=forking +ExecStart=@SBINDIR@/tcf-agent -d -L- -l0 + +[Install] +WantedBy=multi-user.target 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..616a6a7a9a --- /dev/null +++ b/meta/recipes-devtools/tcf-agent/tcf-agent_git.bb @@ -0,0 +1,54 @@ +SUMMARY = "Target Communication Framework for the Eclipse IDE" +HOMEPAGE = "http://wiki.eclipse.org/TCF" +BUGTRACKER = "https://bugs.eclipse.org/bugs/" + +LICENSE = "EPL-1.0 | EDL-1.0" +LIC_FILES_CHKSUM = "file://edl-v10.html;md5=522a390a83dc186513f0500543ad3679" + +SRCREV = "4ef94ecb927a8912c3d79ce137182247786cff8f" +PV = "0.4.0+git${SRCPV}" +PR = "r2" + +SRC_URI = "git://git.eclipse.org/gitroot/tcf/org.eclipse.tcf.agent.git \ + file://fix_ranlib.patch \ + file://tcf-agent.init \ + file://tcf-agent.service \ + " + +DEPENDS = "util-linux openssl" +RDEPENDS_${PN} = "bash" + +S = "${WORKDIR}/git" + +inherit update-rc.d systemd + +SYSTEMD_SERVICE_${PN} = "tcf-agent.service" + +INITSCRIPT_NAME = "tcf-agent" +INITSCRIPT_PARAMS = "start 99 3 5 . stop 20 0 1 2 6 ." + +# mangling needed for make +MAKE_ARCH = "`echo ${TARGET_ARCH} | sed s,i.86,i686,`" +MAKE_OS = "`echo ${TARGET_OS} | sed s,^linux.*,GNU/Linux,`" + +EXTRA_OEMAKE = "MACHINE=${MAKE_ARCH} OPSYS=${MAKE_OS} 'CC=${CC}' 'AR=${AR}'" + +# They don't build on ARM and we don't need them actually. +CFLAGS += "-DSERVICE_RunControl=0 -DSERVICE_Breakpoints=0 \ + -DSERVICE_Memory=0 -DSERVICE_Registers=0 -DSERVICE_MemoryMap=0 \ + -DSERVICE_StackTrace=0 -DSERVICE_Symbols=0 -DSERVICE_LineNumbers=0 \ + -DSERVICE_Expressions=0" + +do_compile() { + oe_runmake +} + +do_install() { + oe_runmake install INSTALLROOT=${D} + install -d ${D}${sysconfdir}/init.d/ + install -m 0755 ${WORKDIR}/tcf-agent.init ${D}${sysconfdir}/init.d/tcf-agent + install -d ${D}${systemd_unitdir}/system + install -m 0644 ${WORKDIR}/tcf-agent.service ${D}${systemd_unitdir}/system + sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/tcf-agent.service +} + -- cgit v1.2.3-54-g00ecf