1 ################################################################################
5 ################################################################################
8 DHCP_SITE
= http
://ftp.isc.org
/isc
/dhcp
/$(DHCP_VERSION
)
9 DHCP_INSTALL_STAGING
= YES
11 DHCP_LICENSE_FILES
= LICENSE
13 CPPFLAGS
='-D_PATH_DHCPD_CONF=\"/etc/dhcp/dhcpd.conf\" \
14 -D_PATH_DHCLIENT_CONF=\"/etc/dhcp/dhclient.conf\"'
16 --with-randomdev
=/dev
/random \
17 --with-srv-lease-file
=/var
/lib
/dhcp
/dhcpd.leases \
18 --with-srv6-lease-file
=/var
/lib
/dhcp
/dhcpd6.leases \
19 --with-cli-lease-file
=/var
/lib
/dhcp
/dhclient.leases \
20 --with-cli6-lease-file
=/var
/lib
/dhcp
/dhclient6.leases \
21 --with-srv-pid-file
=/var
/run
/dhcpd.pid \
22 --with-srv6-pid-file
=/var
/run
/dhcpd6.pid \
23 --with-cli-pid-file
=/var
/run
/dhclient.pid \
24 --with-cli6-pid-file
=/var
/run
/dhclient6.pid \
25 --with-relay-pid-file
=/var
/run
/dhcrelay.pid \
26 --with-relay6-pid-file
=/var
/run
/dhcrelay6.pid
28 # The source for the bind libraries used by dhcp are embedded in the dhcp source
29 # as a tar-ball. Extract the bind source to allow any patches to be applied
30 # during the patch phase.
31 define DHCP_EXTRACT_BIND
32 cd
$(@D
)/bind
; tar -xvf bind.
tar.gz
34 DHCP_POST_EXTRACT_HOOKS
+= DHCP_EXTRACT_BIND
36 # The patchset requires configure et.al. to be regenerated.
39 # bind does not support parallel builds.
42 # bind configure is called via dhcp make instead of dhcp configure. The make env
43 # needs extra values for bind configure.
45 $(TARGET_CONFIGURE_OPTS
) \
46 BUILD_CC
="$(HOSTCC)" \
47 BUILD_CFLAGS
="$(HOST_CFLAGS)" \
48 BUILD_CPPFLAGS
="$(HOST_CPPFLAGS)" \
49 BUILD_LDFLAGS
="$(HOST_LDFLAGS)"
51 ifeq ($(BR2_PACKAGE_DHCP_SERVER_DELAYED_ACK
),y
)
52 DHCP_CONF_OPTS
+= --enable-delayed-ack
55 ifeq ($(BR2_PACKAGE_DHCP_SERVER
),y
)
56 define DHCP_INSTALL_SERVER
57 mkdir
-p
$(TARGET_DIR
)/var
/lib
58 (cd
$(TARGET_DIR
)/var
/lib
; ln
-snf
/tmp dhcp
)
59 $(INSTALL
) -m
0755 -D
$(@D
)/server
/dhcpd
$(TARGET_DIR
)/usr
/sbin
/dhcpd
60 $(INSTALL
) -m
0644 -D package
/dhcp
/dhcpd.conf \
61 $(TARGET_DIR
)/etc
/dhcp
/dhcpd.conf
65 ifeq ($(BR2_PACKAGE_DHCP_RELAY
),y
)
66 define DHCP_INSTALL_RELAY
67 mkdir
-p
$(TARGET_DIR
)/var
/lib
68 (cd
$(TARGET_DIR
)/var
/lib
; ln
-snf
/tmp dhcp
)
69 $(INSTALL
) -m
0755 -D
$(DHCP_DIR
)/relay
/dhcrelay \
70 $(TARGET_DIR
)/usr
/sbin
/dhcrelay
74 ifeq ($(BR2_PACKAGE_DHCP_CLIENT
),y
)
75 define DHCP_INSTALL_CLIENT
76 mkdir
-p
$(TARGET_DIR
)/var
/lib
77 (cd
$(TARGET_DIR
)/var
/lib
; ln
-snf
/tmp dhcp
)
78 $(INSTALL
) -m
0755 -D
$(DHCP_DIR
)/client
/dhclient \
79 $(TARGET_DIR
)/sbin
/dhclient
80 $(INSTALL
) -m
0644 -D package
/dhcp
/dhclient.conf \
81 $(TARGET_DIR
)/etc
/dhcp
/dhclient.conf
82 $(INSTALL
) -m
0755 -D package
/dhcp
/dhclient-script \
83 $(TARGET_DIR
)/sbin
/dhclient-script
87 # Options don't matter, scripts won't start if binaries aren't there
88 define DHCP_INSTALL_INIT_SYSV
89 $(INSTALL
) -m
0755 -D package
/dhcp
/S80dhcp-server \
90 $(TARGET_DIR
)/etc
/init.d
/S80dhcp-server
91 $(INSTALL
) -m
0755 -D package
/dhcp
/S80dhcp-relay \
92 $(TARGET_DIR
)/etc
/init.d
/S80dhcp-relay
95 ifeq ($(BR2_PACKAGE_DHCP_SERVER
),y
)
96 define DHCP_INSTALL_INIT_SYSTEMD
97 $(INSTALL
) -D
-m
644 package
/dhcp
/dhcpd.service \
98 $(TARGET_DIR
)/usr
/lib
/systemd
/system
/dhcpd.service
100 mkdir
-p
$(TARGET_DIR
)/etc
/systemd
/system
/multi-user.target.wants
102 ln
-sf ..
/..
/..
/..
/usr
/lib
/systemd
/system
/dhcpd.service \
103 $(TARGET_DIR
)/etc
/systemd
/system
/multi-user.target.wants
/dhcpd.service
105 echo
"d /var/lib/dhcp 0755 - - - -" > \
106 $(TARGET_DIR
)/usr
/lib
/tmpfiles.d
/dhcpd.conf
107 echo
"f /var/lib/dhcp/dhcpd.leases - - - - -" >> \
108 $(TARGET_DIR
)/usr
/lib
/tmpfiles.d
/dhcpd.conf
112 define DHCP_INSTALL_TARGET_CMDS
113 $(DHCP_INSTALL_RELAY
)
114 $(DHCP_INSTALL_SERVER
)
115 $(DHCP_INSTALL_CLIENT
)
118 $(eval
$(autotools-package
))