ffdd7aa1c288abe606a782fa897425ba866e4fff
[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-02-20
9 PKG_SOURCE_VERSION:=136006b88826feff4f0a36ffab511d1366483cf2
10 PKG_MIRROR_HASH:=6358738d20e6df27b82c3bdb575fba0fdad8bef45a3c7479b93a5587c465dba4
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))