From patchwork Wed Feb 26 12:48:29 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Kim_B=C3=B8ndergaard?= X-Patchwork-Id: 324381 X-Patchwork-Delegate: esben@haabendal.dk Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hugin.dotsrc.org (hugin.dotsrc.org [IPv6:2001:878:346::102]) by ozlabs.org (Postfix) with ESMTP id 4E0882C009F for ; Wed, 26 Feb 2014 23:48:37 +1100 (EST) Received: from hugin.dotsrc.org (localhost [127.0.0.1]) by hugin.dotsrc.org (Postfix) with ESMTP id 2ED6C3FCF9 for ; Wed, 26 Feb 2014 13:48:35 +0100 (CET) X-Original-To: dev@oe-lite.org Delivered-To: dev@oe-lite.org Received: from mail02.prevas.se (mail02.prevas.se [62.95.78.10]) by hugin.dotsrc.org (Postfix) with ESMTPS id EF00E3F979 for ; Wed, 26 Feb 2014 13:48:31 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=prevas.dk; i=@prevas.dk; l=3666; q=dns/txt; s=ironport2; t=1393418911; x=1424954911; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=CducjfU4MQErGG5cAy8A4hvaED9Mydqu5PPeL0Fu0tE=; b=SJU5j/zg1fY1/WG/60mLIrCvLQ4fX8nx0EOE2IZ+NGzD7gFEBhiTyvl9 xySdRC7vMdYhEFaGCoTipwdOWLGx2wyHvdAxK/PwAdi4O0IvOmJgogRh7 wK3bhE+M43/OK7mfElUN1FJb0lE4Acu75Yp3a6pNHu3GzDqUmSyaf9KE7 w=; X-IronPort-AV: E=Sophos;i="4.97,547,1389740400"; d="scan'208";a="334122" Received: from vmprevas3.prevas.se (HELO smtp.prevas.se) ([172.16.8.103]) by ironport2.prevas.se with ESMTP/TLS/AES128-SHA; 26 Feb 2014 13:48:31 +0100 Received: from localhost (172.16.10.102) by smtp.prevas.se (172.16.8.105) with Microsoft SMTP Server id 14.2.347.0; Wed, 26 Feb 2014 13:48:31 +0100 Received: by localhost (Postfix, from userid 30019) id 47E21682004; Wed, 26 Feb 2014 12:48:31 +0000 (UTC) From: =?UTF-8?q?Kim=20B=C3=B8ndergaard?= To: Subject: [PATCH 1/1] ser2net: New recipe Date: Wed, 26 Feb 2014 12:48:29 +0000 Message-ID: <2b7995a2905b5f266ca9f477e96cb1fa31eb735d.1393418863.git.kibo@prevas.dk> X-Mailer: git-send-email 1.8.4 In-Reply-To: References: MIME-Version: 1.0 Cc: =?UTF-8?q?Kim=20B=C3=B8ndergaard?= X-BeenThere: dev@oe-lite.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: OE-lite development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dev-bounces@oe-lite.org Errors-To: dev-bounces@oe-lite.org --- recipes/ser2net/files/ser2net.conf.in | 3 +++ recipes/ser2net/files/ser2net.init | 32 ++++++++++++++++++++++++++++++ recipes/ser2net/ser2net.inc | 37 +++++++++++++++++++++++++++++++++++ recipes/ser2net/ser2net_2.9.1.oe | 1 + recipes/ser2net/ser2net_2.9.1.oe.sig | 1 + 5 files changed, 74 insertions(+) create mode 100644 recipes/ser2net/files/ser2net.conf.in create mode 100755 recipes/ser2net/files/ser2net.init create mode 100644 recipes/ser2net/ser2net.inc create mode 100644 recipes/ser2net/ser2net_2.9.1.oe create mode 100644 recipes/ser2net/ser2net_2.9.1.oe.sig diff --git a/recipes/ser2net/files/ser2net.conf.in b/recipes/ser2net/files/ser2net.conf.in new file mode 100644 index 0000000..0b4ef0e --- /dev/null +++ b/recipes/ser2net/files/ser2net.conf.in @@ -0,0 +1,3 @@ +BANNER:banner1:this is ser2net TCP port \p device \d serial parms \s\r\n + + diff --git a/recipes/ser2net/files/ser2net.init b/recipes/ser2net/files/ser2net.init new file mode 100755 index 0000000..a99cd20 --- /dev/null +++ b/recipes/ser2net/files/ser2net.init @@ -0,0 +1,32 @@ +#! /bin/sh + +SERVICE=ser2net +UTIL=/usr/sbin/$SERVICE + +test -f $UTIL || exit 0 + +case "$1" in + start) + echo -n "Starting $SERVICE ..." + start-stop-daemon --start --quiet --exec $UTIL + echo "." + ;; + stop) + echo -n "Stopping $SERVICE ..." + start-stop-daemon --stop --quiet --exec $UTIL + echo "." + ;; + restart|force-reload) + echo -n "Restarting $SERVICE ..." + start-stop-daemon --stop --quiet --exec $UTIL + sleep 2 + start-stop-daemon --start --quiet --exec $UTIL + echo "done." + ;; + *) + echo "Usage: /etc/init.d/$SERVICE {start|stop|restart|force-reload}" + exit 1 + ;; +esac + +exit 0 diff --git a/recipes/ser2net/ser2net.inc b/recipes/ser2net/ser2net.inc new file mode 100644 index 0000000..ebcb124 --- /dev/null +++ b/recipes/ser2net/ser2net.inc @@ -0,0 +1,37 @@ +DESCRIPTION = "Serial port to network proxy" +HOMEPAGE = "http://sourceforge.net/projects/ser2net/" +LICENSE = "GPLv2" + +inherit autotools-autoreconf auto-package-utils + +require conf/fetch/sourceforge.conf +SRC_URI = "${SOURCEFORGE_MIRROR}/${PN}/${PN}-${PV}.tar.gz" +SRC_URI += "file://ser2net.conf.in" +SRC_URI += "file://ser2net.init" + +RECIPE_FLAGS += "ser2net_config" +DEFAULT_USE_ser2net_config = "3001:telnet:0:/dev/ttyUSB0:115200 remctl banner1" + +do_patch[postfuncs] += "do_patch_conf_file" +do_patch_conf_file() { + echo ${USE_ser2net_config} >> ${SRCDIR}/ser2net.conf.in +} + +do_install[postfuncs] += "do_install_extra_files" +do_install_extra_files() { + sysvinit_install_script ${SRCDIR}/ser2net.init ser2net + mkdir -p ${D}${sysconfdir} + install -m 0644 ${SRCDIR}/ser2net.conf.in \ + ${D}${sysconfdir}/ser2net.conf +} + +inherit sysvinit +RECIPE_FLAGS += "ser2net_sysvinit_start ser2net_sysvinig_stop" +SYSVINIT_SCRIPT_ser2net = "ser2net" +DEFAULT_USE_ser2net_sysvinit_start = "98" +DEFAULT_USE_ser2net_sysvinit_stop = "98" + +FILES_${PN} += "/etc/ser2net.conf" + +DEPENDS_${PN} = "libc" +RDEPENDS_${PN} = "libc" diff --git a/recipes/ser2net/ser2net_2.9.1.oe b/recipes/ser2net/ser2net_2.9.1.oe new file mode 100644 index 0000000..7b6d5a2 --- /dev/null +++ b/recipes/ser2net/ser2net_2.9.1.oe @@ -0,0 +1 @@ +include ser2net.inc diff --git a/recipes/ser2net/ser2net_2.9.1.oe.sig b/recipes/ser2net/ser2net_2.9.1.oe.sig new file mode 100644 index 0000000..5ec41c4 --- /dev/null +++ b/recipes/ser2net/ser2net_2.9.1.oe.sig @@ -0,0 +1 @@ +dc8662a1c83391a6b437bc9d2443fb7a65548a9a ser2net-2.9.1.tar.gz