netifd: fix device config handling and add some config options
[oweals/openwrt.git] / package / network / config / netifd / Makefile
1 include $(TOPDIR)/rules.mk
2
3 PKG_NAME:=netifd
4 PKG_VERSION:=2015-02-09
5 PKG_RELEASE=$(PKG_SOURCE_VERSION)
6
7 PKG_SOURCE_PROTO:=git
8 PKG_SOURCE_URL:=http://git.openwrt.org/project/netifd.git
9 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
10 PKG_SOURCE_VERSION:=2dae3867c8730e194c036a7827b0322726adf81a
11 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
12 PKG_MAINTAINER:=Felix Fietkau <nbd@openwrt.org>
13 # PKG_MIRROR_MD5SUM:=
14 # CMAKE_INSTALL:=1
15
16 PKG_LICENSE:=GPL-2.0
17 PKG_LICENSE_FILES:=
18
19 PKG_BUILD_PARALLEL:=1
20
21 include $(INCLUDE_DIR)/package.mk
22 include $(INCLUDE_DIR)/cmake.mk
23
24 define Package/netifd
25   SECTION:=base
26   CATEGORY:=Base system
27   DEPENDS:=+libuci +libnl-tiny +libubus +ubus +ubusd +jshn +libubox
28   TITLE:=OpenWrt Network Interface Configuration Daemon
29 endef
30
31 TARGET_CFLAGS += \
32         -I$(STAGING_DIR)/usr/include/libnl-tiny \
33         -I$(STAGING_DIR)/usr/include
34
35 CMAKE_OPTIONS += \
36         -DLIBNL_LIBS=-lnl-tiny \
37         -DDEBUG=1
38
39 define Package/netifd/install
40         $(INSTALL_DIR) $(1)/sbin
41         $(INSTALL_BIN) $(PKG_BUILD_DIR)/netifd $(1)/sbin/
42         $(CP) ./files/* $(1)/
43         $(CP) $(PKG_BUILD_DIR)/scripts/* $(1)/lib/netifd/
44 endef
45
46 $(eval $(call BuildPackage,netifd))