netifd: update to the latest master
[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:=2021-05-20
9 PKG_SOURCE_VERSION:=42c19303bff5853866292671df30e9cae0fd60d1
10 PKG_MIRROR_HASH:=534cd7e700589b0ab042a74368e48ea907234caa795a66944694463f23d69af3
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 define Package/netifd/conffiles
29 /etc/udhcpc.user
30 /etc/udhcpc.user.d/
31 endef
32
33 TARGET_CFLAGS += \
34 -I$(STAGING_DIR)/usr/include/libnl-tiny \
35 -I$(STAGING_DIR)/usr/include \
36 -flto
37
38 TARGET_LDFLAGS += -flto -fuse-linker-plugin
39
40 CMAKE_OPTIONS += \
41 -DLIBNL_LIBS=-lnl-tiny \
42 -DDEBUG=1
43
44 define Package/netifd/install
45 $(INSTALL_DIR) $(1)/sbin
46 $(INSTALL_BIN) $(PKG_BUILD_DIR)/netifd $(1)/sbin/
47 $(CP) ./files/* $(1)/
48 $(INSTALL_DIR) $(1)/etc/udhcpc.user.d/
49 $(CP) $(PKG_BUILD_DIR)/scripts/* $(1)/lib/netifd/
50 endef
51
52 $(eval $(call BuildPackage,netifd))