dhcpcd.mk 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. ################################################################################
  2. #
  3. # dhcpcd
  4. #
  5. ################################################################################
  6. DHCPCD_VERSION = 9.1.4
  7. DHCPCD_SOURCE = dhcpcd-$(DHCPCD_VERSION).tar.xz
  8. DHCPCD_SITE = http://roy.marples.name/downloads/dhcpcd
  9. DHCPCD_DEPENDENCIES = host-pkgconf
  10. DHCPCD_LICENSE = BSD-2-Clause
  11. DHCPCD_LICENSE_FILES = LICENSE
  12. DHCPCD_CONFIG_OPTS = \
  13. --libexecdir=/lib/dhcpcd \
  14. --os=linux \
  15. --privsepuser=dhcpcd
  16. ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
  17. DHCPCD_CONFIG_OPTS += --with-udev
  18. DHCPCD_DEPENDENCIES += udev
  19. else
  20. DHCPCD_CONFIG_OPTS += --without-udev
  21. endif
  22. ifeq ($(BR2_STATIC_LIBS),y)
  23. DHCPCD_CONFIG_OPTS += --enable-static
  24. endif
  25. ifeq ($(BR2_USE_MMU),)
  26. DHCPCD_CONFIG_OPTS += --disable-fork --disable-privsep
  27. endif
  28. define DHCPCD_CONFIGURE_CMDS
  29. (cd $(@D); $(TARGET_CONFIGURE_OPTS) ./configure $(DHCPCD_CONFIG_OPTS))
  30. endef
  31. define DHCPCD_BUILD_CMDS
  32. $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) all
  33. endef
  34. define DHCPCD_INSTALL_TARGET_CMDS
  35. $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install DESTDIR=$(TARGET_DIR)
  36. endef
  37. # When network-manager is enabled together with dhcpcd, it will use
  38. # dhcpcd as a DHCP client, and will be in charge of running, so we
  39. # don't want the init script or service file to be installed.
  40. ifeq ($(BR2_PACKAGE_NETWORK_MANAGER),)
  41. define DHCPCD_INSTALL_INIT_SYSV
  42. $(INSTALL) -m 755 -D package/dhcpcd/S41dhcpcd \
  43. $(TARGET_DIR)/etc/init.d/S41dhcpcd
  44. endef
  45. define DHCPCD_INSTALL_INIT_SYSTEMD
  46. $(INSTALL) -D -m 0644 package/dhcpcd/dhcpcd.service \
  47. $(TARGET_DIR)/usr/lib/systemd/system/dhcpcd.service
  48. endef
  49. endif
  50. define DHCPCD_USERS
  51. dhcpcd -1 dhcpcd -1 * - - - dhcpcd user
  52. endef
  53. # NOTE: Even though this package has a configure script, it is not generated
  54. # using the autotools, so we have to use the generic package infrastructure.
  55. $(eval $(generic-package))