Skip to contentSkip to conversation

inputevent: add package

PATCH New Kurt Van Dijck 3 participants 4 messages May 30, 2016 – May 31, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 inputevent: add package

Inputevent is an input-device to ascii tranlator. Its output is of the format 'TIME CODE VALUE' and it's easy to pipe it into a shell script.

---
 package/Config.in                |  1 +
 package/inputevent/Config.in     |  6 ++++++
 package/inputevent/inputevent.mk | 36 ++++++++++++++++++++++++++++++++++++
 3 files changed, 43 insertions(+)
 create mode 100644 package/inputevent/Config.in
 create mode 100644 package/inputevent/inputevent.mk
package/Config.in +1 -0
index 529ad33..112e516 100644
@@ -383,6 +383,7 @@ endif
 	source "package/i2c-tools/Config.in"
 	source "package/input-event-daemon/Config.in"
 	source "package/input-tools/Config.in"
+	source "package/inputevent/Config.in"
 	source "package/intel-microcode/Config.in"
 	source "package/iostat/Config.in"
 	source "package/ipmitool/Config.in"
package/inputevent/Config.in new file +6 -0
new file mode 100644
index 0000000..44422a3
@@ -0,0 +1,6 @@
+config BR2_PACKAGE_INPUTEVENT
+	bool "inputevent"
+	help
+	  inputevent is a simple program that traces input events.
+	  When piped to a another program or script, you get similar
+	  functionality as input-event-daemon.
package/inputevent/inputevent.mk new file +36 -0
new file mode 100644
index 0000000..14a8d31
@@ -0,0 +1,36 @@
+################################################################################
+#
+# inputevent
+#
+################################################################################
+
+INPUTEVENT_VERSION = r8
+INPUTEVENT_SITE = git://github.com/kurt-vd/inputevent.git
+INPUTEVENT_LICENSE = GPLv3
+INPUTEVENT_LICENSE_FILES = LICENSE
+
+define INPUTEVENT_CONFIGURE_CMDS
+	echo "PREFIX=/" > $(@D)/config.mk
+	echo "CFLAGS=$(TARGET_CFLAGS)" >> $(@D)/config.mk
+	echo "CPPFLAGS=-D_GNU_SOURCE $(TARGET_CPPFLAGS)" >> $(@D)/config.mk
+	echo "CXXFLAGS=$(TARGET_CXXFLAGS)" >> $(@D)/config.mk
+	echo "LDFLAGS=$(TARGET_LDFLAGS)" >> $(@D)/config.mk
+	echo "LDLIBS+=$(TARGET_LDLIBS)" >> $(@D)/config.mk
+	echo "CC=$(TARGET_CC)" >> $(@D)/config.mk
+	echo "CXX=$(TARGET_CXX)" >> $(@D)/config.mk
+	echo "LD=$(TARGET_LD)" >> $(@D)/config.mk
+	echo "AS=$(TARGET_AS)" >> $(@D)/config.mk
+
+	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) clean
+endef
+
+define INPUTEVENT_BUILD_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
+endef
+
+define INPUTEVENT_INSTALL_TARGET_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install DESTDIR="$(TARGET_DIR)"
+endef
+
+$(eval $(generic-package))
+#$(eval $(configmk-package))
Signature · 1 line
1.8.5.rc3
#1 lore raw

PATCH 1/1 inputevent: add package

Hello Kurt,

Quoted 1 line · Kurt Van Dijck

Inputevent is an input-device to ascii tranlator.

s/tranlator/translator/?

Regards,
Peter

Quoted 78 lines

Its output is of the format 'TIME CODE VALUE' and it's easy to pipe it into a shell script.

---
 package/Config.in                |  1 +
 package/inputevent/Config.in     |  6 ++++++
 package/inputevent/inputevent.mk | 36 ++++++++++++++++++++++++++++++++++++
 3 files changed, 43 insertions(+)
 create mode 100644 package/inputevent/Config.in
 create mode 100644 package/inputevent/inputevent.mk
package/Config.in +1 -0
index 529ad33..112e516 100644
@@ -383,6 +383,7 @@ endif
 	source "package/i2c-tools/Config.in"
 	source "package/input-event-daemon/Config.in"
 	source "package/input-tools/Config.in"
+	source "package/inputevent/Config.in"
 	source "package/intel-microcode/Config.in"
 	source "package/iostat/Config.in"
 	source "package/ipmitool/Config.in"
package/inputevent/Config.in new file +6 -0
new file mode 100644
index 0000000..44422a3
@@ -0,0 +1,6 @@
+config BR2_PACKAGE_INPUTEVENT
+	bool "inputevent"
+	help
+	  inputevent is a simple program that traces input events.
+	  When piped to a another program or script, you get similar
+	  functionality as input-event-daemon.
package/inputevent/inputevent.mk new file +36 -0
new file mode 100644
index 0000000..14a8d31
@@ -0,0 +1,36 @@
+################################################################################
+#
+# inputevent
+#
+################################################################################
+
+INPUTEVENT_VERSION = r8
+INPUTEVENT_SITE = git://github.com/kurt-vd/inputevent.git
+INPUTEVENT_LICENSE = GPLv3
+INPUTEVENT_LICENSE_FILES = LICENSE
+
+define INPUTEVENT_CONFIGURE_CMDS
+	echo "PREFIX=/" > $(@D)/config.mk
+	echo "CFLAGS=$(TARGET_CFLAGS)" >> $(@D)/config.mk
+	echo "CPPFLAGS=-D_GNU_SOURCE $(TARGET_CPPFLAGS)" >> $(@D)/config.mk
+	echo "CXXFLAGS=$(TARGET_CXXFLAGS)" >> $(@D)/config.mk
+	echo "LDFLAGS=$(TARGET_LDFLAGS)" >> $(@D)/config.mk
+	echo "LDLIBS+=$(TARGET_LDLIBS)" >> $(@D)/config.mk
+	echo "CC=$(TARGET_CC)" >> $(@D)/config.mk
+	echo "CXX=$(TARGET_CXX)" >> $(@D)/config.mk
+	echo "LD=$(TARGET_LD)" >> $(@D)/config.mk
+	echo "AS=$(TARGET_AS)" >> $(@D)/config.mk
+
+	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) clean
+endef
+
+define INPUTEVENT_BUILD_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
+endef
+
+define INPUTEVENT_INSTALL_TARGET_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install DESTDIR="$(TARGET_DIR)"
+endef
+
+$(eval $(generic-package))
+#$(eval $(configmk-package))
#2 lore raw

PATCH 1/1 inputevent: add package

Quoted 8 lines

Hello Kurt,

Quoted 1 line · Kurt Van Dijck

Inputevent is an input-device to ascii tranlator.

s/tranlator/translator/?

of course :-)

Thanks,
Kurt

#3 lore raw

PATCH 1/1 inputevent: add package

In reply to Kurt Van Dijck

Hello,

package/inputevent/Config.in line 6

Quoted 12 lines · Kurt Van Dijck
package/inputevent/Config.in new file +6 -0
new file mode 100644
index 0000000..44422a3
@@ -0,0 +1,6 @@
+config BR2_PACKAGE_INPUTEVENT
+	bool "inputevent"
+	help
+	  inputevent is a simple program that traces input events.
+	  When piped to a another program or script, you get similar
+	  functionality as input-event-daemon.

I certainly don't want to diminish the value of your contribution, but I am wondering what is the usefulness of this program, if it essentially does the same thing as existing programs?

Your description itself shows that it is the same as input-event-daemon when piped into another program. And when not piped to another program, my feeling is that it does the same job as evtest.

I'm happy with adding more and more packages in Buildroot, but we might have to draw the line on which packages we want to accept, and maybe ensure there are at least useful to more persons than just the developer who wrote the program/library.

In any case, you should add the upstream URL of the project here in the Config.in help text, separated from the rest of the description by an empty line (see all other Config.in files for packages in Buildroot).

Quoted 6 lines
package/inputevent/inputevent.mk new file +0 -0
new file mode 100644
index 0000000..14a8d31

package/inputevent/inputevent.mk line 8

Quoted 8 lines
package/inputevent/inputevent.mk new file +8 -0
@@ -0,0 +1,36 @@
+################################################################################
+#
+# inputevent
+#
+################################################################################
+
+INPUTEVENT_VERSION = r8
+INPUTEVENT_SITE = git://github.com/kurt-vd/inputevent.git

Please use the github macro, and add a hash file.

package/inputevent/inputevent.mk line 18

Quoted 10 lines
package/inputevent/inputevent.mk new file +10 -0
+INPUTEVENT_LICENSE = GPLv3
+INPUTEVENT_LICENSE_FILES = LICENSE
+
+define INPUTEVENT_CONFIGURE_CMDS
+	echo "PREFIX=/" > $(@D)/config.mk
+	echo "CFLAGS=$(TARGET_CFLAGS)" >> $(@D)/config.mk
+	echo "CPPFLAGS=-D_GNU_SOURCE $(TARGET_CPPFLAGS)" >> $(@D)/config.mk
+	echo "CXXFLAGS=$(TARGET_CXXFLAGS)" >> $(@D)/config.mk
+	echo "LDFLAGS=$(TARGET_LDFLAGS)" >> $(@D)/config.mk
+	echo "LDLIBS+=$(TARGET_LDLIBS)" >> $(@D)/config.mk

There is no variable named TARGET_LDLIBS in Buildroot.

package/inputevent/inputevent.mk line 22

Quoted 4 lines
package/inputevent/inputevent.mk new file +4 -0
+	echo "CC=$(TARGET_CC)" >> $(@D)/config.mk
+	echo "CXX=$(TARGET_CXX)" >> $(@D)/config.mk
+	echo "LD=$(TARGET_LD)" >> $(@D)/config.mk
+	echo "AS=$(TARGET_AS)" >> $(@D)/config.mk

This seems not needed, just pass all the necessary values in the environment. Also, PREFIX should be /usr.

package/inputevent/inputevent.mk line 24

Quoted 2 lines
package/inputevent/inputevent.mk new file +2 -0
+
+	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) clean

Not needed.

package/inputevent/inputevent.mk line 28

Quoted 4 lines
package/inputevent/inputevent.mk new file +4 -0
+endef
+
+define INPUTEVENT_BUILD_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)

Just do:

	$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) PREFIX=/usr -C $(@D)

TARGET_CONFIGURE_OPTS contains the definition of CFLAGS, CPPFLAGS, CXXFLAGS, CC, CXX, LD, AS and more.

package/inputevent/inputevent.mk line 36

Quoted 8 lines
package/inputevent/inputevent.mk new file +8 -0
+endef
+
+define INPUTEVENT_INSTALL_TARGET_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install DESTDIR="$(TARGET_DIR)"
+endef
+
+$(eval $(generic-package))
+#$(eval $(configmk-package))

This last line is not needed.

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com