mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] beep: new package
@ 2017-10-09 17:02 Bastian Stender
  2017-10-09 21:13 ` Alexander Dahl
  2017-10-10  7:22 ` Michael Olbrich
  0 siblings, 2 replies; 4+ messages in thread
From: Bastian Stender @ 2017-10-09 17:02 UTC (permalink / raw)
  To: ptxdist; +Cc: Bastian Stender

Extended beep utility that does pretty much the same as busybox' beep,
but allows reading stdin and specifying an alternative console device.

This is especially useful to test the kernel drivers "pwm-beeper" and
"gpio-beeper". To do so enable CONFIG_INPUT_EVDEV and specify the input
device with -e.

Signed-off-by: Bastian Stender <bst@pengutronix.de>
---
 patches/beep-1.3/0001-Makefile-fix.patch | 33 +++++++++++++++++++
 rules/beep.in                            |  7 ++++
 rules/beep.make                          | 56 ++++++++++++++++++++++++++++++++
 3 files changed, 96 insertions(+)
 create mode 100644 patches/beep-1.3/0001-Makefile-fix.patch
 create mode 100644 rules/beep.in
 create mode 100644 rules/beep.make

diff --git a/patches/beep-1.3/0001-Makefile-fix.patch b/patches/beep-1.3/0001-Makefile-fix.patch
new file mode 100644
index 000000000..5802a29ab
--- /dev/null
+++ b/patches/beep-1.3/0001-Makefile-fix.patch
@@ -0,0 +1,33 @@
+From: Bastian Stender <bst@pengutronix.de>
+Date: Mon, 9 Oct 2017 18:30:48 +0200
+Subject: [PATCH] Makefile: fix
+
+Signed-off-by: Bastian Stender <bst@pengutronix.de>
+---
+ Makefile | 11 ++++-------
+ 1 file changed, 4 insertions(+), 7 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index cc359c4843e4..fa8a7e3fde04 100644
+--- a/Makefile
++++ b/Makefile
+@@ -5,15 +5,12 @@ INSTALL_DIR=/usr/bin
+ MAN_FILE=beep.1.gz
+ MAN_DIR=/usr/man/man1
+ 
+-default : beep
++all :
++	${CC} ${FLAGS} -o ${EXEC_NAME} beep.c
+ 
+ clean : 
+ 	rm ${EXEC_NAME}
+ 
+-beep : beep.c
+-	${CC} ${FLAGS} -o ${EXEC_NAME} beep.c
+-
+ install : 
+-	cp ${EXEC_NAME} ${INSTALL_DIR}
+-	# rm -f /usr/man/man1/beep.1.bz2
+-	cp ${MAN_FILE} ${MAN_DIR}
++	cp ${EXEC_NAME} ${DESTDIR}/${INSTALL_DIR}
++	cp ${MAN_FILE} ${DESTDIR}/${MAN_DIR}
diff --git a/rules/beep.in b/rules/beep.in
new file mode 100644
index 000000000..4b41c613a
--- /dev/null
+++ b/rules/beep.in
@@ -0,0 +1,7 @@
+## SECTION=project_specific
+
+config BEEP
+	tristate
+	prompt "beep"
+	help
+	  Extended beep utility
diff --git a/rules/beep.make b/rules/beep.make
new file mode 100644
index 000000000..74931ca4c
--- /dev/null
+++ b/rules/beep.make
@@ -0,0 +1,56 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2017 by Johnathan Nightingale <johnath@johnath.com>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_BEEP) += beep
+
+#
+# Paths and names
+#
+BEEP_VERSION	:= 1.3
+BEEP_MD5	:= 49c340ceb95dbda3f97b2daafac7892a
+BEEP		:= beep-$(BEEP_VERSION)
+BEEP_SUFFIX	:= tar.gz
+BEEP_URL	:= http://www.johnath.com/beep/$(BEEP).$(BEEP_SUFFIX)
+BEEP_SOURCE	:= $(SRCDIR)/$(BEEP).$(BEEP_SUFFIX)
+BEEP_DIR	:= $(BUILDDIR)/$(BEEP)
+BEEP_LICENSE	:= GPL-2.0
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+BEEP_CONF_TOOL	:= NO
+BEEP_PATH	:= PATH=$(CROSS_PATH)
+BEEP_ENV	:= $(CROSS_ENV)
+BEEP_MAKEVARS	:= CC=$(CROSS_CC)
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/beep.targetinstall:
+	@$(call targetinfo)
+
+	@$(call install_init, beep)
+	@$(call install_fixup, beep,PRIORITY,optional)
+	@$(call install_fixup, beep,SECTION,base)
+	@$(call install_fixup, beep,AUTHOR,"Johnathan Nightingale <johnath@johnath.com>")
+	@$(call install_fixup, beep,DESCRIPTION,missing)
+
+	@$(call install_copy, beep, 0, 0, 0755, -, /usr/bin/beep)
+
+	@$(call install_finish, beep)
+
+	@$(call touch)
+
+# vim: syntax=make
-- 
2.11.0


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ptxdist] [PATCH] beep: new package
  2017-10-09 17:02 [ptxdist] [PATCH] beep: new package Bastian Stender
@ 2017-10-09 21:13 ` Alexander Dahl
  2017-10-10  7:22 ` Michael Olbrich
  1 sibling, 0 replies; 4+ messages in thread
From: Alexander Dahl @ 2017-10-09 21:13 UTC (permalink / raw)
  To: ptxdist; +Cc: Bastian Stender


[-- Attachment #1.1: Type: text/plain, Size: 973 bytes --]

Hei hei,

On Mon, Oct 09, 2017 at 07:02:36PM +0200, Bastian Stender wrote:
> diff --git a/rules/beep.make b/rules/beep.make
> new file mode 100644
> index 000000000..74931ca4c
> --- /dev/null
> +++ b/rules/beep.make
> @@ -0,0 +1,56 @@
> +# -*-makefile-*-
> +#
> +# Copyright (C) 2017 by Johnathan Nightingale <johnath@johnath.com>

[…]

> +	@$(call install_fixup, beep,AUTHOR,"Johnathan Nightingale <johnath@johnath.com>")

On all the other ptxdist packages I saw, this was the package author,
not the upstream author. Is this supposed to be the package author aka
the one responsible for this rules/*.make file or the author of the
software packaged?

Greets
Alex

-- 
»With the first link, the chain is forged. The first speech censured, 
the first thought forbidden, the first freedom denied, chains us all 
irrevocably.« (Jean-Luc Picard, quoting Judge Aaron Satie)
*** GnuPG-FP: C28E E6B9 0263 95CF 8FAF  08FA 34AD CD00 7221 5CC6 ***

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 91 bytes --]

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ptxdist] [PATCH] beep: new package
  2017-10-09 17:02 [ptxdist] [PATCH] beep: new package Bastian Stender
  2017-10-09 21:13 ` Alexander Dahl
@ 2017-10-10  7:22 ` Michael Olbrich
  2017-10-10 10:05   ` Bastian Stender
  1 sibling, 1 reply; 4+ messages in thread
From: Michael Olbrich @ 2017-10-10  7:22 UTC (permalink / raw)
  To: ptxdist

On Mon, Oct 09, 2017 at 07:02:36PM +0200, Bastian Stender wrote:
> Extended beep utility that does pretty much the same as busybox' beep,
> but allows reading stdin and specifying an alternative console device.
> 
> This is especially useful to test the kernel drivers "pwm-beeper" and
> "gpio-beeper". To do so enable CONFIG_INPUT_EVDEV and specify the input
> device with -e.
> 
> Signed-off-by: Bastian Stender <bst@pengutronix.de>
> ---
>  patches/beep-1.3/0001-Makefile-fix.patch | 33 +++++++++++++++++++
>  rules/beep.in                            |  7 ++++
>  rules/beep.make                          | 56 ++++++++++++++++++++++++++++++++
>  3 files changed, 96 insertions(+)
>  create mode 100644 patches/beep-1.3/0001-Makefile-fix.patch
>  create mode 100644 rules/beep.in
>  create mode 100644 rules/beep.make
> 
> diff --git a/patches/beep-1.3/0001-Makefile-fix.patch b/patches/beep-1.3/0001-Makefile-fix.patch
> new file mode 100644
> index 000000000..5802a29ab
> --- /dev/null
> +++ b/patches/beep-1.3/0001-Makefile-fix.patch
> @@ -0,0 +1,33 @@
> +From: Bastian Stender <bst@pengutronix.de>
> +Date: Mon, 9 Oct 2017 18:30:48 +0200
> +Subject: [PATCH] Makefile: fix
> +
> +Signed-off-by: Bastian Stender <bst@pengutronix.de>
> +---
> + Makefile | 11 ++++-------
> + 1 file changed, 4 insertions(+), 7 deletions(-)
> +
> +diff --git a/Makefile b/Makefile
> +index cc359c4843e4..fa8a7e3fde04 100644
> +--- a/Makefile
> ++++ b/Makefile
> +@@ -5,15 +5,12 @@ INSTALL_DIR=/usr/bin
> + MAN_FILE=beep.1.gz
> + MAN_DIR=/usr/man/man1
> + 
> +-default : beep
> ++all :
> ++	${CC} ${FLAGS} -o ${EXEC_NAME} beep.c
> + 
> + clean : 
> + 	rm ${EXEC_NAME}
> + 
> +-beep : beep.c
> +-	${CC} ${FLAGS} -o ${EXEC_NAME} beep.c
> +-

Why is this necessary? 'make' without target argument builds the first
target, so that should do what we need.

> + install : 
> +-	cp ${EXEC_NAME} ${INSTALL_DIR}
> +-	# rm -f /usr/man/man1/beep.1.bz2
> +-	cp ${MAN_FILE} ${MAN_DIR}
> ++	cp ${EXEC_NAME} ${DESTDIR}/${INSTALL_DIR}
> ++	cp ${MAN_FILE} ${DESTDIR}/${MAN_DIR}

You could just overwrite INSTALL_DIR and MAN_DIR in the arguments, but I
don't care either way.

> diff --git a/rules/beep.in b/rules/beep.in
> new file mode 100644
> index 000000000..4b41c613a
> --- /dev/null
> +++ b/rules/beep.in
> @@ -0,0 +1,7 @@
> +## SECTION=project_specific
> +
> +config BEEP
> +	tristate
> +	prompt "beep"
> +	help
> +	  Extended beep utility
> diff --git a/rules/beep.make b/rules/beep.make
> new file mode 100644
> index 000000000..74931ca4c
> --- /dev/null
> +++ b/rules/beep.make
> @@ -0,0 +1,56 @@
> +# -*-makefile-*-
> +#
> +# Copyright (C) 2017 by Johnathan Nightingale <johnath@johnath.com>
> +#
> +# See CREDITS for details about who has contributed to this project.
> +#
> +# For further information about the PTXdist project and license conditions
> +# see the README file.
> +#
> +
> +#
> +# We provide this package
> +#
> +PACKAGES-$(PTXCONF_BEEP) += beep
> +
> +#
> +# Paths and names
> +#
> +BEEP_VERSION	:= 1.3
> +BEEP_MD5	:= 49c340ceb95dbda3f97b2daafac7892a
> +BEEP		:= beep-$(BEEP_VERSION)
> +BEEP_SUFFIX	:= tar.gz
> +BEEP_URL	:= http://www.johnath.com/beep/$(BEEP).$(BEEP_SUFFIX)
> +BEEP_SOURCE	:= $(SRCDIR)/$(BEEP).$(BEEP_SUFFIX)
> +BEEP_DIR	:= $(BUILDDIR)/$(BEEP)
> +BEEP_LICENSE	:= GPL-2.0
> +
> +# ----------------------------------------------------------------------------
> +# Prepare
> +# ----------------------------------------------------------------------------
> +
> +BEEP_CONF_TOOL	:= NO

> +BEEP_PATH	:= PATH=$(CROSS_PATH)
> +BEEP_ENV	:= $(CROSS_ENV)

not needed

> +BEEP_MAKEVARS	:= CC=$(CROSS_CC)

<PKG>_MAKEVARS is deprecated use <PKG>_MAKE_OPT / <PKG>_INSTALL_OPT

> +
> +# ----------------------------------------------------------------------------
> +# Target-Install
> +# ----------------------------------------------------------------------------
> +
> +$(STATEDIR)/beep.targetinstall:
> +	@$(call targetinfo)
> +
> +	@$(call install_init, beep)
> +	@$(call install_fixup, beep,PRIORITY,optional)
> +	@$(call install_fixup, beep,SECTION,base)
> +	@$(call install_fixup, beep,AUTHOR,"Johnathan Nightingale <johnath@johnath.com>")

As Alexander said, you are the ptxdist package author.


Michael

> +	@$(call install_fixup, beep,DESCRIPTION,missing)
> +
> +	@$(call install_copy, beep, 0, 0, 0755, -, /usr/bin/beep)
> +
> +	@$(call install_finish, beep)
> +
> +	@$(call touch)
> +
> +# vim: syntax=make
> -- 
> 2.11.0
> 
> 
> _______________________________________________
> ptxdist mailing list
> ptxdist@pengutronix.de

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ptxdist] [PATCH] beep: new package
  2017-10-10  7:22 ` Michael Olbrich
@ 2017-10-10 10:05   ` Bastian Stender
  0 siblings, 0 replies; 4+ messages in thread
From: Bastian Stender @ 2017-10-10 10:05 UTC (permalink / raw)
  To: ptxdist

On 10/10/2017 09:22 AM, Michael Olbrich wrote:
> On Mon, Oct 09, 2017 at 07:02:36PM +0200, Bastian Stender wrote:
>> Extended beep utility that does pretty much the same as busybox' beep,
>> but allows reading stdin and specifying an alternative console device.
>>
>> This is especially useful to test the kernel drivers "pwm-beeper" and
>> "gpio-beeper". To do so enable CONFIG_INPUT_EVDEV and specify the input
>> device with -e.
>>
>> Signed-off-by: Bastian Stender <bst@pengutronix.de>
>> ---
>>   patches/beep-1.3/0001-Makefile-fix.patch | 33 +++++++++++++++++++
>>   rules/beep.in                            |  7 ++++
>>   rules/beep.make                          | 56 ++++++++++++++++++++++++++++++++
>>   3 files changed, 96 insertions(+)
>>   create mode 100644 patches/beep-1.3/0001-Makefile-fix.patch
>>   create mode 100644 rules/beep.in
>>   create mode 100644 rules/beep.make
>>
>> diff --git a/patches/beep-1.3/0001-Makefile-fix.patch b/patches/beep-1.3/0001-Makefile-fix.patch
>> new file mode 100644
>> index 000000000..5802a29ab
>> --- /dev/null
>> +++ b/patches/beep-1.3/0001-Makefile-fix.patch
>> @@ -0,0 +1,33 @@
>> +From: Bastian Stender <bst@pengutronix.de>
>> +Date: Mon, 9 Oct 2017 18:30:48 +0200
>> +Subject: [PATCH] Makefile: fix
>> +
>> +Signed-off-by: Bastian Stender <bst@pengutronix.de>
>> +---
>> + Makefile | 11 ++++-------
>> + 1 file changed, 4 insertions(+), 7 deletions(-)
>> +
>> +diff --git a/Makefile b/Makefile
>> +index cc359c4843e4..fa8a7e3fde04 100644
>> +--- a/Makefile
>> ++++ b/Makefile
>> +@@ -5,15 +5,12 @@ INSTALL_DIR=/usr/bin
>> + MAN_FILE=beep.1.gz
>> + MAN_DIR=/usr/man/man1
>> +
>> +-default : beep
>> ++all :
>> ++	${CC} ${FLAGS} -o ${EXEC_NAME} beep.c
>> +
>> + clean :
>> + 	rm ${EXEC_NAME}
>> +
>> +-beep : beep.c
>> +-	${CC} ${FLAGS} -o ${EXEC_NAME} beep.c
>> +-
> 
> Why is this necessary? 'make' without target argument builds the first
> target, so that should do what we need.
> 
>> + install :
>> +-	cp ${EXEC_NAME} ${INSTALL_DIR}
>> +-	# rm -f /usr/man/man1/beep.1.bz2
>> +-	cp ${MAN_FILE} ${MAN_DIR}
>> ++	cp ${EXEC_NAME} ${DESTDIR}/${INSTALL_DIR}
>> ++	cp ${MAN_FILE} ${DESTDIR}/${MAN_DIR}
> 
> You could just overwrite INSTALL_DIR and MAN_DIR in the arguments, but I
> don't care either way.
> 
>> diff --git a/rules/beep.in b/rules/beep.in
>> new file mode 100644
>> index 000000000..4b41c613a
>> --- /dev/null
>> +++ b/rules/beep.in
>> @@ -0,0 +1,7 @@
>> +## SECTION=project_specific
>> +
>> +config BEEP
>> +	tristate
>> +	prompt "beep"
>> +	help
>> +	  Extended beep utility
>> diff --git a/rules/beep.make b/rules/beep.make
>> new file mode 100644
>> index 000000000..74931ca4c
>> --- /dev/null
>> +++ b/rules/beep.make
>> @@ -0,0 +1,56 @@
>> +# -*-makefile-*-
>> +#
>> +# Copyright (C) 2017 by Johnathan Nightingale <johnath@johnath.com>
>> +#
>> +# See CREDITS for details about who has contributed to this project.
>> +#
>> +# For further information about the PTXdist project and license conditions
>> +# see the README file.
>> +#
>> +
>> +#
>> +# We provide this package
>> +#
>> +PACKAGES-$(PTXCONF_BEEP) += beep
>> +
>> +#
>> +# Paths and names
>> +#
>> +BEEP_VERSION	:= 1.3
>> +BEEP_MD5	:= 49c340ceb95dbda3f97b2daafac7892a
>> +BEEP		:= beep-$(BEEP_VERSION)
>> +BEEP_SUFFIX	:= tar.gz
>> +BEEP_URL	:= http://www.johnath.com/beep/$(BEEP).$(BEEP_SUFFIX)
>> +BEEP_SOURCE	:= $(SRCDIR)/$(BEEP).$(BEEP_SUFFIX)
>> +BEEP_DIR	:= $(BUILDDIR)/$(BEEP)
>> +BEEP_LICENSE	:= GPL-2.0
>> +
>> +# ----------------------------------------------------------------------------
>> +# Prepare
>> +# ----------------------------------------------------------------------------
>> +
>> +BEEP_CONF_TOOL	:= NO
> 
>> +BEEP_PATH	:= PATH=$(CROSS_PATH)
>> +BEEP_ENV	:= $(CROSS_ENV)
> 
> not needed
> 
>> +BEEP_MAKEVARS	:= CC=$(CROSS_CC)
> 
> <PKG>_MAKEVARS is deprecated use <PKG>_MAKE_OPT / <PKG>_INSTALL_OPT
> 
>> +
>> +# ----------------------------------------------------------------------------
>> +# Target-Install
>> +# ----------------------------------------------------------------------------
>> +
>> +$(STATEDIR)/beep.targetinstall:
>> +	@$(call targetinfo)
>> +
>> +	@$(call install_init, beep)
>> +	@$(call install_fixup, beep,PRIORITY,optional)
>> +	@$(call install_fixup, beep,SECTION,base)
>> +	@$(call install_fixup, beep,AUTHOR,"Johnathan Nightingale <johnath@johnath.com>")
> 
> As Alexander said, you are the ptxdist package author.
> 
> 
> Michael
> 
>> +	@$(call install_fixup, beep,DESCRIPTION,missing)
>> +
>> +	@$(call install_copy, beep, 0, 0, 0755, -, /usr/bin/beep)
>> +
>> +	@$(call install_finish, beep)
>> +
>> +	@$(call touch)
>> +
>> +# vim: syntax=make
>> -- 
>> 2.11.0

Yes, all valid points. It must have been too late yesterday, I'll send v2.

Bastian

-- 
Pengutronix e.K.
Industrial Linux Solutions
http://www.pengutronix.de/
Peiner Str. 6-8, 31137 Hildesheim, Germany
Amtsgericht Hildesheim, HRA 2686

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-10-10 10:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-09 17:02 [ptxdist] [PATCH] beep: new package Bastian Stender
2017-10-09 21:13 ` Alexander Dahl
2017-10-10  7:22 ` Michael Olbrich
2017-10-10 10:05   ` Bastian Stender

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox