Patchwork ZNC: new package

login
register
mail settings
Submitter Cédric Chépied
Date Jan. 4, 2014, 10:59 p.m.
Message ID <1388876370-3441-1-git-send-email-cedric.chepied@gmail.com>
Download mbox | patch
Permalink /patch/306896/
State Superseded
Headers show

Comments

Cédric Chépied - Jan. 4, 2014, 10:59 p.m.
ZNC is an IRC bouncer.
It is available in menu "Networking applications"
---
 package/Config.in     |  1 +
 package/znc/Config.in |  6 ++++++
 package/znc/znc.mk    | 22 ++++++++++++++++++++++
 3 files changed, 29 insertions(+)
 create mode 100644 package/znc/Config.in
 create mode 100644 package/znc/znc.mk
Peter Korsgaard - Jan. 5, 2014, 10:07 a.m.
>>>>> "Cédric" == Cédric Chépied <cedric.chepied@gmail.com> writes:

 > ZNC is an IRC bouncer.
 > It is available in menu "Networking applications"
 > ---
 >  package/Config.in     |  1 +
 >  package/znc/Config.in |  6 ++++++
 >  package/znc/znc.mk    | 22 ++++++++++++++++++++++
 >  3 files changed, 29 insertions(+)
 >  create mode 100644 package/znc/Config.in
 >  create mode 100644 package/znc/znc.mk

 > diff --git a/package/Config.in b/package/Config.in
 > index 35de506..925a6bf 100644
 > --- a/package/Config.in
 > +++ b/package/Config.in
 > @@ -936,6 +936,7 @@ source "package/wpa_supplicant/Config.in"
 >  source "package/wvdial/Config.in"
 >  source "package/xinetd/Config.in"
 >  source "package/xl2tp/Config.in"
 > +source "package/znc/Config.in"
 
 >  endmenu
 
 > diff --git a/package/znc/Config.in b/package/znc/Config.in
 > new file mode 100644
 > index 0000000..ef5db26
 > --- /dev/null
 > +++ b/package/znc/Config.in
 > @@ -0,0 +1,6 @@
 > +config BR2_PACKAGE_ZNC
 > +       bool "znc"
 > +       select BR2_PACKAGE_OPENSSL
 > +       select BR2_PACKAGE_PERL
 > +       help
 > +         Advanced IRC bouncer
 > diff --git a/package/znc/znc.mk b/package/znc/znc.mk
 > new file mode 100644
 > index 0000000..59d10f2
 > --- /dev/null
 > +++ b/package/znc/znc.mk
 > @@ -0,0 +1,22 @@
 > +ZNC_VERSION = 1.2
 > +ZNC_SOURCE = znc-$(ZNC_VERSION).tar.gz
 > +ZNC_SITE = http://znc.in/releases
 > +ACL_INSTALL_STAGING = YES

Why does it need to install into staging? It's a program and not a
library, right?


 > +
 > +# While the configuration system uses autoconf, the Makefiles are
 > +# hand-written and do not use automake. Therefore, we have to hack
 > +# around their deficiencies by passing installation paths.
 > +ACL_INSTALL_STAGING_OPT = 			\
 > +	prefix=$(STAGING_DIR)/usr 		\
 > +	exec_prefix=$(STAGING_DIR)/usr 		\
 > +	PKG_DEVLIB_DIR=$(STAGING_DIR)/usr/lib	\
 > +	install-dev install-lib
 > +
 > +ACL_INSTALL_TARGET_OPT = 			\
 > +	prefix=$(TARGET_DIR)/usr 		\
 > +	exec_prefix=$(TARGET_DIR)/usr 		\
 > +	install install-lib

Out of interest, what does PKG_DEVLIB_DIR do and why don't we pass it
for TARGET?
Cédric Chépied - Jan. 5, 2014, 11:57 a.m.
At Sun, 05 Jan 2014 11:07:47 +0100,
Peter Korsgaard wrote:
> 
> >>>>> "Cédric" == Cédric Chépied <cedric.chepied@gmail.com> writes:
>  > diff --git a/package/znc/znc.mk b/package/znc/znc.mk
>  > new file mode 100644
>  > index 0000000..59d10f2
>  > --- /dev/null
>  > +++ b/package/znc/znc.mk
>  > @@ -0,0 +1,22 @@
>  > +ZNC_VERSION = 1.2
>  > +ZNC_SOURCE = znc-$(ZNC_VERSION).tar.gz
>  > +ZNC_SITE = http://znc.in/releases
>  > +ACL_INSTALL_STAGING = YES
> 
> Why does it need to install into staging? It's a program and not a
> library, right?

It does not. This is a bad copy/paste. I made this patch too quickly. 

> 
> 
>  > +
>  > +# While the configuration system uses autoconf, the Makefiles are
>  > +# hand-written and do not use automake. Therefore, we have to hack
>  > +# around their deficiencies by passing installation paths.
>  > +ACL_INSTALL_STAGING_OPT = 			\
>  > +	prefix=$(STAGING_DIR)/usr 		\
>  > +	exec_prefix=$(STAGING_DIR)/usr 		\
>  > +	PKG_DEVLIB_DIR=$(STAGING_DIR)/usr/lib	\
>  > +	install-dev install-lib
>  > +
>  > +ACL_INSTALL_TARGET_OPT = 			\
>  > +	prefix=$(TARGET_DIR)/usr 		\
>  > +	exec_prefix=$(TARGET_DIR)/usr 		\
>  > +	install install-lib
> 
> Out of interest, what does PKG_DEVLIB_DIR do and why don't we pass it
> for TARGET?


Same remark, I'll fix it and submit a new patch.

Regards,
Thomas Petazzoni - Jan. 28, 2014, 6:52 p.m.
Dear Cédric Chépied,

On Sat,  4 Jan 2014 23:59:30 +0100, Cédric Chépied wrote:
> ZNC is an IRC bouncer.
> It is available in menu "Networking applications"
> ---
>  package/Config.in     |  1 +
>  package/znc/Config.in |  6 ++++++
>  package/znc/znc.mk    | 22 ++++++++++++++++++++++
>  3 files changed, 29 insertions(+)
>  create mode 100644 package/znc/Config.in
>  create mode 100644 package/znc/znc.mk
> 
> diff --git a/package/Config.in b/package/Config.in
> index 35de506..925a6bf 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -936,6 +936,7 @@ source "package/wpa_supplicant/Config.in"
>  source "package/wvdial/Config.in"
>  source "package/xinetd/Config.in"
>  source "package/xl2tp/Config.in"
> +source "package/znc/Config.in"
>  
>  endmenu
>  
> diff --git a/package/znc/Config.in b/package/znc/Config.in
> new file mode 100644
> index 0000000..ef5db26
> --- /dev/null
> +++ b/package/znc/Config.in
> @@ -0,0 +1,6 @@
> +config BR2_PACKAGE_ZNC
> +       bool "znc"
> +       select BR2_PACKAGE_OPENSSL
> +       select BR2_PACKAGE_PERL
> +       help
> +         Advanced IRC bouncer

We generally want the URL of the project here in the help text. See
what we do for all other packages.

Looking at the configure.ac from ZNC, it seems like the OpenSSL and
Perl support is optional, and can be disabled using --disable-openssl
and --disable-perl. It would probably be a good idea to use these to
make these dependencies optional.

Also, your znc.mk should have ZNC_LICENSE and ZNC_LICENSE_FILES
defined. Look at the Buildroot manual for details about these.

Thanks for your contribution!

Thomas
Cédric Chépied - Feb. 9, 2014, 1:39 p.m.
Dear Thomas,

At Tue, 28 Jan 2014 19:52:59 +0100,
Thomas Petazzoni wrote:
> Looking at the configure.ac from ZNC, it seems like the OpenSSL and
> Perl support is optional, and can be disabled using --disable-openssl
> and --disable-perl. It would probably be a good idea to use these to
> make these dependencies optional.

When I try to enable perl, configure fails. It uses the perl executable to
generate LDFLAGS but it does that with "my" executable (/usr/bin/perl) and then
tries to link with /usr/lib/perl5/core_perl/CORE/libperl.so which of course
fails.

For python, configure programs can use ./output/host/usr/bin/python2.7 but I
can't find the same for perl. I only find perl compiled for my target.

How can I fix this?

Regards,
Thomas Petazzoni - March 7, 2014, 10:54 p.m.
Dear Cédric Chépied,

On Sun, 05 Jan 2014 12:57:20 +0100, Cédric Chépied wrote:

> > Out of interest, what does PKG_DEVLIB_DIR do and why don't we pass it
> > for TARGET?
> 
> Same remark, I'll fix it and submit a new patch.

Do you plan on resending an updated version of your ZNC package? You
received some comments on January 5th, but we haven't received a new
version.

This new package would be an appreciated contribution, but if you want
to see it accepted, you should resend regularly new versions that take
into account the review comments made by the other Buildroot developers.

Thanks a lot!

Thomas

Patch

diff --git a/package/Config.in b/package/Config.in
index 35de506..925a6bf 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -936,6 +936,7 @@  source "package/wpa_supplicant/Config.in"
 source "package/wvdial/Config.in"
 source "package/xinetd/Config.in"
 source "package/xl2tp/Config.in"
+source "package/znc/Config.in"
 
 endmenu
 
diff --git a/package/znc/Config.in b/package/znc/Config.in
new file mode 100644
index 0000000..ef5db26
--- /dev/null
+++ b/package/znc/Config.in
@@ -0,0 +1,6 @@ 
+config BR2_PACKAGE_ZNC
+       bool "znc"
+       select BR2_PACKAGE_OPENSSL
+       select BR2_PACKAGE_PERL
+       help
+         Advanced IRC bouncer
diff --git a/package/znc/znc.mk b/package/znc/znc.mk
new file mode 100644
index 0000000..59d10f2
--- /dev/null
+++ b/package/znc/znc.mk
@@ -0,0 +1,22 @@ 
+ZNC_VERSION = 1.2
+ZNC_SOURCE = znc-$(ZNC_VERSION).tar.gz
+ZNC_SITE = http://znc.in/releases
+ACL_INSTALL_STAGING = YES
+
+# While the configuration system uses autoconf, the Makefiles are
+# hand-written and do not use automake. Therefore, we have to hack
+# around their deficiencies by passing installation paths.
+ACL_INSTALL_STAGING_OPT = 			\
+	prefix=$(STAGING_DIR)/usr 		\
+	exec_prefix=$(STAGING_DIR)/usr 		\
+	PKG_DEVLIB_DIR=$(STAGING_DIR)/usr/lib	\
+	install-dev install-lib
+
+ACL_INSTALL_TARGET_OPT = 			\
+	prefix=$(TARGET_DIR)/usr 		\
+	exec_prefix=$(TARGET_DIR)/usr 		\
+	install install-lib
+
+
+$(eval $(autotools-package))
+