From patchwork Sat Mar 21 09:06:25 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rhys Williams X-Patchwork-Id: 453082 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id 59407140187 for ; Sun, 22 Mar 2015 18:05:30 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id A6EFBA2EA3; Sun, 22 Mar 2015 07:05:29 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jINpQzUQQWp2; Sun, 22 Mar 2015 07:05:29 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id E2EE8A2E8E; Sun, 22 Mar 2015 07:05:28 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id DB02A1C277D for ; Sun, 22 Mar 2015 07:05:27 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id CB3FF30C46 for ; Sun, 22 Mar 2015 07:05:27 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tfECTDZmLuk4 for ; Sun, 22 Mar 2015 07:05:27 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mta.nzinternet.co.nz (newz01vm2.localcloud.net.nz [116.90.78.152]) by silver.osuosl.org (Postfix) with ESMTP id 9E3AB2FCF5 for ; Sun, 22 Mar 2015 07:05:26 +0000 (UTC) Received: from ip-118-90-91-63.xdsl.xnet.co.nz [118.90.91.63] by mta.nzinternet.co.nz with SMTP; Sun, 22 Mar 2015 19:50:15 +1300 From: Rhys Williams To: buildroot@buildroot.org Date: Sat, 21 Mar 2015 22:06:25 +1300 Message-Id: <1426928785-806-2-git-send-email-github@wilberforce.co.nz> X-Mailer: git-send-email 2.3.2 In-Reply-To: <1426928785-806-1-git-send-email-github@wilberforce.co.nz> References: <1426928785-806-1-git-send-email-github@wilberforce.co.nz> Subject: [Buildroot] [PATCH 2/2] Add support for lirc files, lircd and irw etc X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Signed-off-by: Rhys Williams --- package/lirc-tools/Config.in | 15 +++++++++++++++ package/lirc-tools/S25lircd | 39 +++++++++++++++++++++++++++++++++++++++ package/lirc-tools/lirc-tools.mk | 30 ++++++++++++++++++++++++++++++ 3 files changed, 84 insertions(+) create mode 100644 package/lirc-tools/Config.in create mode 100755 package/lirc-tools/S25lircd create mode 100644 package/lirc-tools/lirc-tools.mk diff --git a/package/lirc-tools/Config.in b/package/lirc-tools/Config.in new file mode 100644 index 0000000..011d85d --- /dev/null +++ b/package/lirc-tools/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_LIRC_TOOLS + bool "lirc-tools" + help + Linux Infrared Remote Control IR receiver/transmitter Daemon and tools + LIRC is a package that supports receiving and sending IR + signals of the most common IR remote controls. It contains a + daemon that decodes and sends IR signals, a mouse daemon + that translates IR signals to mouse movements and a couple + of user programs that allow to control your computer with a + remote control. + + lircd, irw, irrecord, mode2 etc + + http://www.lirc.org/ + diff --git a/package/lirc-tools/S25lircd b/package/lirc-tools/S25lircd new file mode 100755 index 0000000..ebf5ce4 --- /dev/null +++ b/package/lirc-tools/S25lircd @@ -0,0 +1,39 @@ +#!/bin/sh +# +# Start lirc +# +# Support for remotes - Add remotes to /etc/lirc/lircd.conf.d/ +# + +start() { + echo -n "Starting lirc: " + mkdir /var/run/lirc + ln -s /var/run/lirc/lircd /dev/lircd + #lircd -O /etc/lirc/lirc_options.conf + start-stop-daemon -b -S -q -m -p /var/run/lirc.pid --exec /usr/sbin/lircd -- -O /etc/lirc/lirc_options.conf + echo "OK" +} + +stop() { + echo -n "Stopping lirc: " + start-stop-daemon -K -q -p /var/run/lirc.pid + echo "OK" +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart|reload) + stop + start + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $? diff --git a/package/lirc-tools/lirc-tools.mk b/package/lirc-tools/lirc-tools.mk new file mode 100644 index 0000000..cd3b38c --- /dev/null +++ b/package/lirc-tools/lirc-tools.mk @@ -0,0 +1,30 @@ +############################################################# +# +# lirc-tools +# +############################################################# + +LIRC_TOOLS_VERSION = 0.9.2 +LIRC_TOOLS_SOURCE = lirc-$(LIRC_TOOLS_VERSION).tar.bz2 +LIRC_TOOLS_SITE = http://downloads.sourceforge.net/project/lirc/LIRC/$(LIRC_TOOLS_VERSION)/ + +LIRC_TOOLS_INSTALL_STAGING = YES +LIRC_TOOLS_INSTALL_TARGET = YES + +LIRC_TOOLS_AUTORECONF=YES + +LIRC_TOOLS_CONF_OPTS = --without-x --enable-sandboxed --with-driver=userspace + +LIRC_TOOLS_POST_INSTALL_TARGET_HOOKS += LIRC_TOOLS_INSTALL_TARGET_SCRIPTS +LIRC_TOOLS_POST_UNINSTALL_TARGET_HOOKS += LIRC_TOOLS_UNINSTALL_TARGET_SCRIPTS + +define LIRC_TOOLS_INSTALL_TARGET_SCRIPTS + mkdir -p $(TARGET_DIR)/etc/init.d + $(INSTALL) -m 0755 package/lirc-tools/S25lircd $(TARGET_DIR)/etc/init.d/ +endef + +define LIRC_TOOLS_UNINSTALL_TARGET_SCRIPTS + rm -f $(TARGET_DIR)/etc/init.d/S25lircd +endef + +$(eval $(autotools-package))