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