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-10-25
16 PKG_SOURCE_VERSION
:=a7976c2802a9da737f62bec496c7115211c442a7
17 PKG_MIRROR_HASH
:=6bc3ddeef41d68fd96894957356472e576c625fcf7277cbb36aa464b8d3c274d
18 PKG_MAINTAINER
:=Jo-Philipp Wich
<jo@mein.io
>
21 PKG_ABI_VERSION
:=20210730
23 include $(INCLUDE_DIR
)/package.mk
24 include $(INCLUDE_DIR
)/cmake.mk
26 CMAKE_OPTIONS
+= -DSOVERSION
=$(PKG_ABI_VERSION
)
28 define Package
/ucode
/default
31 TITLE
:=ucode
- Tiny scripting and templating language
35 $(Package
/ucode
/default
)
39 define Package
/ucode
/description
40 ucode is a tiny script interpreter featuring an ECMAScript oriented
41 script language and Jinja-inspired templating.
45 define Package
/libucode
46 $(Package
/ucode
/default
)
47 TITLE
+= - runtime library
48 ABI_VERSION
:=$(PKG_ABI_VERSION
)
52 define Package
/libucode
/description
53 The libucode package provides the shared runtime library for the ucode interpreter.
57 define Package
/ucode-mod-fs
58 $(Package
/ucode
/default
)
59 TITLE
+= (filesystem module
)
63 define Package
/ucode-mod-fs
/description
64 The filesystem plugin module allows interaction with the local file system.
68 define Package
/ucode-mod-math
69 $(Package
/ucode
/default
)
74 define Package
/ucode-mod-math
/description
75 The math plugin provides access to various
<math.h
> procedures.
79 define Package
/ucode-mod-nl80211
80 $(Package
/ucode
/default
)
81 TITLE
+= (nl80211 module
)
82 DEPENDS
:=ucode
+libnl-tiny
85 define Package
/ucode-mod-nl80211
/description
86 The nl80211 plugin provides access to the Linux wireless
802.11 netlink API.
90 define Package
/ucode-mod-resolv
91 $(Package
/ucode
/default
)
92 TITLE
+= (resolv module
)
96 define Package
/ucode-mod-resolv
/description
97 The resolv plugin implements simple DNS resolving.
101 define Package
/ucode-mod-rtnl
102 $(Package
/ucode
/default
)
103 TITLE
+= (rtnl module
)
104 DEPENDS
:=ucode
+libnl-tiny
107 define Package
/ucode-mod-rtnl
/description
108 The rtnl plugin provides access to the Linux routing netlink API.
112 define Package
/ucode-mod-ubus
113 $(Package
/ucode
/default
)
114 TITLE
+= (ubus module
)
115 DEPENDS
:=ucode
+libubus
+libblobmsg-json
118 define Package
/ucode-mod-ubus
/description
119 The ubus module allows ucode template scripts to enumerate and invoke ubus
124 define Package
/ucode-mod-uci
125 $(Package
/ucode
/default
)
127 DEPENDS
:=ucode
+libuci
130 define Package
/ucode-mod-uci
/description
131 The uci module allows templates to read and modify uci configuration.
135 define Build
/InstallDev
136 $(INSTALL_DIR
) $(1)/usr
/lib
$(1)/usr
/include/ucode
137 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/ucode
/*.h
$(1)/usr
/include/ucode
/
138 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libucode.so
* $(1)/usr
/lib
/
142 define Package
/ucode
/install
143 $(INSTALL_DIR
) $(1)/usr
/bin
144 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/ucode
$(1)/usr
/bin
/ucode
147 define Package
/libucode
/install
148 $(INSTALL_DIR
) $(1)/usr
/lib
149 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libucode.so.
* $(1)/usr
/lib
/
152 define Package
/ucode-mod-fs
/install
153 $(INSTALL_DIR
) $(1)/usr
/lib
/ucode
154 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/lib
/ucode
/fs.so
$(1)/usr
/lib
/ucode
/
157 define Package
/ucode-mod-math
/install
158 $(INSTALL_DIR
) $(1)/usr
/lib
/ucode
159 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/lib
/ucode
/math.so
$(1)/usr
/lib
/ucode
/
162 define Package
/ucode-mod-nl80211
/install
163 $(INSTALL_DIR
) $(1)/usr
/lib
/ucode
164 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/lib
/ucode
/nl80211.so
$(1)/usr
/lib
/ucode
/
167 define Package
/ucode-mod-resolv
/install
168 $(INSTALL_DIR
) $(1)/usr
/lib
/ucode
169 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/lib
/ucode
/resolv.so
$(1)/usr
/lib
/ucode
/
172 define Package
/ucode-mod-rtnl
/install
173 $(INSTALL_DIR
) $(1)/usr
/lib
/ucode
174 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/lib
/ucode
/rtnl.so
$(1)/usr
/lib
/ucode
/
177 define Package
/ucode-mod-ubus
/install
178 $(INSTALL_DIR
) $(1)/usr
/lib
/ucode
179 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/lib
/ucode
/ubus.so
$(1)/usr
/lib
/ucode
/
182 define Package
/ucode-mod-uci
/install
183 $(INSTALL_DIR
) $(1)/usr
/lib
/ucode
184 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/lib
/ucode
/uci.so
$(1)/usr
/lib
/ucode
/
188 $(eval
$(call BuildPackage
,ucode
))
189 $(eval
$(call BuildPackage
,libucode
))
190 $(eval
$(call BuildPackage
,ucode-mod-fs
))
191 $(eval
$(call BuildPackage
,ucode-mod-math
))
192 $(eval
$(call BuildPackage
,ucode-mod-nl80211
))
193 $(eval
$(call BuildPackage
,ucode-mod-resolv
))
194 $(eval
$(call BuildPackage
,ucode-mod-rtnl
))
195 $(eval
$(call BuildPackage
,ucode-mod-ubus
))
196 $(eval
$(call BuildPackage
,ucode-mod-uci
))