2013-03-11 02:23:14 +01:00
|
|
|
################################################################################
|
|
|
|
#
|
|
|
|
# dhcpcd
|
|
|
|
#
|
|
|
|
################################################################################
|
|
|
|
|
2021-10-27 21:16:59 +02:00
|
|
|
DHCPCD_VERSION = 9.4.1
|
2015-07-15 16:58:04 +02:00
|
|
|
DHCPCD_SOURCE = dhcpcd-$(DHCPCD_VERSION).tar.xz
|
2013-11-08 13:26:52 +01:00
|
|
|
DHCPCD_SITE = http://roy.marples.name/downloads/dhcpcd
|
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 11:15:42 +01:00
|
|
|
# AUDIT_ARCH_{OPENRISC,SH,SHEL,SH64,SHEL64} are only available with kernel >= 3.7
|
|
|
|
ifeq ($(BR2_or1k)$(BR2_sh):$(BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7),y:)
|
|
|
|
DHCPCD_CONFIG_OPTS += --disable-privsep
|
|
|
|
endif
|
|
|
|
|
|
|
|
# AUDIT_ARCH_MICROBLAZE is only available with kernel >= 3.18
|
|
|
|
ifeq ($(BR2_microblazeel)$(BR2_microblazebe):$(BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18),y:)
|
|
|
|
DHCPCD_CONFIG_OPTS += --disable-privsep
|
|
|
|
endif
|
|
|
|
|
|
|
|
# AUDIT_ARCH_XTENSA is only available with kernel >= 5.0
|
|
|
|
ifeq ($(BR2_xtensa):$(BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_0),y:)
|
|
|
|
DHCPCD_CONFIG_OPTS += --disable-privsep
|
|
|
|
endif
|
|
|
|
|
|
|
|
# AUDIT_ARCH_{ARCOMPACT,ARCV2,NDS32,NIOS2} are only available with kernel >= 5.2
|
|
|
|
ifeq ($(BR2_arceb)$(BR2_arcle)$(BR2_nds32)$(BR2_nios2):$(BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_2),y:)
|
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),)
|
2020-07-13 11:01:40 +02:00
|
|
|
DHCPCD_CONFIG_OPTS += --disable-fork --disable-privsep
|
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))
|