owfs.mk 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. ################################################################################
  2. #
  3. # owfs
  4. #
  5. ################################################################################
  6. OWFS_VERSION = 3.2p4
  7. OWFS_SITE = https://github.com/owfs/owfs/releases/download/v$(OWFS_VERSION)
  8. OWFS_DEPENDENCIES = host-pkgconf
  9. OWFS_CONF_OPTS = --disable-owperl --without-perl5 --disable-owtcl --without-tcl
  10. # owtcl license is declared in module/ownet/c/src/include/ow_functions.h
  11. OWFS_LICENSE = GPL-2.0+, LGPL-2.0 (owtcl)
  12. OWFS_LICENSE_FILES = COPYING COPYING.LIB
  13. OWFS_INSTALL_STAGING = YES
  14. # owfs PHP support is not PHP 7 compliant
  15. # https://sourceforge.net/p/owfs/support-requests/32/
  16. OWFS_CONF_OPTS += --disable-owphp --without-php
  17. # Skip man pages processing
  18. OWFS_CONF_ENV += ac_cv_path_SOELIM=true
  19. ifeq ($(BR2_PACKAGE_LIBFUSE),y)
  20. OWFS_DEPENDENCIES += libfuse
  21. OWFS_CONF_OPTS += \
  22. --enable-owfs \
  23. --with-fuseinclude=$(STAGING_DIR)/usr/include \
  24. --with-fuselib=$(STAGING_DIR)/usr/lib
  25. define OWFS_INSTALL_FUSE_INIT_SYSV
  26. $(INSTALL) -D -m 0755 $(OWFS_PKGDIR)/S60owfs \
  27. $(TARGET_DIR)/etc/init.d/S60owfs
  28. endef
  29. define OWFS_CREATE_MOUNTPOINT
  30. mkdir -p $(TARGET_DIR)/dev/1wire
  31. endef
  32. OWFS_POST_INSTALL_TARGET_HOOKS += OWFS_CREATE_MOUNTPOINT
  33. else
  34. OWFS_CONF_OPTS += --disable-owfs
  35. endif
  36. ifeq ($(BR2_PACKAGE_LIBFTDI1),y)
  37. OWFS_CONF_OPTS += \
  38. --enable-ftdi \
  39. --with-libftdi-config=$(STAGING_DIR)/usr/bin/libftdi1-config
  40. OWFS_DEPENDENCIES += libftdi1
  41. else ifeq ($(BR2_PACKAGE_LIBFTDI),y)
  42. OWFS_CONF_OPTS += \
  43. --enable-ftdi \
  44. --with-libftdi-config=$(STAGING_DIR)/usr/bin/libftdi-config
  45. OWFS_DEPENDENCIES += libftdi
  46. else
  47. OWFS_CONF_OPTS += --disable-ftdi
  48. endif
  49. ifeq ($(BR2_PACKAGE_LIBUSB),y)
  50. OWFS_CONF_OPTS += --enable-usb
  51. OWFS_DEPENDENCIES += libusb
  52. else
  53. OWFS_CONF_OPTS += --disable-usb
  54. endif
  55. ifeq ($(BR2_PACKAGE_AVAHI),y)
  56. OWFS_CONF_OPTS += --enable-avahi
  57. OWFS_DEPENDENCIES += avahi
  58. else
  59. OWFS_CONF_OPTS += --disable-avahi
  60. endif
  61. # python2 only (https://github.com/owfs/owfs/pull/32)
  62. OWFS_CONF_OPTS += --disable-owpython --without-python
  63. ifeq ($(BR2_STATIC_LIBS),y)
  64. # zeroconf support uses dlopen()
  65. OWFS_CONF_OPTS += --disable-zero
  66. endif
  67. OWFS_MAKE = $(MAKE) $(OWFS_EXTRA_MAKE_OPTS)
  68. define OWFS_INSTALL_INIT_SYSV
  69. $(INSTALL) -D -m 0755 $(OWFS_PKGDIR)/S55owserver \
  70. $(TARGET_DIR)/etc/init.d/S55owserver
  71. $(OWFS_INSTALL_FUSE_INIT_SYSV)
  72. endef
  73. $(eval $(autotools-package))