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