1################################################################################ 2# 3# owfs 4# 5################################################################################ 6 7OWFS_VERSION = 3.2p3 8OWFS_SITE = https://github.com/owfs/owfs/releases/download/v$(OWFS_VERSION) 9OWFS_DEPENDENCIES = host-pkgconf 10OWFS_CONF_OPTS = --disable-owperl --without-perl5 --disable-owtcl --without-tcl 11 12# owtcl license is declared in module/ownet/c/src/include/ow_functions.h 13OWFS_LICENSE = GPL-2.0+, LGPL-2.0 (owtcl) 14OWFS_LICENSE_FILES = COPYING COPYING.LIB 15OWFS_INSTALL_STAGING = YES 16 17# owfs PHP support is not PHP 7 compliant 18# https://sourceforge.net/p/owfs/support-requests/32/ 19OWFS_CONF_OPTS += --disable-owphp --without-php 20 21# Skip man pages processing 22OWFS_CONF_ENV += ac_cv_path_SOELIM=true 23 24ifeq ($(BR2_PACKAGE_LIBFUSE),y) 25OWFS_DEPENDENCIES += libfuse 26OWFS_CONF_OPTS += \ 27 --enable-owfs \ 28 --with-fuseinclude=$(STAGING_DIR)/usr/include \ 29 --with-fuselib=$(STAGING_DIR)/usr/lib 30define OWFS_INSTALL_FUSE_INIT_SYSV 31 $(INSTALL) -D -m 0755 $(OWFS_PKGDIR)S60owfs \ 32 $(TARGET_DIR)/etc/init.d/S60owfs 33endef 34define OWFS_CREATE_MOUNTPOINT 35 mkdir -p $(TARGET_DIR)/dev/1wire 36endef 37OWFS_POST_INSTALL_TARGET_HOOKS += OWFS_CREATE_MOUNTPOINT 38else 39OWFS_CONF_OPTS += --disable-owfs 40endif 41 42ifeq ($(BR2_PACKAGE_LIBFTDI1),y) 43OWFS_CONF_OPTS += \ 44 --enable-ftdi \ 45 --with-libftdi-config=$(STAGING_DIR)/usr/bin/libftdi1-config 46OWFS_DEPENDENCIES += libftdi1 47else ifeq ($(BR2_PACKAGE_LIBFTDI),y) 48OWFS_CONF_OPTS += \ 49 --enable-ftdi \ 50 --with-libftdi-config=$(STAGING_DIR)/usr/bin/libftdi-config 51OWFS_DEPENDENCIES += libftdi 52else 53OWFS_CONF_OPTS += --disable-ftdi 54endif 55 56ifeq ($(BR2_PACKAGE_LIBUSB),y) 57OWFS_CONF_OPTS += --enable-usb 58OWFS_DEPENDENCIES += libusb 59else 60OWFS_CONF_OPTS += --disable-usb 61endif 62 63ifeq ($(BR2_PACKAGE_AVAHI),y) 64OWFS_CONF_OPTS += --enable-avahi 65OWFS_DEPENDENCIES += avahi 66else 67OWFS_CONF_OPTS += --disable-avahi 68endif 69 70# setup.py isn't python3 compliant 71ifeq ($(BR2_PACKAGE_PYTHON),y) 72OWFS_CONF_OPTS += \ 73 --enable-owpython \ 74 --with-python \ 75 --with-pythonconfig=$(STAGING_DIR)/usr/bin/python-config 76OWFS_MAKE_ENV += \ 77 CC="$(TARGET_CC)" \ 78 PYTHONPATH="$(PYTHON_PATH)" \ 79 _python_sysroot=$(STAGING_DIR) \ 80 _python_prefix=/usr \ 81 _python_exec_prefix=/usr 82OWFS_DEPENDENCIES += python host-swig 83# The configure scripts finds PYSITEDIR as the python_lib directory of 84# host-python, and then prepends DESTDIR in front of it. So we end up 85# installing things in $(TARGET_DIR)/$(HOST_DIR)/lib/python which is 86# clearly wrong. 87# Patching owfs to do the right thing is not trivial, it's much easier to 88# override the PYSITEDIR variable in make. 89OWFS_EXTRA_MAKE_OPTS += PYSITEDIR=/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages 90 91else 92OWFS_CONF_OPTS += --disable-owpython --without-python 93endif 94 95ifeq ($(BR2_STATIC_LIBS),y) 96# zeroconf support uses dlopen() 97OWFS_CONF_OPTS += --disable-zero 98endif 99 100OWFS_MAKE = $(MAKE) $(OWFS_EXTRA_MAKE_OPTS) 101 102define OWFS_INSTALL_INIT_SYSV 103 $(INSTALL) -D -m 0755 $(OWFS_PKGDIR)S55owserver \ 104 $(TARGET_DIR)/etc/init.d/S55owserver 105 $(OWFS_INSTALL_FUSE_INIT_SYSV) 106endef 107 108$(eval $(autotools-package)) 109