Makefile 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  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:=2021-10-25
  13. PKG_SOURCE_VERSION:=a7976c2802a9da737f62bec496c7115211c442a7
  14. PKG_MIRROR_HASH:=6bc3ddeef41d68fd96894957356472e576c625fcf7277cbb36aa464b8d3c274d
  15. PKG_MAINTAINER:=Jo-Philipp Wich <[email protected]>
  16. PKG_LICENSE:=ISC
  17. PKG_ABI_VERSION:=20210730
  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-ubus
  84. $(Package/ucode/default)
  85. TITLE+= (ubus module)
  86. DEPENDS:=ucode +libubus +libblobmsg-json
  87. endef
  88. define Package/ucode-mod-ubus/description
  89. The ubus module allows ucode template scripts to enumerate and invoke ubus
  90. procedures.
  91. endef
  92. define Package/ucode-mod-uci
  93. $(Package/ucode/default)
  94. TITLE+= (uci module)
  95. DEPENDS:=ucode +libuci
  96. endef
  97. define Package/ucode-mod-uci/description
  98. The uci module allows templates to read and modify uci configuration.
  99. endef
  100. define Build/InstallDev
  101. $(INSTALL_DIR) $(1)/usr/lib $(1)/usr/include/ucode
  102. $(CP) $(PKG_INSTALL_DIR)/usr/include/ucode/*.h $(1)/usr/include/ucode/
  103. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libucode.so* $(1)/usr/lib/
  104. endef
  105. define Package/ucode/install
  106. $(INSTALL_DIR) $(1)/usr/bin
  107. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ucode $(1)/usr/bin/ucode
  108. endef
  109. define Package/libucode/install
  110. $(INSTALL_DIR) $(1)/usr/lib
  111. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libucode.so.* $(1)/usr/lib/
  112. endef
  113. define Package/ucode-mod-fs/install
  114. $(INSTALL_DIR) $(1)/usr/lib/ucode
  115. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/ucode/fs.so $(1)/usr/lib/ucode/
  116. endef
  117. define Package/ucode-mod-math/install
  118. $(INSTALL_DIR) $(1)/usr/lib/ucode
  119. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/ucode/math.so $(1)/usr/lib/ucode/
  120. endef
  121. define Package/ucode-mod-nl80211/install
  122. $(INSTALL_DIR) $(1)/usr/lib/ucode
  123. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/ucode/nl80211.so $(1)/usr/lib/ucode/
  124. endef
  125. define Package/ucode-mod-resolv/install
  126. $(INSTALL_DIR) $(1)/usr/lib/ucode
  127. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/ucode/resolv.so $(1)/usr/lib/ucode/
  128. endef
  129. define Package/ucode-mod-rtnl/install
  130. $(INSTALL_DIR) $(1)/usr/lib/ucode
  131. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/ucode/rtnl.so $(1)/usr/lib/ucode/
  132. endef
  133. define Package/ucode-mod-ubus/install
  134. $(INSTALL_DIR) $(1)/usr/lib/ucode
  135. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/ucode/ubus.so $(1)/usr/lib/ucode/
  136. endef
  137. define Package/ucode-mod-uci/install
  138. $(INSTALL_DIR) $(1)/usr/lib/ucode
  139. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/ucode/uci.so $(1)/usr/lib/ucode/
  140. endef
  141. $(eval $(call BuildPackage,ucode))
  142. $(eval $(call BuildPackage,libucode))
  143. $(eval $(call BuildPackage,ucode-mod-fs))
  144. $(eval $(call BuildPackage,ucode-mod-math))
  145. $(eval $(call BuildPackage,ucode-mod-nl80211))
  146. $(eval $(call BuildPackage,ucode-mod-resolv))
  147. $(eval $(call BuildPackage,ucode-mod-rtnl))
  148. $(eval $(call BuildPackage,ucode-mod-ubus))
  149. $(eval $(call BuildPackage,ucode-mod-uci))