6617aadb29089506eb8143df267e21a4325342b8
[openwrt/staging/chunkeey.git] / package / network / services / odhcpd / Makefile
1 #
2 # Copyright (C) 2013 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_VERSION:=2014-11-06
12 PKG_RELEASE=$(PKG_SOURCE_VERSION)
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
16 PKG_SOURCE_URL:=git://github.com/sbyx/odhcpd.git
17 PKG_SOURCE_PROTO:=git
18 PKG_SOURCE_VERSION:=3b628005e66e90770b2757a4a02c1dee25ccb883
19
20 PKG_MAINTAINER:=Steven Barth <steven@midlink.org>
21 PKG_LICENSE:=GPL-2.0
22
23 include $(INCLUDE_DIR)/package.mk
24 include $(INCLUDE_DIR)/cmake.mk
25
26 CMAKE_OPTIONS += -DUBUS=1
27
28 ifneq ($(CONFIG_PACKAGE_odhcpd_ext_prefix_class),0)
29 CMAKE_OPTIONS += -DEXT_PREFIX_CLASS=$(CONFIG_PACKAGE_odhcpd_ext_prefix_class)
30 endif
31
32 ifneq ($(CONFIG_PACKAGE_odhcpd_ext_cer_id),0)
33 CMAKE_OPTIONS += -DEXT_CER_ID=$(CONFIG_PACKAGE_odhcpd_ext_cer_id)
34 endif
35
36
37 define Package/odhcpd
38 SECTION:=net
39 CATEGORY:=Network
40 TITLE:=OpenWrt DHCP/DHCPv6(-PD)/RA Server & Relay
41 DEPENDS:=+libubox +libuci +libubus
42 endef
43
44 define Package/odhcpd/config
45 config PACKAGE_odhcpd_ext_prefix_class
46 int "Prefix Class Extension ID (0 = disabled)"
47 depends on PACKAGE_odhcpd
48 default 0
49 config PACKAGE_odhcpd_ext_cer_id
50 int "CER-ID Extension ID (0 = disabled)"
51 depends on PACKAGE_odhcpd
52 default 0
53 endef
54
55 define Package/odhcpd/description
56 odhcpd is a daemon for serving and relaying IP management protocols to
57 configure clients and downstream routers. It tries to follow the RFC 6204
58 requirements for IPv6 home routers.
59
60 odhcpd provides server services for DHCP, RA, stateless and stateful DHCPv6,
61 prefix delegation and can be used to relay RA, DHCPv6 and NDP between routed
62 (non-bridged) interfaces in case no delegated prefixes are available.
63 endef
64
65 define Package/odhcpd/install
66 $(INSTALL_DIR) $(1)/usr/sbin/
67 $(INSTALL_BIN) $(PKG_BUILD_DIR)/odhcpd $(1)/usr/sbin/
68 $(INSTALL_BIN) ./files/odhcpd-update $(1)/usr/sbin/
69 $(INSTALL_DIR) $(1)/etc/init.d
70 $(INSTALL_BIN) ./files/odhcpd.init $(1)/etc/init.d/odhcpd
71 $(INSTALL_DIR) $(1)/etc/uci-defaults
72 $(INSTALL_BIN) ./files/odhcpd.defaults $(1)/etc/uci-defaults
73 endef
74
75 $(eval $(call BuildPackage,odhcpd))