mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] ncdu: new package
@ 2016-08-03 12:29 Alexander Dahl
  2016-08-04  6:49 ` Michael Olbrich
  0 siblings, 1 reply; 4+ messages in thread
From: Alexander Dahl @ 2016-08-03 12:29 UTC (permalink / raw)
  To: ptxdist

Signed-off-by: Alexander Dahl <post@lespocky.de>
---
 rules/ncdu.in   | 10 ++++++++++
 rules/ncdu.make | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 70 insertions(+)
 create mode 100644 rules/ncdu.in
 create mode 100644 rules/ncdu.make

diff --git a/rules/ncdu.in b/rules/ncdu.in
new file mode 100644
index 0000000..fa0db89
--- /dev/null
+++ b/rules/ncdu.in
@@ -0,0 +1,10 @@
+## SECTION=shell_and_console
+
+config NCDU
+	tristate
+	select NCURSES
+	prompt "ncdu"
+	help
+	  Disk usage analyzer with ncurses interface.
+
+# vim: ft=kconfig noet tw=72
diff --git a/rules/ncdu.make b/rules/ncdu.make
new file mode 100644
index 0000000..c710117
--- /dev/null
+++ b/rules/ncdu.make
@@ -0,0 +1,60 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2016 by Alexander Dahl <post@lespocky.de>
+#
+# 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_NCDU) += ncdu
+
+#
+# Paths and names
+#
+NCDU_VERSION	:= 1.11
+NCDU_MD5	:= 9e44240a5356b029f05f0e70a63c4d12
+NCDU		:= ncdu-$(NCDU_VERSION)
+NCDU_SUFFIX	:= tar.gz
+NCDU_URL	:= https://dev.yorhel.nl/download/$(NCDU).$(NCDU_SUFFIX)
+NCDU_SOURCE	:= $(SRCDIR)/$(NCDU).$(NCDU_SUFFIX)
+NCDU_DIR	:= $(BUILDDIR)/$(NCDU)
+NCDU_LICENSE	:= MIT
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+NCDU_CONF_TOOL	:= autoconf
+NCDU_CONF_OPT	:= $(CROSS_AUTOCONF_USR)
+
+ifdef PTXCONF_NCURSES_WIDE_CHAR
+NCDU_CONF_OPT	+= --with-ncursesw
+else
+NCDU_CONF_OPT	+= --with-ncurses
+endif
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/ncdu.targetinstall:
+	@$(call targetinfo)
+
+	@$(call install_init, ncdu)
+	@$(call install_fixup, ncdu,PRIORITY,optional)
+	@$(call install_fixup, ncdu,SECTION,base)
+	@$(call install_fixup, ncdu,AUTHOR,"Alexander Dahl <post@lespocky.de>")
+	@$(call install_fixup, ncdu,DESCRIPTION,missing)
+
+	@$(call install_copy, ncdu, 0, 0, 0755, -, /usr/bin/ncdu)
+
+	@$(call install_finish, ncdu)
+
+	@$(call touch)
+
+# vim: ft=make noet
-- 
2.1.4


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] [PATCH] ncdu: new package
  2016-08-03 12:29 [ptxdist] [PATCH] ncdu: new package Alexander Dahl
@ 2016-08-04  6:49 ` Michael Olbrich
  2016-08-04  7:57   ` Alexander Dahl
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Olbrich @ 2016-08-04  6:49 UTC (permalink / raw)
  To: ptxdist

On Wed, Aug 03, 2016 at 02:29:51PM +0200, Alexander Dahl wrote:
> Signed-off-by: Alexander Dahl <post@lespocky.de>
> ---
>  rules/ncdu.in   | 10 ++++++++++
>  rules/ncdu.make | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 70 insertions(+)
>  create mode 100644 rules/ncdu.in
>  create mode 100644 rules/ncdu.make
> 
> diff --git a/rules/ncdu.in b/rules/ncdu.in
> new file mode 100644
> index 0000000..fa0db89
> --- /dev/null
> +++ b/rules/ncdu.in
> @@ -0,0 +1,10 @@
> +## SECTION=shell_and_console
> +
> +config NCDU
> +	tristate
> +	select NCURSES
> +	prompt "ncdu"
> +	help
> +	  Disk usage analyzer with ncurses interface.
> +
> +# vim: ft=kconfig noet tw=72
> diff --git a/rules/ncdu.make b/rules/ncdu.make
> new file mode 100644
> index 0000000..c710117
> --- /dev/null
> +++ b/rules/ncdu.make
> @@ -0,0 +1,60 @@
> +# -*-makefile-*-
> +#
> +# Copyright (C) 2016 by Alexander Dahl <post@lespocky.de>
> +#
> +# 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_NCDU) += ncdu
> +
> +#
> +# Paths and names
> +#
> +NCDU_VERSION	:= 1.11
> +NCDU_MD5	:= 9e44240a5356b029f05f0e70a63c4d12
> +NCDU		:= ncdu-$(NCDU_VERSION)
> +NCDU_SUFFIX	:= tar.gz
> +NCDU_URL	:= https://dev.yorhel.nl/download/$(NCDU).$(NCDU_SUFFIX)
> +NCDU_SOURCE	:= $(SRCDIR)/$(NCDU).$(NCDU_SUFFIX)
> +NCDU_DIR	:= $(BUILDDIR)/$(NCDU)
> +NCDU_LICENSE	:= MIT
> +
> +# ----------------------------------------------------------------------------
> +# Prepare
> +# ----------------------------------------------------------------------------
> +
> +NCDU_CONF_TOOL	:= autoconf
> +NCDU_CONF_OPT	:= $(CROSS_AUTOCONF_USR)

NCDU_CONF_OPT	:= \
	$(CROSS_AUTOCONF_USR) \
	...

Are you sure there are no other options?

> +
> +ifdef PTXCONF_NCURSES_WIDE_CHAR

Don't use symbols from other packages. PTXdist won't know when it needs to
rebuild your package when the option changes. Add a local symbol like this:

config NCDU_NCURSESW
	bool
	default NCURSES_WIDE_CHAR

> +NCDU_CONF_OPT	+= --with-ncursesw

Use ptx/wwo for this.

> +else
> +NCDU_CONF_OPT	+= --with-ncurses

This needs a ptx/wow. That does not exist yet, but it's easy to add.
It should be defined in rules/pre/000-option-disabled.make with ptx/wwo
just with reversed arguments, just like ptx/endis vs. ptx/disen.

Michael

> +endif


> +
> +# ----------------------------------------------------------------------------
> +# Target-Install
> +# ----------------------------------------------------------------------------
> +
> +$(STATEDIR)/ncdu.targetinstall:
> +	@$(call targetinfo)
> +
> +	@$(call install_init, ncdu)
> +	@$(call install_fixup, ncdu,PRIORITY,optional)
> +	@$(call install_fixup, ncdu,SECTION,base)
> +	@$(call install_fixup, ncdu,AUTHOR,"Alexander Dahl <post@lespocky.de>")
> +	@$(call install_fixup, ncdu,DESCRIPTION,missing)
> +
> +	@$(call install_copy, ncdu, 0, 0, 0755, -, /usr/bin/ncdu)
> +
> +	@$(call install_finish, ncdu)
> +
> +	@$(call touch)
> +
> +# vim: ft=make noet
> -- 
> 2.1.4
> 
> 
> _______________________________________________
> 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] ncdu: new package
  2016-08-04  6:49 ` Michael Olbrich
@ 2016-08-04  7:57   ` Alexander Dahl
  2016-08-05 10:15     ` Michael Olbrich
  0 siblings, 1 reply; 4+ messages in thread
From: Alexander Dahl @ 2016-08-04  7:57 UTC (permalink / raw)
  To: ptxdist

Hello Michael,

Am 2016-08-04 08:49, schrieb Michael Olbrich:
> NCDU_CONF_OPT	:= \
> 	$(CROSS_AUTOCONF_USR) \
> 	...
> 
> Are you sure there are no other options?

Yes. This tool just needs ncurses in some form, this is the part of
./configure with all the options:


Optional Packages:
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  --with-ncurses          compile/link with ncurses library
  --with-ncursesw         compile/link with wide-char ncurses library
                          [default]
  --with-shell            used interpreter as default shell (default is
                          /bin/sh)

>> +ifdef PTXCONF_NCURSES_WIDE_CHAR
> 
> Don't use symbols from other packages. PTXdist won't know when it needs to
> rebuild your package when the option changes. 

Well, someone should go fix alsa-utils then. ;-)

> Add a local symbol like this:
> 
> config NCDU_NCURSESW
> 	bool
> 	default NCURSES_WIDE_CHAR
> 
>> +NCDU_CONF_OPT	+= --with-ncursesw
> 
> Use ptx/wwo for this.
> 
>> +else
>> +NCDU_CONF_OPT	+= --with-ncurses

Maybe I didn't understand this ncurses vs. ncursesw thing correctly yet.
Isn't it always one xor the other, or are both at the same time
possible?

> This needs a ptx/wow. That does not exist yet, but it's easy to add.
> It should be defined in rules/pre/000-option-disabled.make with ptx/wwo
> just with reversed arguments, just like ptx/endis vs. ptx/disen.

That's easy, I would make a separate patch for that.

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 ***

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] [PATCH] ncdu: new package
  2016-08-04  7:57   ` Alexander Dahl
@ 2016-08-05 10:15     ` Michael Olbrich
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Olbrich @ 2016-08-05 10:15 UTC (permalink / raw)
  To: ptxdist

On Thu, Aug 04, 2016 at 09:57:57AM +0200, Alexander Dahl wrote:
> Am 2016-08-04 08:49, schrieb Michael Olbrich:
> > NCDU_CONF_OPT	:= \
> > 	$(CROSS_AUTOCONF_USR) \
> > 	...
> > 
> > Are you sure there are no other options?
> 
> Yes. This tool just needs ncurses in some form, this is the part of
> ./configure with all the options:
> 
> 
> Optional Packages:
>   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
>   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
>   --with-ncurses          compile/link with ncurses library
>   --with-ncursesw         compile/link with wide-char ncurses library
>                           [default]
>   --with-shell            used interpreter as default shell (default is
>                           /bin/sh)

ok.

> >> +ifdef PTXCONF_NCURSES_WIDE_CHAR
> > 
> > Don't use symbols from other packages. PTXdist won't know when it needs to
> > rebuild your package when the option changes. 
> 
> Well, someone should go fix alsa-utils then. ;-)

Indeed.

> > Add a local symbol like this:
> > 
> > config NCDU_NCURSESW
> > 	bool
> > 	default NCURSES_WIDE_CHAR
> > 
> >> +NCDU_CONF_OPT	+= --with-ncursesw
> > 
> > Use ptx/wwo for this.
> > 
> >> +else
> >> +NCDU_CONF_OPT	+= --with-ncurses
> 
> Maybe I didn't understand this ncurses vs. ncursesw thing correctly yet.
> Isn't it always one xor the other, or are both at the same time
> possible?

I looked at the configure.ac and it's broken :-/. Using --without-ncurses
will still enable it... So use this:

	--with-$(call ptx/ifdef,PTXCONF_NCDU_NCURSESW,ncursesw,ncurses)

> > This needs a ptx/wow. That does not exist yet, but it's easy to add.
> > It should be defined in rules/pre/000-option-disabled.make with ptx/wwo
> > just with reversed arguments, just like ptx/endis vs. ptx/disen.
> 
> That's easy, I would make a separate patch for that.

I would still appreciate such a patch, even if it's not needed for this.

Michael

-- 
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

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

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-03 12:29 [ptxdist] [PATCH] ncdu: new package Alexander Dahl
2016-08-04  6:49 ` Michael Olbrich
2016-08-04  7:57   ` Alexander Dahl
2016-08-05 10:15     ` Michael Olbrich

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