]> rtime.felk.cvut.cz Git - coffee/buildroot.git/blob - package/dhcpcd/dhcpcd.mk
dhcpcd: fix legal info
[coffee/buildroot.git] / package / dhcpcd / dhcpcd.mk
1 ################################################################################
2 #
3 # dhcpcd
4 #
5 ################################################################################
6
7 DHCPCD_VERSION = 7.0.3
8 DHCPCD_SOURCE = dhcpcd-$(DHCPCD_VERSION).tar.xz
9 DHCPCD_SITE = http://roy.marples.name/downloads/dhcpcd
10 DHCPCD_DEPENDENCIES = host-pkgconf
11 DHCPCD_LICENSE = BSD-2-Clause
12 DHCPCD_LICENSE_FILES = LICENSE
13
14 ifeq ($(BR2_STATIC_LIBS),y)
15 DHCPCD_CONFIG_OPTS += --enable-static
16 endif
17
18 ifeq ($(BR2_USE_MMU),)
19 DHCPCD_CONFIG_OPTS += --disable-fork
20 endif
21
22 define DHCPCD_CONFIGURE_CMDS
23         (cd $(@D); \
24         $(TARGET_CONFIGURE_OPTS) ./configure \
25                 --os=linux \
26                 --libexecdir=/lib/dhcpcd \
27                 $(DHCPCD_CONFIG_OPTS) )
28 endef
29
30 define DHCPCD_BUILD_CMDS
31         $(TARGET_MAKE_ENV) $(MAKE) \
32                 -C $(@D) all
33 endef
34
35 define DHCPCD_INSTALL_TARGET_CMDS
36         $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install DESTDIR=$(TARGET_DIR)
37 endef
38
39 define DHCPCD_INSTALL_INIT_SYSV
40         $(INSTALL) -m 755 -D package/dhcpcd/S41dhcpcd \
41                 $(TARGET_DIR)/etc/init.d/S41dhcpcd
42 endef
43
44 define DHCPCD_INSTALL_INIT_SYSTEMD
45         $(INSTALL) -D -m 0644 package/dhcpcd/dhcpcd.service \
46                 $(TARGET_DIR)/usr/lib/systemd/system/dhcpcd.service
47         mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
48         ln -sf ../../../../usr/lib/systemd/system/dhcpcd.service \
49                 $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/dhcpcd.service
50 endef
51
52 # NOTE: Even though this package has a configure script, it is not generated
53 # using the autotools, so we have to use the generic package infrastructure.
54
55 $(eval $(generic-package))