Patchwork [06/51] package/usbredir: new package

login
register
mail settings
Submitter Yann E. MORIN
Date Nov. 28, 2012, 11:54 p.m.
Message ID <1354146890-27380-7-git-send-email-yann.morin.1998@free.fr>
Download mbox | patch
Permalink /patch/202584/
State Changes Requested
Headers show

Comments

Yann E. MORIN - Nov. 28, 2012, 11:54 p.m.
Cc: Arnout Vandecappelle <arnout@mind.be>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
 package/Config.in            |    1 +
 package/usbredir/Config.in   |   28 ++++++++++++++++++++++++++++
 package/usbredir/usbredir.mk |   31 +++++++++++++++++++++++++++++++
 3 files changed, 60 insertions(+), 0 deletions(-)
 create mode 100644 package/usbredir/Config.in
 create mode 100644 package/usbredir/usbredir.mk
Thomas Petazzoni - Nov. 29, 2012, 8:42 a.m.
Dear Yann E. MORIN,

On Thu, 29 Nov 2012 00:54:05 +0100, Yann E. MORIN wrote:

> +comment "usbredir requires libusb"
> +	depends on !BR2_PACKAGE_LIBUSB

Hum, why a "depends on" and not a "select", like we normally do for
libraries? libusb is not a "big" thing, so I'd say it should be
automatically selected.

> diff --git a/package/usbredir/usbredir.mk b/package/usbredir/usbredir.mk
> new file mode 100644
> index 0000000..9f6c011
> --- /dev/null
> +++ b/package/usbredir/usbredir.mk
> @@ -0,0 +1,31 @@
> +#############################################################
> +#
> +# usbredir
> +#
> +#############################################################
> +
> +USBREDIR_VERSION         = 0.4.3
> +USBREDIR_SOURCE          = usbredir-$(USBREDIR_VERSION).tar.bz2
> +USBREDIR_SITE            = http://spice-space.org/download/usbredir
> +USBREDIR_LICENSE         = LGPLv2.1+

Maybe:

USBREDIR_LICENSE         = LGPLv2.1+ (library)

> +USBREDIR_LICENSE_FILES   = COPYING.LIB
> +USBREDIR_INSTALL_STAGING = YES
> +USBREDIR_DEPENDENCIES    = libusb
> +
> +USBREDIR_DEPENDENCIES    += host-pkgconf
> +
> +ifeq ($(BR2_PACKAGE_USBREDIR_SERVER),y)
> +
> +USBREDIR_LICENSE         += GPLv2+

USBREDIR_LICENSE         += , GPLv2+ (server)

Or something equivalent, as per the conclusion of the Buildroot
Developer Days.

Best regards,

Thomas
Alain Mouflet - Nov. 29, 2012, 8:50 a.m.
Hello,
I'm trying to add classPath and Jamvm to build root.
I've got the fixjava.patch of D.Smyth then I can compile jamvm but... on 
my rootfs, I haven't the /usr/share/classpath/ directory...

What's happens ?
Thank a lot,
Alain
Thomas Petazzoni - Nov. 29, 2012, 1:10 p.m.
Dear Alain Mouflet,

First of all, please don't use an existing message of the list when
starting a new thread: you break discussion threads.

On Thu, 29 Nov 2012 09:50:31 +0100, Alain Mouflet wrote:

> I'm trying to add classPath and Jamvm to build root.
> I've got the fixjava.patch of D.Smyth then I can compile jamvm but... on 
> my rootfs, I haven't the /usr/share/classpath/ directory...

We used to have packages for jamvm and classpath in Buildroot, but
nobody was maintaining/updating them, so we removed them. You can still
find them in the Git history of the project, though.

Regarding your specific problem, it's impossible to help you: you don't
even give the modifications you've made to Buildroot, nor your
Buildroot configuration. There's no way we can help you if you don't
provide all the details needed for us to reproduce the situation you're
seeing.

See http://www.catb.org/esr/faqs/smart-questions.html#beprecise

Best regards,

Thomas
Yann E. MORIN - Nov. 30, 2012, 4:48 p.m.
Thomas, All,

On Thursday 29 November 2012 Thomas Petazzoni wrote:
> On Thu, 29 Nov 2012 00:54:05 +0100, Yann E. MORIN wrote:
> > +comment "usbredir requires libusb"
> > +	depends on !BR2_PACKAGE_LIBUSB
> 
> Hum, why a "depends on" and not a "select", like we normally do for
> libraries? libusb is not a "big" thing, so I'd say it should be
> automatically selected.

Because libusb depends on THREADS, and I do not want to play the ugly
game of inheriting dependencies of my own dependencies.
Hence "depends on" rather than "select".

> > diff --git a/package/usbredir/usbredir.mk b/package/usbredir/usbredir.mk
> > new file mode 100644
> > index 0000000..9f6c011
> > --- /dev/null
> > +++ b/package/usbredir/usbredir.mk
[--SNIP==]
> > +USBREDIR_LICENSE         = LGPLv2.1+
> 
> Maybe:
> USBREDIR_LICENSE         = LGPLv2.1+ (library)

Yep.

Regards,
Yann E. MORIN.

Patch

diff --git a/package/Config.in b/package/Config.in
index 9a7e409..25b9d3f 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -480,6 +480,7 @@  source "package/libupnp/Config.in"
 source "package/libvncserver/Config.in"
 source "package/nss-mdns/Config.in"
 source "package/ortp/Config.in"
+source "package/usbredir/Config.in"
 source "package/zeromq/Config.in"
 endmenu
 
diff --git a/package/usbredir/Config.in b/package/usbredir/Config.in
new file mode 100644
index 0000000..8d8ac5a
--- /dev/null
+++ b/package/usbredir/Config.in
@@ -0,0 +1,28 @@ 
+comment "usbredir requires libusb"
+	depends on !BR2_PACKAGE_LIBUSB
+
+config BR2_PACKAGE_USBREDIR
+	bool "usbredir"
+	depends on BR2_PACKAGE_LIBUSB
+	help
+	  usbredir is the name of a network protocol for sending usb device
+	  traffic over a network connection. It is also the name of the
+	  software package offering a parsing library, a usbredirhost library
+	  and several utilities implementing this protocol.
+	  
+	  Note: only the library is installed, not the utilities. Say 'y'
+	  below if you want the server too.
+	  
+	  http://www.spice-space.org/page/UsbRedir
+
+if BR2_PACKAGE_USBREDIR
+
+config BR2_PACKAGE_USBREDIR_SERVER
+	bool "usbredirserver on target"
+	help
+	  If you want to serve usbredir requests on your target, say 'y'
+	  here to have the usbredir server on the target.
+	  
+	  Note: the server is not required to use the library.
+
+endif
diff --git a/package/usbredir/usbredir.mk b/package/usbredir/usbredir.mk
new file mode 100644
index 0000000..9f6c011
--- /dev/null
+++ b/package/usbredir/usbredir.mk
@@ -0,0 +1,31 @@ 
+#############################################################
+#
+# usbredir
+#
+#############################################################
+
+USBREDIR_VERSION         = 0.4.3
+USBREDIR_SOURCE          = usbredir-$(USBREDIR_VERSION).tar.bz2
+USBREDIR_SITE            = http://spice-space.org/download/usbredir
+USBREDIR_LICENSE         = LGPLv2.1+
+USBREDIR_LICENSE_FILES   = COPYING.LIB
+USBREDIR_INSTALL_STAGING = YES
+USBREDIR_DEPENDENCIES    = libusb
+
+USBREDIR_DEPENDENCIES    += host-pkgconf
+
+ifeq ($(BR2_PACKAGE_USBREDIR_SERVER),y)
+
+USBREDIR_LICENSE         += GPLv2+
+USBREDIR_LICENSE_FILES   += COPYING
+
+else # BR2_PACKAGE_USBREDIR_SERVER != y
+
+define USBREDIR_POST_INSTALL_TARGET_RM_SERVER
+	rm -f $(TARGET_DIR)/usr/sbin/usbredirserver
+endef
+USBREDIR_POST_INSTALL_TARGET_HOOKS += USBREDIR_POST_INSTALL_TARGET_RM_SERVER
+
+endif # BR2_PACKAGE_USBREDIR_SERVER
+
+$(eval $(autotools-package))