Skip to contentSkip to conversation

Add lirc-tools

PATCH New Rhys Williams 2 participants 3 messages Mar 21, 2015 – Mar 22, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 Add lirc-tools

---
 package/Config.in | 1 +
 1 file changed, 1 insertion(+)
package/Config.in +1 -0
index 93fde92..f97ea6e 100644
@@ -342,6 +342,7 @@ endif
 	source "package/iucode-tool/Config.in"
 	source "package/kbd/Config.in"
 	source "package/lcdproc/Config.in"
+	source "package/lirc-tools/Config.in"
 	source "package/lm-sensors/Config.in"
 	source "package/lshw/Config.in"
 	source "package/lsuio/Config.in"
Signature · 1 line
2.3.2
#1 lore raw

PATCH 2/2 Add support for lirc files, lircd and irw etc

---
 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
package/lirc-tools/Config.in new file +15 -0
new file mode 100644
index 0000000..011d85d
@@ -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/
+	  
package/lirc-tools/S25lircd new file +39 -0
new file mode 100755
index 0000000..ebf5ce4
@@ -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 $?
package/lirc-tools/lirc-tools.mk new file +30 -0
new file mode 100644
index 0000000..cd3b38c
@@ -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))
Signature · 1 line
2.3.2
#2 lore raw

PATCH 2/2 Add support for lirc files, lircd and irw etc

Hi Rhys,

Thanks for your Buildroot contribution.

Please merge this patch with the previous one, and send as a single patch.

Subject should be: "lirc-tools: new package".

Quoted 16 lines · 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
package/lirc-tools/Config.in new file +0 -0
new file mode 100644
index 0000000..011d85d

package/lirc-tools/Config.in line 10

Quoted 10 lines
package/lirc-tools/Config.in new file +10 -0
@@ -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.

Help lines should be indented with tab + 2 spaces just line the first help line above. Something went wrong with the rest.

Quoted 13 lines
package/lirc-tools/Config.in new file +5 -0
+          
+	  lircd, irw, irrecord, mode2 etc
+	  
+	  http://www.lirc.org/
+	  
package/lirc-tools/S25lircd new file +2 -0
new file mode 100755
index 0000000..ebf5ce4
@@ -0,0 +1,39 @@
+#!/bin/sh
+#

package/lirc-tools/S25lircd line 12

Quoted 10 lines
package/lirc-tools/S25lircd new file +10 -0
+# 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

Please remove unhelpful comments.

Quoted 33 lines
package/lirc-tools/S25lircd new file +27 -0
+	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 $?
package/lirc-tools/lirc-tools.mk new file +0 -0
new file mode 100644
index 0000000..cd3b38c

package/lirc-tools/lirc-tools.mk line 5

Quoted 5 lines
package/lirc-tools/lirc-tools.mk new file +5 -0
@@ -0,0 +1,30 @@
+#############################################################
+#
+# lirc-tools
+#
+#############################################################

80 '#' characters in each separator please.

package/lirc-tools/lirc-tools.mk line 11

Quoted 6 lines
package/lirc-tools/lirc-tools.mk new file +6 -0
+
+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

Why is this? Does this package install libraries/headers? Please explain in the commit log.

package/lirc-tools/lirc-tools.mk line 12

Quoted 1 line
package/lirc-tools/lirc-tools.mk new file +1 -0
+LIRC_TOOLS_INSTALL_TARGET = YES

Not needed. This is the default.

package/lirc-tools/lirc-tools.mk line 14

Quoted 1 line
package/lirc-tools/lirc-tools.mk new file +1 -0
+LIRC_TOOLS_AUTORECONF=YES

Why? Please explain the justification for this in the commit log, and in inline code comment.

package/lirc-tools/lirc-tools.mk line 21

Quoted 7 lines
package/lirc-tools/lirc-tools.mk new file +7 -0
+
+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

Please use the <PKG>_INSTALL_INIT_SYSV variable to install SysV init scripts. This also obviates the need for a _HOOKS addition above.

package/lirc-tools/lirc-tools.mk line 22

Quoted 1 line
package/lirc-tools/lirc-tools.mk new file +1 -0
+	mkdir -p $(TARGET_DIR)/etc/init.d

Not needed.

package/lirc-tools/lirc-tools.mk line 23

Quoted 1 line
package/lirc-tools/lirc-tools.mk new file +1 -0
+	$(INSTALL) -m 0755 package/lirc-tools/S25lircd $(TARGET_DIR)/etc/init.d/

Please add -D.

package/lirc-tools/lirc-tools.mk line 28

Quoted 5 lines
package/lirc-tools/lirc-tools.mk new file +5 -0
+endef
+
+define LIRC_TOOLS_UNINSTALL_TARGET_SCRIPTS
+	rm -f $(TARGET_DIR)/etc/init.d/S25lircd
+endef

Support for package uninstall has been removed from Buildroot some time ago. Please remove this part, and the _HOOKS addition above.

package/lirc-tools/lirc-tools.mk line 30

Quoted 1 line
package/lirc-tools/lirc-tools.mk new file +1 -0
+$(eval $(autotools-package))

baruch

Signature · 3 lines
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -