2 # Copyright (C) 2020-2021 Jo-Philipp Wich <jo@mein.io>
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
14 PKG_SOURCE_URL
=https
://github.com
/jow-
/ucode.git
15 PKG_SOURCE_DATE
:=2021-03-29
16 PKG_SOURCE_VERSION
:=aa9621db401e881ffcdea03be272c94149484ccf
17 PKG_MIRROR_HASH
:=11b7de10e6ab91742d8a633a0030dde86118ffe73031cdf9c192cb3fded97a20
18 PKG_MAINTAINER
:=Jo-Philipp Wich
<jo@mein.io
>
21 include $(INCLUDE_DIR
)/package.mk
22 include $(INCLUDE_DIR
)/cmake.mk
24 define Package
/ucode
/default
27 TITLE
:=ucode
- Tiny scripting and templating language
31 $(Package
/ucode
/default
)
35 define Package
/ucode
/description
36 ucode is a tiny script interpreter featuring an ECMAScript oriented
37 script language and Jinja-inspired templating.
41 define Package
/ucode-mod-fs
42 $(Package
/ucode
/default
)
43 TITLE
+= (filesystem module
)
47 define Package
/ucode-mod-fs
/description
48 The filesystem plugin module allows interaction with the local file system.
52 define Package
/ucode-mod-math
53 $(Package
/ucode
/default
)
58 define Package
/ucode-mod-math
/description
59 The math plugin provides access to various
<math.h
> procedures.
63 define Package
/ucode-mod-ubus
64 $(Package
/ucode
/default
)
66 DEPENDS
:=ucode
+libubus
+libblobmsg-json
69 define Package
/ucode-mod-ubus
/description
70 The ubus module allows ucode template scripts to enumerate and invoke ubus
75 define Package
/ucode-mod-uci
76 $(Package
/ucode
/default
)
78 DEPENDS
:=ucode
+libuci
81 define Package
/ucode-mod-uci
/description
82 The uci module allows templates to read and modify uci configuration.
86 define Package
/ucode
/install
87 $(INSTALL_DIR
) $(1)/usr
/bin
88 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/ucode
$(1)/usr
/bin
/ucode
91 define Package
/ucode-mod-fs
/install
92 $(INSTALL_DIR
) $(1)/usr
/lib
/ucode
93 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/lib
/fs.so
$(1)/usr
/lib
/ucode
/
96 define Package
/ucode-mod-math
/install
97 $(INSTALL_DIR
) $(1)/usr
/lib
/ucode
98 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/lib
/math.so
$(1)/usr
/lib
/ucode
/
101 define Package
/ucode-mod-ubus
/install
102 $(INSTALL_DIR
) $(1)/usr
/lib
/ucode
103 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/lib
/ubus.so
$(1)/usr
/lib
/ucode
/
106 define Package
/ucode-mod-uci
/install
107 $(INSTALL_DIR
) $(1)/usr
/lib
/ucode
108 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/lib
/uci.so
$(1)/usr
/lib
/ucode
/
112 $(eval
$(call BuildPackage
,ucode
))
113 $(eval
$(call BuildPackage
,ucode-mod-fs
))
114 $(eval
$(call BuildPackage
,ucode-mod-math
))
115 $(eval
$(call BuildPackage
,ucode-mod-ubus
))
116 $(eval
$(call BuildPackage
,ucode-mod-uci
))