Makefile 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  1. #
  2. # Copyright (C) 2020-2021 Jo-Philipp Wich <[email protected]>
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=ucode
  9. PKG_RELEASE:=1
  10. PKG_SOURCE_PROTO:=git
  11. PKG_SOURCE_URL=https://github.com/jow-/ucode.git
  12. PKG_SOURCE_DATE:=2022-02-11
  13. PKG_SOURCE_VERSION:=a29bad9454edcc285f7f37410b6822affede44d1
  14. PKG_MIRROR_HASH:=eaba0f12c469ef82b772a64f8763e8855dbba81551a78d05f547c0922a7dacad
  15. PKG_MAINTAINER:=Jo-Philipp Wich <[email protected]>
  16. PKG_LICENSE:=ISC
  17. PKG_ABI_VERSION:=20220206
  18. include $(INCLUDE_DIR)/package.mk
  19. include $(INCLUDE_DIR)/cmake.mk
  20. CMAKE_OPTIONS += -DSOVERSION=$(PKG_ABI_VERSION)
  21. define Package/ucode/default
  22. SECTION:=utils
  23. CATEGORY:=Utilities
  24. TITLE:=ucode - Tiny scripting and templating language
  25. endef
  26. define Package/ucode
  27. $(Package/ucode/default)
  28. DEPENDS:=+libucode
  29. endef
  30. define Package/ucode/description
  31. ucode is a tiny script interpreter featuring an ECMAScript oriented
  32. script language and Jinja-inspired templating.
  33. endef
  34. define Package/libucode
  35. $(Package/ucode/default)
  36. TITLE+= - runtime library
  37. ABI_VERSION:=$(PKG_ABI_VERSION)
  38. DEPENDS:=+libjson-c
  39. endef
  40. define Package/libucode/description
  41. The libucode package provides the shared runtime library for the ucode interpreter.
  42. endef
  43. define Package/ucode-mod-fs
  44. $(Package/ucode/default)
  45. TITLE+= (filesystem module)
  46. DEPENDS:=ucode
  47. endef
  48. define Package/ucode-mod-fs/description
  49. The filesystem plugin module allows interaction with the local file system.
  50. endef
  51. define Package/ucode-mod-math
  52. $(Package/ucode/default)
  53. TITLE+= (math module)
  54. DEPENDS:=ucode
  55. endef
  56. define Package/ucode-mod-math/description
  57. The math plugin provides access to various <math.h> procedures.
  58. endef
  59. define Package/ucode-mod-nl80211
  60. $(Package/ucode/default)
  61. TITLE+= (nl80211 module)
  62. DEPENDS:=ucode +libnl-tiny
  63. endef
  64. define Package/ucode-mod-nl80211/description
  65. The nl80211 plugin provides access to the Linux wireless 802.11 netlink API.
  66. endef
  67. define Package/ucode-mod-resolv
  68. $(Package/ucode/default)
  69. TITLE+= (resolv module)
  70. DEPENDS:=ucode
  71. endef
  72. define Package/ucode-mod-resolv/description
  73. The resolv plugin implements simple DNS resolving.
  74. endef
  75. define Package/ucode-mod-rtnl
  76. $(Package/ucode/default)
  77. TITLE+= (rtnl module)
  78. DEPENDS:=ucode +libnl-tiny
  79. endef
  80. define Package/ucode-mod-rtnl/description
  81. The rtnl plugin provides access to the Linux routing netlink API.
  82. endef
  83. define Package/ucode-mod-struct
  84. $(Package/ucode/default)
  85. TITLE+= (struct module)
  86. DEPENDS:=ucode
  87. endef
  88. define Package/ucode-mod-struct/description
  89. The struct plugin implemnts Python 3 compatible struct.pack/unpack functionality.
  90. endef
  91. define Package/ucode-mod-ubus
  92. $(Package/ucode/default)
  93. TITLE+= (ubus module)
  94. DEPENDS:=ucode +libubus +libblobmsg-json
  95. endef
  96. define Package/ucode-mod-ubus/description
  97. The ubus module allows ucode template scripts to enumerate and invoke ubus
  98. procedures.
  99. endef
  100. define Package/ucode-mod-uci
  101. $(Package/ucode/default)
  102. TITLE+= (uci module)
  103. DEPENDS:=ucode +libuci
  104. endef
  105. define Package/ucode-mod-uci/description
  106. The uci module allows templates to read and modify uci configuration.
  107. endef
  108. define Build/InstallDev
  109. $(INSTALL_DIR) $(1)/usr/lib $(1)/usr/include/ucode
  110. $(CP) $(PKG_INSTALL_DIR)/usr/include/ucode/*.h $(1)/usr/include/ucode/
  111. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libucode.so* $(1)/usr/lib/
  112. endef
  113. define Package/ucode/install
  114. $(INSTALL_DIR) $(1)/usr/bin
  115. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ucode $(1)/usr/bin/ucode
  116. endef
  117. define Package/libucode/install
  118. $(INSTALL_DIR) $(1)/usr/lib
  119. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libucode.so.* $(1)/usr/lib/
  120. endef
  121. define Package/ucode-mod-fs/install
  122. $(INSTALL_DIR) $(1)/usr/lib/ucode
  123. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/ucode/fs.so $(1)/usr/lib/ucode/
  124. endef
  125. define Package/ucode-mod-math/install
  126. $(INSTALL_DIR) $(1)/usr/lib/ucode
  127. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/ucode/math.so $(1)/usr/lib/ucode/
  128. endef
  129. define Package/ucode-mod-nl80211/install
  130. $(INSTALL_DIR) $(1)/usr/lib/ucode
  131. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/ucode/nl80211.so $(1)/usr/lib/ucode/
  132. endef
  133. define Package/ucode-mod-resolv/install
  134. $(INSTALL_DIR) $(1)/usr/lib/ucode
  135. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/ucode/resolv.so $(1)/usr/lib/ucode/
  136. endef
  137. define Package/ucode-mod-rtnl/install
  138. $(INSTALL_DIR) $(1)/usr/lib/ucode
  139. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/ucode/rtnl.so $(1)/usr/lib/ucode/
  140. endef
  141. define Package/ucode-mod-struct/install
  142. $(INSTALL_DIR) $(1)/usr/lib/ucode
  143. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/ucode/struct.so $(1)/usr/lib/ucode/
  144. endef
  145. define Package/ucode-mod-ubus/install
  146. $(INSTALL_DIR) $(1)/usr/lib/ucode
  147. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/ucode/ubus.so $(1)/usr/lib/ucode/
  148. endef
  149. define Package/ucode-mod-uci/install
  150. $(INSTALL_DIR) $(1)/usr/lib/ucode
  151. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/ucode/uci.so $(1)/usr/lib/ucode/
  152. endef
  153. $(eval $(call BuildPackage,ucode))
  154. $(eval $(call BuildPackage,libucode))
  155. $(eval $(call BuildPackage,ucode-mod-fs))
  156. $(eval $(call BuildPackage,ucode-mod-math))
  157. $(eval $(call BuildPackage,ucode-mod-nl80211))
  158. $(eval $(call BuildPackage,ucode-mod-resolv))
  159. $(eval $(call BuildPackage,ucode-mod-rtnl))
  160. $(eval $(call BuildPackage,ucode-mod-struct))
  161. $(eval $(call BuildPackage,ucode-mod-ubus))
  162. $(eval $(call BuildPackage,ucode-mod-uci))