2013-03-11 02:23:14 +01:00
|
|
|
################################################################################
|
|
|
|
#
|
|
|
|
# dhcpcd
|
|
|
|
#
|
|
|
|
################################################################################
|
|
|
|
|
2023-04-28 05:31:37 +02:00
|
|
|
DHCPCD_VERSION = 10.0.1
|
2015-07-15 16:58:04 +02:00
|
|
|
DHCPCD_SOURCE = dhcpcd-$(DHCPCD_VERSION).tar.xz
|
2023-04-28 05:31:37 +02:00
|
|
|
DHCPCD_SITE = https://github.com/NetworkConfiguration/dhcpcd/releases/download/v$(DHCPCD_VERSION)
|
2014-06-18 00:07:46 +02:00
|
|
|
DHCPCD_DEPENDENCIES = host-pkgconf
|
2017-03-30 15:43:39 +02:00
|
|
|
DHCPCD_LICENSE = BSD-2-Clause
|
2018-04-20 07:23:35 +02:00
|
|
|
DHCPCD_LICENSE_FILES = LICENSE
|
2021-03-20 19:41:57 +01:00
|
|
|
DHCPCD_CPE_ID_VENDOR = dhcpcd_project
|
2013-03-11 02:23:14 +01:00
|
|
|
|
2020-12-26 18:17:43 +01:00
|
|
|
DHCPCD_CONFIG_OPTS = \
|
|
|
|
--libexecdir=/lib/dhcpcd \
|
2020-12-26 18:17:44 +01:00
|
|
|
--os=linux \
|
|
|
|
--privsepuser=dhcpcd
|
2020-12-26 18:17:43 +01:00
|
|
|
|
2021-03-05 12:10:48 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_DHCPCD_ENABLE_PRIVSEP),y)
|
|
|
|
DHCPCD_CONFIG_OPTS += --enable-privsep
|
|
|
|
else
|
2021-01-29 22:36:08 +01:00
|
|
|
DHCPCD_CONFIG_OPTS += --disable-privsep
|
|
|
|
endif
|
|
|
|
|
2020-12-26 18:17:45 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
|
|
|
|
DHCPCD_CONFIG_OPTS += --with-udev
|
|
|
|
DHCPCD_DEPENDENCIES += udev
|
|
|
|
else
|
|
|
|
DHCPCD_CONFIG_OPTS += --without-udev
|
|
|
|
endif
|
|
|
|
|
2014-12-03 22:41:29 +01:00
|
|
|
ifeq ($(BR2_STATIC_LIBS),y)
|
2015-03-31 09:21:57 +02:00
|
|
|
DHCPCD_CONFIG_OPTS += --enable-static
|
2014-06-18 00:07:46 +02:00
|
|
|
endif
|
|
|
|
|
2013-11-08 13:26:52 +01:00
|
|
|
ifeq ($(BR2_USE_MMU),)
|
2021-03-05 12:10:48 +01:00
|
|
|
DHCPCD_CONFIG_OPTS += --disable-fork
|
2013-11-08 13:26:52 +01:00
|
|
|
endif
|
|
|
|
|
2013-03-11 02:23:14 +01:00
|
|
|
define DHCPCD_CONFIGURE_CMDS
|
2020-12-26 18:17:43 +01:00
|
|
|
(cd $(@D); $(TARGET_CONFIGURE_OPTS) ./configure $(DHCPCD_CONFIG_OPTS))
|
2013-03-11 02:23:14 +01:00
|
|
|
endef
|
|
|
|
|
|
|
|
define DHCPCD_BUILD_CMDS
|
2020-12-26 18:17:43 +01:00
|
|
|
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) all
|
2013-03-11 02:23:14 +01:00
|
|
|
endef
|
|
|
|
|
|
|
|
define DHCPCD_INSTALL_TARGET_CMDS
|
2014-11-18 18:01:56 +01:00
|
|
|
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install DESTDIR=$(TARGET_DIR)
|
2013-03-11 02:23:14 +01:00
|
|
|
endef
|
|
|
|
|
2018-05-01 02:02:45 +02:00
|
|
|
# When network-manager is enabled together with dhcpcd, it will use
|
|
|
|
# dhcpcd as a DHCP client, and will be in charge of running, so we
|
|
|
|
# don't want the init script or service file to be installed.
|
|
|
|
ifeq ($(BR2_PACKAGE_NETWORK_MANAGER),)
|
2017-10-31 23:36:58 +01:00
|
|
|
define DHCPCD_INSTALL_INIT_SYSV
|
|
|
|
$(INSTALL) -m 755 -D package/dhcpcd/S41dhcpcd \
|
|
|
|
$(TARGET_DIR)/etc/init.d/S41dhcpcd
|
|
|
|
endef
|
|
|
|
|
2017-10-31 23:36:59 +01:00
|
|
|
define DHCPCD_INSTALL_INIT_SYSTEMD
|
|
|
|
$(INSTALL) -D -m 0644 package/dhcpcd/dhcpcd.service \
|
|
|
|
$(TARGET_DIR)/usr/lib/systemd/system/dhcpcd.service
|
|
|
|
endef
|
2018-05-01 02:02:45 +02:00
|
|
|
endif
|
2017-10-31 23:36:59 +01:00
|
|
|
|
2020-12-26 18:17:44 +01:00
|
|
|
define DHCPCD_USERS
|
|
|
|
dhcpcd -1 dhcpcd -1 * - - - dhcpcd user
|
|
|
|
endef
|
|
|
|
|
2013-03-11 02:23:14 +01:00
|
|
|
# NOTE: Even though this package has a configure script, it is not generated
|
|
|
|
# using the autotools, so we have to use the generic package infrastructure.
|
|
|
|
|
2013-09-11 13:05:01 +02:00
|
|
|
$(eval $(generic-package))
|