opkg: Fix PKG_MIRROR_HASH
[openwrt/openwrt.git] / package / network / services / odhcpd / Makefile
1 #
2 # Copyright (C) 2013-2015 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=odhcpd
11 PKG_RELEASE:=3
12
13 PKG_SOURCE_PROTO:=git
14 PKG_SOURCE_URL=$(PROJECT_GIT)/project/odhcpd.git
15 PKG_SOURCE_DATE:=2020-05-03
16 PKG_SOURCE_VERSION:=49e4949c6dee4a7e528e9bc51e9813228c3c16d8
17 PKG_MIRROR_HASH:=5e23b60211a171d17d7015ce604b5fa128f0fbe4d7e7ddd48063b40590e17d4c
18
19 PKG_MAINTAINER:=Hans Dedecker <dedeckeh@gmail.com>
20 PKG_LICENSE:=GPL-2.0
21
22 PKG_INSTALL:=1
23 PKG_CONFIG_DEPENDS:=CONFIG_PACKAGE_odhcpd_$(BUILD_VARIANT)_ext_cer_id
24
25 include $(INCLUDE_DIR)/package.mk
26 include $(INCLUDE_DIR)/cmake.mk
27
28 define Package/odhcpd/default
29 SECTION:=net
30 CATEGORY:=Network
31 TITLE:=OpenWrt DHCPv6(-PD)/RA Server & Relay
32 DEPENDS:=+libubox +libuci +libubus +libnl-tiny
33 endef
34
35 define Package/odhcpd/default/description
36 odhcpd is a daemon for serving and relaying IP management protocols to
37 configure clients and downstream routers. It tries to follow the RFC 6204
38 requirements for IPv6 home routers.
39 endef
40
41 define Package/odhcpd/default/config
42 menu "Configuration"
43 depends on PACKAGE_$(1)
44
45 config PACKAGE_odhcpd_$(2)_ext_cer_id
46 int
47 default 0
48 prompt "CER-ID Extension ID (0 = disabled)"
49 endmenu
50 endef
51
52 define Package/odhcpd
53 $(call Package/odhcpd/default)
54 TITLE += and DHCPv4 server
55 VARIANT:=full
56 endef
57
58 Package/odhcpd/config=$(call Package/odhcpd/default/config,odhcpd,full)
59
60 define Package/odhcpd/description
61 $(call Package/odhcpd/default/description)
62
63 This is a variant providing server services for DHCPv4, RA, stateless and
64 stateful DHCPv6, prefix delegation and can be used to relay RA, DHCPv6 and
65 NDP between routed (non-bridged) interfaces in case no delegated prefixes
66 are available.
67 endef
68
69 define Package/odhcpd-ipv6only
70 $(call Package/odhcpd/default)
71 VARIANT:=ipv6only
72 DEPENDS+= @IPV6
73 endef
74
75 Package/odhcpd-ipv6only/config=$(call Package/odhcpd/default/config,odhcpd-ipv6only,ipv6only)
76
77 define Package/odhcpd-ipv6only/description
78 $(call Package/odhcpd/default/description)
79
80 This is a variant providing server services for RA, stateless and stateful
81 DHCPv6, prefix delegation and can be used to relay RA, DHCPv6 and NDP between
82 routed (non-bridged) interfaces in case no delegated prefixes are available.
83 endef
84
85 CMAKE_OPTIONS += -DUBUS=1
86
87 ifeq ($(BUILD_VARIANT),full)
88 CMAKE_OPTIONS += -DDHCPV4_SUPPORT=1
89 endif
90
91 ifneq ($(CONFIG_PACKAGE_odhcpd_$(BUILD_VARIANT)_ext_cer_id),0)
92 CMAKE_OPTIONS += -DEXT_CER_ID=$(CONFIG_PACKAGE_odhcpd_$(BUILD_VARIANT)_ext_cer_id)
93 endif
94
95 define Package/odhcpd/install
96 $(INSTALL_DIR) $(1)/usr/sbin/
97 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/odhcpd $(1)/usr/sbin/
98 $(INSTALL_BIN) ./files/odhcpd-update $(1)/usr/sbin/
99 $(INSTALL_DIR) $(1)/etc/init.d
100 $(INSTALL_BIN) ./files/odhcpd.init $(1)/etc/init.d/odhcpd
101 $(INSTALL_DIR) $(1)/etc/uci-defaults
102 $(INSTALL_BIN) ./files/odhcpd.defaults $(1)/etc/uci-defaults
103 endef
104
105 Package/odhcpd-ipv6only/install = $(Package/odhcpd/install)
106
107 $(eval $(call BuildPackage,odhcpd))
108 $(eval $(call BuildPackage,odhcpd-ipv6only))