inputevent: add package
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
@@ -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
@@ -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
@@ -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
PATCH 1/1 inputevent: add package
Quoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Kurt" == Kurt Van Dijck <[email protected]> writes:
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.
Signed-off-by Kurt Van Dijck <[email protected]>
I see you are the author of this tool, but does this tool provide anything more than evtest (besides perhaps a bit easier to parse output)?
package/inputevent/inputevent.mk line 8
Quoted 8 lines
package/inputevent/inputevent.mk new file +8
-0+################################################################################ +# +# inputevent +# +################################################################################ + +INPUTEVENT_VERSION = r8 +INPUTEVENT_SITE = git://github.com/kurt-vd/inputevent.git
We have a github macro to handle this (see E.G. input-event-daemon.mk for an example).
Quoted 6 lines
package/inputevent/inputevent.mk new file +6
-0+INPUTEVENT_LICENSE = GPLv3 +INPUTEVENT_LICENSE_FILES = LICENSE + +define INPUTEVENT_CONFIGURE_CMDS + echo "PREFIX=/" > $(@D)/config.mk + echo "CFLAGS=$(TARGET_CFLAGS)" >> $(@D)/config.mk
package/inputevent/inputevent.mk line 24
Quoted 10 lines
package/inputevent/inputevent.mk new file +10
-0+ 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
How about passing $(TARGET_CONFIGURE_OPTS) to make instead of writing this config.mk?
Looking at the Makefile, I see it tries to figure out the version by calling git. When this is built in a buildroot git checkout (and inputevent is gotten from a github tarball) this will most likely use version info from the Buildroot git repo which doesn't sound correct.
package/inputevent/inputevent.mk line 36
Quoted 11 lines
package/inputevent/inputevent.mk new file +11
-0+ +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))
Please don't leave commented out code in the files.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 1/1 inputevent: add package
Quoted 10 lines
Quoted 6 lines
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.
Signed-off-by Kurt Van Dijck <[email protected]>I see you are the author of this tool, but does this tool provide anything more than evtest (besides perhaps a bit easier to parse output)?
The easier to parse output is helps to pipe it in scripts like:
while read TIME TYPE VALUE; do case "$TYPE:$VALUE" in KEY_PLAY:0) mpc play ;; esac
second, it supports to control such script as child, making it easy to integrate in a service monitor that just monitors the inputevent program, without the need to monitor the child script.
So I combined evtest-like functionality with a focus on deployment, integrating the tool in a functional system.
evtest is meant as an interactive tool or query a state.
I evalutated input-event-daemon and found that it distracts focus from the overall functionality that I want. input-event-daemon is focused on desktop-like systems, I target embedded systems that perform tasks on GPIO inputs, who are delivered as input events.
Is it different enough?
If you look at how it integrates, then yes.
If you look at what it does, I agree that it appears very much alike.
Quoted 12 lines
package/inputevent/inputevent.mk line 8
Quoted 9 lines
package/inputevent/inputevent.mk new file +8
-0+################################################################################ +# +# inputevent +# +################################################################################ + +INPUTEVENT_VERSION = r8 +INPUTEVENT_SITE = git://github.com/kurt-vd/inputevent.gitWe have a github macro to handle this (see E.G. input-event-daemon.mk for an example).
The first iterations of my patch didn't like the macro very well. I forgot the precise reason.
I will re-evaluate now.
Quoted 13 lines
Quoted 13 lines
package/inputevent/inputevent.mk new file +11
-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 + echo "CC=$(TARGET_CC)" >> $(@D)/config.mk
Quoted 8 lines
package/inputevent/inputevent.mk line 24
Quoted 5 lines
package/inputevent/inputevent.mk new file +5
-0+ 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) cleanHow about passing $(TARGET_CONFIGURE_OPTS) to make instead of writing this config.mk?
Building outside of toplevel make, although I admit it is a bad reason.
I dropped autoconf long time ago, and use such config.mk includes, where necessary. Is Target_CONFIGURE_OPTS available for non-autotools packages?
Quoted 5 lines
Looking at the
Makefile, I see it tries to figure out the version by calling git. When this is built in a buildroot git checkout (and inputevent is gotten from a github tarball) this will most likely use version info from the Buildroot git repo which doesn't sound correct.
Now that is a true problem.
I'll rework.
Quoted 14 lines
package/inputevent/inputevent.mk line 36
Quoted 12 lines
package/inputevent/inputevent.mk new file +11
-0+ +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))Please don't leave commented out code in the files.
Ack, I totally agree.
Kind regards,
Kurt
PATCH 1/1 inputevent: add package
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Kurt" == Kurt Van Dijck <[email protected]> writes:
Hi,
Quoted 4 lines
Quoted 3 lines
I see you are the author of this tool, but does this tool provide anything more than evtest (besides perhaps a bit easier to parse output)?
Quoted 8 lines
The easier to parse output is helps to pipe it in scripts like:
while read TIME TYPE VALUE; do case "$TYPE:$VALUE" in KEY_PLAY:0) mpc play ;; esac
True. evtest is not too bad to parse either though:
while read EVENT T TIME T T TYPE T T CODE T VALUE; do
case "$EVENT" in
Event:)
echo TIME=$TIME TYPE=$TYPE CODE=$CODE VALUE=$VALUE ;;
esac
done
Quoted 10 lines
second, it supports to control such script as child, making it easy to integrate in a service monitor that just monitors the inputevent program, without the need to monitor the child script.
So I combined evtest-like functionality with a focus on deployment, integrating the tool in a functional system.
evtest is meant as an interactive tool or query a state.
Quoted 8 lines
I evalutated input-event-daemon and found that it distracts focus from the overall functionality that I want. input-event-daemon is focused on desktop-like systems, I target embedded systems that perform tasks on GPIO inputs, who are delivered as input events.
Is it different enough?
If you look at how it integrates, then yes.
If you look at what it does, I agree that it appears very much alike.
I don't have any problems adding it, I just wanted to understand what it does differently then evtest, which wasn't clear to me from your commit message / help text.
Quoted 10 lines
Quoted 4 lines
package/inputevent/inputevent.mk line 24
Quoted 1 line
package/inputevent/inputevent.mk new file +1
-0+ $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) cleanHow about passing $(TARGET_CONFIGURE_OPTS) to make instead of writing this config.mk?
Building outside of toplevel make, although I admit it is a bad reason.
I dropped autoconf long time ago, and use such config.mk includes, where necessary. Is
Target_CONFIGURE_OPTSavailable for non-autotools packages?
Yes, have a look at package/Makefile.in. TARGET_CONFIGURE_OPTS is simply a variable containing CC=.. CFLAGS=.. LD=.. that we also use to pass to configure.
Quoted 7 lines
Quoted 4 lines
Looking at the
Makefile, I see it tries to figure out the version by calling git. When this is built in a buildroot git checkout (and inputevent is gotten from a github tarball) this will most likely use version info from the Buildroot git repo which doesn't sound correct.Now that is a true problem.
I'll rework.
Thanks!
Signature · 2 lines
Venlig hilsen, Peter Korsgaard