netifd: update to the latest version
[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:=2022-05-19
9 PKG_SOURCE_VERSION:=507c0513d1766757d969530c51fe7d368354538d
10 PKG_MIRROR_HASH:=706ede2ffd787a1f5388f2e80300e8f559a704dda21ebc05356074765593539c
11 PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
12
13 PKG_LICENSE:=GPL-2.0
14 PKG_LICENSE_FILES:=
15
16 include $(INCLUDE_DIR)/package.mk
17 include $(INCLUDE_DIR)/cmake.mk
18
19 define Package/netifd
20 SECTION:=base
21 CATEGORY:=Base system
22 DEPENDS:=+libuci +libnl-tiny +libubus +ubus +ubusd +jshn +libubox
23 TITLE:=OpenWrt Network Interface Configuration Daemon
24 endef
25
26 define Package/netifd/conffiles
27 /etc/udhcpc.user
28 /etc/udhcpc.user.d/
29 endef
30
31 TARGET_CFLAGS += \
32 -I$(STAGING_DIR)/usr/include/libnl-tiny \
33 -I$(STAGING_DIR)/usr/include \
34 -flto
35
36 TARGET_LDFLAGS += -flto -fuse-linker-plugin
37
38 CMAKE_OPTIONS += \
39 -DLIBNL_LIBS=-lnl-tiny \
40 -DDEBUG=1
41
42 define Package/netifd/install
43 $(INSTALL_DIR) $(1)/sbin
44 $(INSTALL_BIN) $(PKG_BUILD_DIR)/netifd $(1)/sbin/
45 $(CP) ./files/* $(1)/
46 $(INSTALL_DIR) $(1)/etc/udhcpc.user.d/
47 $(CP) $(PKG_BUILD_DIR)/scripts/* $(1)/lib/netifd/
48 endef
49
50 $(eval $(call BuildPackage,netifd))