From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 3/3] pi4j: new package
Date: Sat, 11 Jan 2014 14:40:47 +0800 [thread overview]
Message-ID: <20140111144047.5370b25b@skate> (raw)
In-Reply-To: <1389383422-29665-3-git-send-email-lucas.de.marchi@gmail.com>
Dear Lucas De Marchi,
On Fri, 10 Jan 2014 17:50:22 -0200, Lucas De Marchi wrote:
> Add pi4j using its released binaries. The java archives are a bit
> different than other packages. Since they are coming already
> pre-compiled put them in /opt with the same layout as in raspbian,
> according to http://pi4j.com/install.html
I think this is quite certainly the first Java library for which we
have a package. Which JVM are you using to run this on the target? The
official Oracle JDK?
I think this package, like Python/Lua/Perl packages, should depend on
the selection of a JVM, be it the official Oracle JDK (for which a
package would have to be created), or JamVM, if this package is
actually compatible with it.
Regarding the installation in /opt, I'm not sure. The fact that
Raspbian installs it here is not that much of an argument to me (quite
the opposite, actually!).
On Ubuntu, the Java libraries are apparently installed
in /usr/share/java/, which seems a bit more sensible to me. The JNI
parts are installed in /usr/lib/jni/. See:
$ dpkg -L librxtx-java
[... skip documentation ...]
/usr/share/java
/usr/share/java/RXTXcomm-2.2pre2.jar
/usr/share/lintian
/usr/share/lintian/overrides
/usr/share/lintian/overrides/librxtx-java
/usr/lib
/usr/lib/jni
/usr/lib/jni/librxtxRaw-2.2pre1.so
/usr/lib/jni/librxtxI2C-2.2pre1.so
/usr/lib/jni/librxtxRS485-2.2pre1.so
/usr/lib/jni/librxtxSerial-2.2pre1.so
/usr/lib/jni/librxtxParallel-2.2pre1.so
/usr/share/java/RXTXcomm.jar
/usr/lib/jni/librxtxSerial.so
/usr/lib/jni/librxtxRS485.so
/usr/lib/jni/librxtxI2C.so
/usr/lib/jni/librxtxParallel.so
/usr/lib/jni/librxtxRaw.so
> diff --git a/package/pi4j/Config.in b/package/pi4j/Config.in
> new file mode 100644
> index 0000000..99736bf
> --- /dev/null
> +++ b/package/pi4j/Config.in
> @@ -0,0 +1,10 @@
> +config BR2_PACKAGE_PI4J
> + bool "pi4j"
> + depends on BR2_PACKAGE_RPI_USERLAND
Why this dependency?
As stated above, we should ensure that a JVM is selected here.
> +define PI4J_INSTALL_TARGET_CMDS
> + $(INSTALL) -D -m 0644 $(@D)/lib/pi4j-core.jar \
> + $(TARGET_DIR)/opt/pi4j/lib/pi4j-core.jar
> + $(INSTALL) -D -m 0644 $(@D)/lib/pi4j-device.jar \
> + $(TARGET_DIR)/opt/pi4j/lib/pi4j-device.jar
> + $(INSTALL) -D -m 0644 $(@D)/lib/pi4j-example.jar \
> + $(TARGET_DIR)/opt/pi4j/lib/pi4j-example.jar
> + $(INSTALL) -D -m 0644 $(@D)/lib/pi4j-gpio-extension.jar \
> + $(TARGET_DIR)/opt/pi4j/lib/pi4j-extension.jar
> + $(INSTALL) -D -m 0644 $(@D)/lib/pi4j-service.jar \
> + $(TARGET_DIR)/opt/pi4j/lib/pi4j-service.jar
> +endef
This can probably be improved a little bit:
PI4J_LIBS = core device example extension service
define PI4J_INSTALL_TARGET_CMDS
$(foreach lib,$(PI4J_LIBS),\
$(INSTALL) -D -m 0644 $(@D)/lib/pi4j-$(lib).jar $(TARGET_DIR)/opt/pi4j/lib/pi4j-$(lib).jar)
endef
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
next prev parent reply other threads:[~2014-01-11 6:40 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-10 19:50 [Buildroot] [PATCH 1/3] wiringpi: new package Lucas De Marchi
2014-01-10 19:50 ` [Buildroot] [PATCH 2/3] psplash: use git repository Lucas De Marchi
2014-01-15 22:18 ` Peter Korsgaard
2014-01-10 19:50 ` [Buildroot] [PATCH 3/3] pi4j: new package Lucas De Marchi
2014-01-11 6:40 ` Thomas Petazzoni [this message]
2014-01-11 12:27 ` Lucas De Marchi
2014-01-13 8:02 ` Thomas Petazzoni
2014-01-11 6:08 ` [Buildroot] [PATCH 1/3] wiringpi: " Thomas Petazzoni
2014-01-11 12:20 ` Lucas De Marchi
2014-03-07 22:52 ` Thomas Petazzoni
2014-04-01 16:55 ` Lucas De Marchi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140111144047.5370b25b@skate \
--to=thomas.petazzoni@free-electrons.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox