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