[Buildroot] [PATCH v4] openzwave: new package

Peter Korsgaard peter at korsgaard.com
Mon May 30 15:22:17 UTC 2016


>>>>>   <fabrice.fontaine at orange.com> writes:

 > Free software library that interfaces with selected Z-Wave PC
 > controllers, allowing anyone to create applications that manipulate and
 > respond to devices on a Z-Wave network, without requiring in-depth
 > knowledge of the Z-Wave protocol

 > Signed-off-by: Fabrice Fontaine <fabrice.fontaine at orange.com>
 > ---
 > Changes v3 -> v4 (after review of Peter Korsgaard):
 >  - Add a patch to fix git revision

 > +++ b/package/openzwave/openzwave.mk
 > @@ -0,0 +1,52 @@
 > +################################################################################
 > +#
 > +# openzwave
 > +#
 > +################################################################################
 > +
 > +OPENZWAVE_VERSION = v1.4
 > +OPENZWAVE_SITE = $(call github,OpenZWave,open-zwave,$(OPENZWAVE_VERSION))
 > +OPENZWAVE_LICENSE = LGPLv3+, GPLv3 (examples), Apache-2.0 (sh2ju.sh)
 > +OPENZWAVE_LICENSE_FILES = license/license.txt license/lgpl.txt \
 > +	license/gpl.txt license/Apache-License-2.0.txt
 > +
 > +OPENZWAVE_DEPENDENCIES = host-pkgconf udev
 > +OPENZWAVE_INSTALL_STAGING = YES
 > +
 > +define OPENZWAVE_BUILD_CMDS
 > +	$(TARGET_MAKE_ENV) $(MAKE) CROSS_COMPILE="$(TARGET_CROSS)" -C $(@D)
 > +endef
 > +
 > +# Set instlibdir to install libopenzwave.so* in the correct directory
 > +# otherwise openzwave will check that /lib64 exists (on the host) to
 > +# know if the library should be installed in $(PREFIX)/lib or $(PREFIX)/lib64.
 > +# Set pkgconfigdir to /lib/pkgconfig to install libopenzwave.pc in the
 > +# correct directory otherwise openzwave will call
 > +# "pkg-config --variable pc_path pkg-config" which returns an incorrect value.
 > +# Set sysconfdir to /etc/openzwave to install openzwave configuration files in
 > +# the correct directory otherwise openzwave will install configuration files in
 > +# $(PREFIX)/etc/openzwave.
 > +define OPENZWAVE_INSTALL_STAGING_CMDS
 > +	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
 > +		PREFIX=/usr DESTDIR=$(STAGING_DIR) \
 > +		instlibdir=/usr/lib \
 > +		pkgconfigdir=/usr/lib/pkgconfig \
 > +		sysconfdir=/etc/openzwave \
 > +		install

This is a bit of a mess. At least sysconfdir is also used at build time
for the default configuration directory, but it is hardcoded as
$PREFIX/etc/openzwave, and other places in the source code hardcodes
/etc/openzwave:

strings libopenzwave.so.1.4 | grep /etc
/etc/openzwave/
Cannot find a path to the configuration files at %s, Using /etc/openzwave/ instead...
/usr/local/etc/openzwave/

We also need to pass DOXYGEN= to get it to not spend time on building
documentation during the installation step. As there's several variables
and we need to pass (a subset of) them to build / staging-install /
target-install I've added them to an OPENZWAVE_MAKE_OPTS variable and
used that everywhere.

Committed to next with that fixed, thanks.

-- 
Bye, Peter Korsgaard


More information about the buildroot mailing list