netifd: add a udhcpc.user placeholder script
[openwrt/openwrt.git] / package / network / config / netifd / Makefile
1 include $(TOPDIR)/rules.mk
2
3 PKG_NAME:=netifd
4 PKG_RELEASE:=2
5
6 PKG_SOURCE_PROTO:=git
7 PKG_SOURCE_URL=$(PROJECT_GIT)/project/netifd.git
8 PKG_SOURCE_DATE:=2021-01-09
9 PKG_SOURCE_VERSION:=c00c8335d6188daa326ecfe5a62da15a9b9987e1
10 PKG_MIRROR_HASH:=c740e51e0cec13eec336ba1c7a643db3b64a9a2235f8c1b73a566cb89e841190
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 endef
31
32 TARGET_CFLAGS += \
33 -I$(STAGING_DIR)/usr/include/libnl-tiny \
34 -I$(STAGING_DIR)/usr/include \
35 -flto
36
37 TARGET_LDFLAGS += -flto -fuse-linker-plugin
38
39 CMAKE_OPTIONS += \
40 -DLIBNL_LIBS=-lnl-tiny \
41 -DDEBUG=1
42
43 define Package/netifd/install
44 $(INSTALL_DIR) $(1)/sbin
45 $(INSTALL_BIN) $(PKG_BUILD_DIR)/netifd $(1)/sbin/
46 $(CP) ./files/* $(1)/
47 $(CP) $(PKG_BUILD_DIR)/scripts/* $(1)/lib/netifd/
48 endef
49
50 $(eval $(call BuildPackage,netifd))