udebug: update to Git HEAD (2023-11-20)
[openwrt/staging/stintel.git] / package / libs / udebug / Makefile
1 #
2 # Copyright (C) 2023 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:=udebug
11 CMAKE_INSTALL:=1
12 PKG_SOURCE_PROTO:=git
13 PKG_SOURCE_URL=$(PROJECT_GIT)/project/udebug.git
14 PKG_MIRROR_HASH:=baf437fb12b1faaf6c7eea3fea253c6d87c31b85f768b48d3984fe398e5b20b8
15 PKG_SOURCE_DATE:=2023-11-20
16 PKG_SOURCE_VERSION:=759d9404034b7da97b3950c806ace7296a0f7a12
17 PKG_ABI_VERSION:=$(call abi_version_str,$(PKG_SOURCE_DATE))
18
19 PKG_LICENSE:=GPL-2.0
20 PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
21
22 include $(INCLUDE_DIR)/package.mk
23 include $(INCLUDE_DIR)/cmake.mk
24
25 define Package/libudebug
26 SECTION:=libs
27 CATEGORY:=Libraries
28 TITLE:=udebug client library
29 DEPENDS:=+libubox
30 endef
31
32 define Package/udebugd
33 SECTION:=utils
34 CATEGORY:=Utilities
35 TITLE:=OpenWrt debug service
36 DEPENDS:=+libudebug +libubus
37 endef
38
39 define Package/udebugd/conffiles
40 /etc/config/udebug
41 endef
42
43 define Package/ucode-mod-udebug
44 SECTION:=utils
45 CATEGORY:=Utilities
46 TITLE:=ucode udebug module
47 DEPENDS:=+libucode +libudebug
48 endef
49
50 define Package/udebug-cli
51 SECTION:=utils
52 CATEGORY:=Utilities
53 TITLE:=OpenWrt debug service CLI
54 DEPENDS:=+udebugd +ucode-mod-udebug
55 endef
56
57 define Package/libudebug/install
58 $(INSTALL_DIR) $(1)/usr/lib
59 $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib
60 endef
61
62 define Package/ucode-mod-udebug/install
63 $(INSTALL_DIR) $(1)/usr/lib/ucode
64 $(CP) $(PKG_INSTALL_DIR)/usr/lib/ucode/*.so $(1)/usr/lib/ucode
65 endef
66
67 define Package/udebugd/install
68 $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/init.d $(1)/etc/config
69 $(INSTALL_BIN) ./files/udebug.config $(1)/etc/config/udebug
70 $(INSTALL_BIN) ./files/udebug.init $(1)/etc/init.d/udebug
71 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/udebugd $(1)/usr/sbin
72 endef
73
74 define Package/udebug-cli/install
75 $(INSTALL_DIR) $(1)/usr/sbin
76 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/udebug-cli $(1)/usr/sbin/udebug
77 endef
78
79 $(eval $(call BuildPackage,libudebug))
80 $(eval $(call BuildPackage,udebugd))
81 $(eval $(call BuildPackage,ucode-mod-udebug))
82 $(eval $(call BuildPackage,udebug-cli))