66f0e49a358cd2e4291941c1c295b2a096a746ad
[openwrt/openwrt.git] / package / network / config / netifd / Makefile
1 include $(TOPDIR)/rules.mk
2
3 PKG_NAME:=netifd
4 PKG_RELEASE:=1
5
6 PKG_SOURCE_PROTO:=git
7 PKG_SOURCE_URL=$(PROJECT_GIT)/project/netifd.git
8 PKG_SOURCE_DATE:=2018-12-16
9 PKG_SOURCE_VERSION:=2750ce2e0a9177e024823332853c76dbd0937c98
10 PKG_MIRROR_HASH:=08b278e3ebc13703a508a892625bdc77d377563752cd9dcfa2f3f30f7f737775
11 PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
12
13 PKG_LICENSE:=GPL-2.0
14 PKG_LICENSE_FILES:=
15
16 PKG_BUILD_PARALLEL:=1
17
18 include $(INCLUDE_DIR)/package.mk
19 include $(INCLUDE_DIR)/cmake.mk
20
21 define Package/netifd
22 SECTION:=base
23 CATEGORY:=Base system
24 DEPENDS:=+libuci +libnl-tiny +libubus +ubus +ubusd +jshn +libubox
25 TITLE:=OpenWrt Network Interface Configuration Daemon
26 endef
27
28 TARGET_CFLAGS += \
29 -I$(STAGING_DIR)/usr/include/libnl-tiny \
30 -I$(STAGING_DIR)/usr/include \
31 -flto
32
33 TARGET_LDFLAGS += -flto -fuse-linker-plugin
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))