0b08f33e128f319bde6f74db9043ff6558dd2b0b
[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-07-23
9 PKG_SOURCE_VERSION:=17e453bd68b41780b6564dafa8358efc29a00930
10 PKG_MIRROR_HASH:=06b6e10a71e3002fa03579846b97af29be9503d61486486c639dbfae423b398f
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))