Initial import
[project/ufp.git] / Makefile
1 #
2 # Copyright (C) 2021 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=ufp
11 PKG_VERSION:=1
12
13 PKG_LICENSE:=GPL-2.0
14 PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
15
16 HOST_BUILD_DEPENDS:=ucode/host libubox/host
17 PKG_BUILD_DEPENDS:=bpf-headers ufp/host
18
19 include $(INCLUDE_DIR)/host-build.mk
20 include $(INCLUDE_DIR)/package.mk
21 include $(INCLUDE_DIR)/cmake.mk
22
23 define Package/ufp
24 SECTION:=utils
25 CATEGORY:=Utilities
26 TITLE:=Device fingerprinting daemon
27 DEPENDS:=+ucode +ucode-mod-fs +libubox
28 endef
29
30 define Package/ufp/conffiles
31 /etc/config/ufp
32 endef
33
34 define Host/Prepare
35 mkdir -p $(HOST_BUILD_DIR)
36 $(CP) ./src/* $(HOST_BUILD_DIR)/
37 endef
38
39 define Package/ufp/install
40 $(INSTALL_DIR) $(1)/usr/lib/ucode $(1)/usr/share/ufp
41 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/ucode/uht.so $(1)/usr/lib/ucode/
42 ucode ./scripts/convert-devices.uc $(1)/usr/share/ufp/devices.bin ./data/*.json
43 $(CP) ./files/* $(1)/
44 endef
45
46 $(eval $(call BuildPackage,ufp))
47 $(eval $(call HostBuild))