iwd.mk 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. ################################################################################
  2. #
  3. # iwd
  4. #
  5. ################################################################################
  6. IWD_VERSION = 1.9
  7. IWD_SITE = https://git.kernel.org/pub/scm/network/wireless/iwd.git
  8. IWD_SITE_METHOD = git
  9. IWD_LICENSE = LGPL-2.1+
  10. IWD_LICENSE_FILES = COPYING
  11. # sources from git, no configure script provided
  12. IWD_AUTORECONF = YES
  13. IWD_CONF_OPTS = \
  14. --disable-manual-pages \
  15. --enable-external-ell
  16. IWD_DEPENDENCIES = ell
  17. # autoreconf requires an existing build-aux directory
  18. define IWD_MKDIR_BUILD_AUX
  19. mkdir -p $(@D)/build-aux
  20. endef
  21. IWD_POST_PATCH_HOOKS += IWD_MKDIR_BUILD_AUX
  22. ifeq ($(BR2_PACKAGE_DBUS),y)
  23. IWD_CONF_OPTS += --enable-dbus-policy --with-dbus-datadir=/usr/share
  24. IWD_DEPENDENCIES += dbus
  25. else
  26. IWD_CONF_OPTS += --disable-dbus-policy
  27. endif
  28. ifeq ($(BR2_PACKAGE_READLINE),y)
  29. # iwd client depends on readline (GPL-3.0+)
  30. IWD_LICENSE += , GPL-3.0+ (client)
  31. IWD_CONF_OPTS += --enable-client
  32. IWD_DEPENDENCIES += readline
  33. else
  34. IWD_CONF_OPTS += --disable-client
  35. endif
  36. ifeq ($(BR2_PACKAGE_SYSTEMD),y)
  37. IWD_CONF_OPTS += --enable-systemd-service
  38. IWD_DEPENDENCIES += systemd
  39. else
  40. IWD_CONF_OPTS += --disable-systemd-service
  41. endif
  42. ifeq ($(BR2_PACKAGE_SYSTEMD_RESOLVED),y)
  43. IWD_RESOLV_SERVICE = systemd
  44. else
  45. IWD_RESOLV_SERVICE = resolvconf
  46. endif
  47. define IWD_INSTALL_CONFIG_FILE
  48. $(INSTALL) -D -m 644 package/iwd/main.conf $(TARGET_DIR)/etc/iwd/main.conf
  49. $(SED) 's,__RESOLV_SERVICE__,$(IWD_RESOLV_SERVICE),' $(TARGET_DIR)/etc/iwd/main.conf
  50. endef
  51. IWD_POST_INSTALL_TARGET_HOOKS += IWD_INSTALL_CONFIG_FILE
  52. define IWD_INSTALL_INIT_SYSV
  53. $(INSTALL) -m 0755 -D package/iwd/S40iwd \
  54. $(TARGET_DIR)/etc/init.d/S40iwd
  55. mkdir -p $(TARGET_DIR)/var/lib/iwd
  56. ln -sf /tmp/iwd/hotspot $(TARGET_DIR)/var/lib/iwd/hotspot
  57. endef
  58. $(eval $(autotools-package))