2 # Copyright (C) 2006-2016 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
7 # No copyright by Harald Geyer as filling in a template doesn't constitute
8 # an original work in the sense of copyright law.
10 include $(TOPDIR
)/rules.mk
12 PKG_MAINTAINER
:=Harald Geyer
<harald@ccbib.org
>
15 PKG_LICENSE
:=BSD-3-Clause
16 PKG_LICENSE_FILES
:=LICENSE.md
20 # Use this for official releasees
21 PKG_HASH
:=12b7b046004db29317b7b937dc794abf719c400ba3115af8d41849127b562681
22 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
23 PKG_SOURCE_URL
:=http
://ftp.libelektra.org
/ftp
/elektra
/releases
25 # Use this to test versions still under development
26 #PKG_SOURCE_PROTO:=git
27 #PKG_SOURCE_URL:=https://github.com/ElektraInitiative/libelektra.git
28 #PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
29 #PKG_SOURCE_VERSION:=e97efb29a94f3a49cb952d06552fcf53708ea8c7
30 #PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
32 PKG_BUILD_DEPENDS
:= lua
34 include $(INCLUDE_DIR
)/package.mk
35 include $(INCLUDE_DIR
)/cmake.mk
36 include $(INCLUDE_DIR
)/nls.mk
38 define Package
/libelektra
/Default
42 URL
:=http
://www.libelektra.org
/
46 define Package
/libelektra
/Default-description
47 Elektra provides an universal and secure framework to store
48 configuration parameters in a global
, hierarchical key database.
51 define Package
/libelektra-core
52 $(call Package
/libelektra
/Default
)
53 TITLE
:=Elektra core library
57 define Package
/libelektra-core
/description
58 $(call Package
/libelektra
/Default-description
)
60 This package contains the core libraries
, that
all other parts of
61 elektra and
all programs using elektra depend on
, and an almost
62 minimal set of plugins to be actually useful.
65 define Package
/elektra-kdb
68 TITLE
:=Elektra kdb tool
69 URL
:=http
://www.libelektra.org
/
70 DEPENDS
:=+libelektra-core
+libstdcpp
73 define Package
/elektra-kdb
/description
74 $(call Package
/libelektra
/Default-description
)
76 This package contains the kdb tool
, which allows to access and change
77 the content of the key database from the
shell.
80 define Package
/libelektra-resolvers
81 $(call Package
/libelektra
/Default
)
82 TITLE
:=Elektra additional resolvers
83 DEPENDS
:=+libelektra-core
+libpthread
86 define Package
/libelektra-resolvers
/description
87 $(call Package
/libelektra
/Default-description
)
89 This package contains additional resolvers not included in the
90 libelektra-core package. Usually there is no reason to
install this.
93 define Package
/libelektra-plugins
94 $(call Package
/libelektra
/Default
)
95 TITLE
:=Useful elektra plugins
96 DEPENDS
:=+libelektra-core
$(ICONV_DEPENDS
)
99 define CONTENT_ELEKTRA_PLUGINS_TEXT
100 base64 conditionals csvstorage date file filecheck glob hexcode
101 hexnumber hosts iconv ipaddr keytometa line lineendings list
102 mathcheck macaddr mini network path profile quickdump
103 range reference rgbcolor
shell syslog type uname unit validation
106 CONTENT_ELEKTRA_PLUGINS
= $(strip $(CONTENT_ELEKTRA_PLUGINS_TEXT
))
108 define Package
/libelektra-plugins
/description
109 $(call Package
/libelektra
/Default-description
)
111 This package contains plugins for various common configuration file
112 format and optional features without heavy dependencies. Currently
113 these plugins are included
:
114 $(CONTENT_ELEKTRA_PLUGINS_TEXT
)
117 define Package
/libelektra-cpp
118 $(call Package
/libelektra
/Default
)
119 TITLE
:=Elektra plugins depending on libstdcpp
120 DEPENDS
:=+libelektra-core
+libstdcpp
123 CONTENT_ELEKTRA_CPP
=ccode directoryvalue dump
125 define Package
/libelektra-cpp
/description
126 $(call Package
/libelektra
/Default-description
)
128 This package contains plugins written in C
++.
130 $(CONTENT_ELEKTRA_CPP
)
133 define Package
/libelektra-crypto
134 $(call Package
/libelektra
/Default
)
135 TITLE
:=Elektra crypto plugin
136 DEPENDS
:=+libelektra-core
+libgcrypt
139 define Package
/libelektra-crypto
/description
140 $(call Package
/libelektra
/Default-description
)
142 This package contains support for encrypting values before storage.
145 define Package
/libelektra-curlget
146 $(call Package
/libelektra
/Default
)
147 TITLE
:=Elektra curlget plugin
148 DEPENDS
:=+libelektra-core
+libcurl
+libopenssl
151 define Package
/libelektra-curlget
/description
152 $(call Package
/libelektra
/Default-description
)
154 This plugin can
get configuration data from remote URLs before access.
157 define Package
/libelektra-dbus
158 $(call Package
/libelektra
/Default
)
159 TITLE
:=Elektra dbus plugin
160 DEPENDS
:=+libelektra-core
+libdbus
163 define Package
/libelektra-dbus
/description
164 $(call Package
/libelektra
/Default-description
)
166 This package contains support for dbus notification on configuration
170 define Package
/libelektra-ev
171 $(call Package
/libelektra
/Default
)
172 TITLE
:=Elektra libev binding plugin
173 DEPENDS
:=+libelektra-core
+libev
176 define Package
/libelektra-ev
/description
177 $(call Package
/libelektra
/Default-description
)
179 This package contains support for notification on configuration
180 changes via libev events.
183 define Package
/libelektra-uv
184 $(call Package
/libelektra
/Default
)
185 TITLE
:=Elektra libuv binding plugin
186 DEPENDS
:=+libelektra-core
+libuv
189 define Package
/libelektra-uv
/description
190 $(call Package
/libelektra
/Default-description
)
192 This package contains support for notification on configuration
193 changes via libuv events.
196 define Package
/libelektra-xerces
197 $(call Package
/libelektra
/Default
)
198 TITLE
:=Elektra xerces based xml plugin
199 DEPENDS
:=+libelektra-core
+libstdcpp
+libxerces-c
202 define Package
/libelektra-xerces
/description
203 $(call Package
/libelektra
/Default-description
)
205 The xerces plugin supplants the xmltool plugin
206 and allows us to use XML files not following a specific schemata.
207 Attributes are mapped to Elektra
's metadata, multiple keys with the
208 same names are mapped to arrays.
211 define Package/libelektra-xml
212 $(call Package/libelektra/Default)
213 TITLE:=Elektra xmltool plugin
214 DEPENDS:=+libelektra-core +libxml2
217 define Package/libelektra-xml/description
218 $(call Package/libelektra/Default-description)
220 This package contains a plugin for storing data with xml syntax.
223 define Package/libelektra-yajl
224 $(call Package/libelektra/Default)
225 TITLE:=Elektra yajl (json) plugin
226 DEPENDS:=+libelektra-core +yajl
229 define Package/libelektra-yajl/description
230 $(call Package/libelektra/Default-description)
232 This package contains support for storing the key database as json files.
235 define Package/libelektra-yamlcpp
236 $(call Package/libelektra/Default)
237 TITLE:=Elektra yaml plugin
238 DEPENDS:=+libelektra-core +libyaml-cpp
241 define Package/libelektra-yamlcpp/description
242 $(call Package/libelektra/Default-description)
244 This package contains support for storing the key database as yaml files.
247 define Package/libelektra-zmq
248 $(call Package/libelektra/Default)
249 TITLE:=Elektra ZeroMQ transport plugins
250 DEPENDS:=+libelektra-core +libzmq
253 define Package/libelektra-python3
254 $(call Package/libelektra/Default)
255 TITLE:=Elektra python3 plugin
256 DEPENDS:=+libelektra-core +python3-light +libstdcpp
259 define Package/libelektra-python3/description
260 $(call Package/libelektra/Default-description)
262 This package adds python3 support to elektra.
265 define Package/libelektra-lua
266 $(call Package/libelektra/Default)
267 TITLE:=Elektra lua plugin
268 DEPENDS:=+libelektra-core +lua5.3 +libstdcpp
271 define Package/libelektra-lua/description
272 $(call Package/libelektra/Default-description)
274 This package adds lua support to elektra.
277 define Package/libelektra-extra
278 $(call Package/libelektra/Default)
279 TITLE:=Additional elektra plugins
280 DEPENDS:=+libelektra-core +libstdcpp
283 define CONTENT_EXTRA_PLUGINS_TEXT
284 blockresolver c constants counter desktop dpkg error fcrypt
285 fstab logchange mozprefs passwd process rename
289 CONTENT_ELEKTRA_EXTRA:=$(strip $(CONTENT_EXTRA_PLUGINS_TEXT))
291 define Package/libelektra-extra/description
292 $(call Package/libelektra/Default-description)
294 This package contains extra plugins that are only useful for debugging
295 or as an example of what can be done. Also most experimental plugins
296 are included in this package. Currently this includes:
297 $(CONTENT_EXTRA_PLUGINS_TEXT)
300 CMAKE_BINARY_SUBDIR=build
303 -DTARGET_PLUGIN_FOLDER="" \
304 -DCARGO_EXECUTABLE=OFF \
307 -DBUILD_DOCUMENTATION=OFF \
308 -DFORCE_IN_SOURCE_BUILD=ON \
309 -DBUILD_TESTING=OFF \
310 -DKDB_DEFAULT_RESOLVER=resolver_fm_pb_b \
311 -DKDB_DEFAULT_STORAGE=toml \
312 -DENABLE_OPTIMIZATIONS=OFF \
313 -DPLUGINS="ALL;-gpgme;-multifile;-simpleini" \
314 -DBINDINGS="MAINTAINED;-intercept_env;-intercept_fs;-io_glib"
316 define Package/libelektra-core/install
317 $(INSTALL_DIR) $(1)/etc/kdb/
318 $(INSTALL_DIR) $(1)/etc/profile.d/
319 $(INSTALL_DIR) $(1)/usr/lib/
320 $(INSTALL_DATA) files/elektra.profile $(1)/etc/profile.d/elektra.sh
321 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-core.so* $(1)/usr/lib/
322 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-ease.so* $(1)/usr/lib/
323 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-globbing.so* $(1)/usr/lib/
324 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-highlevel.so* $(1)/usr/lib/
325 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-invoke.so* $(1)/usr/lib/
326 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-io.so* $(1)/usr/lib/
327 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-kdb.so* $(1)/usr/lib/
328 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-merge.so* $(1)/usr/lib/
329 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-meta.so* $(1)/usr/lib/
330 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-notification.so* $(1)/usr/lib/
331 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-opts.so* $(1)/usr/lib/
332 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-plugin.so* $(1)/usr/lib/
333 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-pluginprocess.so* $(1)/usr/lib/
334 #The next is only supported with glibc, so skip it.
335 #$(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektraintercept-* $(1)/usr/lib/
336 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-resolver_fm_pb_b.so $(1)/usr/lib/
337 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-utility.so* $(1)/usr/lib/
338 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-cache.so $(1)/usr/lib/
339 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-internalnotification.so $(1)/usr/lib/
340 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-mmapstorage.so $(1)/usr/lib/
341 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-ni.so $(1)/usr/lib/
342 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-spec.so $(1)/usr/lib/
343 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-sync.so $(1)/usr/lib/
344 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-storage.so $(1)/usr/lib/
345 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-toml.so $(1)/usr/lib/
346 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-resolver.so $(1)/usr/lib/
349 define Package/elektra-kdb/install
350 $(INSTALL_DIR) $(1)/usr/bin/
351 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/kdb $(1)/usr/bin
352 $(INSTALL_DIR) $(1)/usr/lib/elektra/
353 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektratools* $(1)/usr/lib/
354 $(CP) $(PKG_INSTALL_DIR)/usr/lib/elektra/tool_exec/ $(1)/usr/lib/elektra/
357 define Package/libelektra-resolvers/install
358 $(INSTALL_DIR) $(1)/usr/lib/
359 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-resolver_* $(1)/usr/lib/
360 rm -f $(1)/usr/lib/libelektra-resolver_fm_pb_b.so
361 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-wresolver.so $(1)/usr/lib/
362 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-noresolver.so $(1)/usr/lib/
365 define Package/libelektra-plugins/install
366 $(INSTALL_DIR) $(1)/usr/lib/
367 $(CP) $(foreach plugin,$(CONTENT_ELEKTRA_PLUGINS),$(PKG_INSTALL_DIR)/usr/lib/libelektra-$(plugin).so) $(1)/usr/lib/
370 define Package/libelektra-cpp/install
371 $(INSTALL_DIR) $(1)/usr/lib/
372 $(CP) $(foreach plugin,$(CONTENT_ELEKTRA_CPP),$(PKG_INSTALL_DIR)/usr/lib/libelektra-$(plugin).so) $(1)/usr/lib/
375 define Package/libelektra-crypto/install
376 $(INSTALL_DIR) $(1)/usr/lib/
377 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-crypto.so $(1)/usr/lib/
380 define Package/libelektra-curlget/install
381 $(INSTALL_DIR) $(1)/usr/lib/
382 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-curlget.so $(1)/usr/lib/
385 define Package/libelektra-dbus/install
386 $(INSTALL_DIR) $(1)/usr/lib/
387 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-dbus.so $(1)/usr/lib/
388 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-dbusrecv.so $(1)/usr/lib/
391 define Package/libelektra-ev/install
392 $(INSTALL_DIR) $(1)/usr/lib/
393 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-io-ev.so $(1)/usr/lib/
396 define Package/libelektra-uv/install
397 $(INSTALL_DIR) $(1)/usr/lib/
398 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-io-uv.so $(1)/usr/lib/
401 define Package/libelektra-xerces/install
402 $(INSTALL_DIR) $(1)/usr/lib/
403 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-xerces.so $(1)/usr/lib/
406 define Package/libelektra-xml/install
407 $(INSTALL_DIR) $(1)/usr/lib/
408 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-xmltool.so $(1)/usr/lib/
411 define Package/libelektra-yajl/install
412 $(INSTALL_DIR) $(1)/usr/lib/
413 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-yajl.so $(1)/usr/lib/
416 define Package/libelektra-yamlcpp/install
417 $(INSTALL_DIR) $(1)/usr/lib/
418 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-yamlcpp.so $(1)/usr/lib/
421 define Package/libelektra-zmq/install
422 $(INSTALL_DIR) $(1)/usr/lib/
423 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-zeromqsend.so $(1)/usr/lib/
424 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-zeromqrecv.so $(1)/usr/lib/
427 define Package/libelektra-python3/install
428 $(INSTALL_DIR) $(1)/usr/lib/
429 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-python.so $(1)/usr/lib/
432 define Package/libelektra-lua/install
433 $(INSTALL_DIR) $(1)/usr/lib/
434 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-lua.so $(1)/usr/lib/
437 define Package/libelektra-extra/install
438 $(INSTALL_DIR) $(1)/usr/lib/
439 $(CP) $(foreach plugin,$(CONTENT_ELEKTRA_EXTRA),$(PKG_INSTALL_DIR)/usr/lib/libelektra-$(plugin).so) $(1)/usr/lib/
442 define Build/InstallDev
443 $(INSTALL_DIR) $(1)/usr/include/elektra/
444 $(CP) $(PKG_INSTALL_DIR)/usr/include/elektra/* $(1)/usr/include/elektra/
445 $(INSTALL_DIR) $(1)/usr/lib/
446 $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
449 $(eval $(call BuildPackage,libelektra-core))
450 $(eval $(call BuildPackage,elektra-kdb))
451 $(eval $(call BuildPackage,libelektra-resolvers))
452 $(eval $(call BuildPackage,libelektra-plugins))
453 $(eval $(call BuildPackage,libelektra-cpp))
454 $(eval $(call BuildPackage,libelektra-curlget))
455 $(eval $(call BuildPackage,libelektra-crypto))
456 $(eval $(call BuildPackage,libelektra-dbus))
457 $(eval $(call BuildPackage,libelektra-ev))
458 $(eval $(call BuildPackage,libelektra-uv))
459 $(eval $(call BuildPackage,libelektra-xerces))
460 $(eval $(call BuildPackage,libelektra-xml))
461 $(eval $(call BuildPackage,libelektra-yajl))
462 $(eval $(call BuildPackage,libelektra-yamlcpp))
463 $(eval $(call BuildPackage,libelektra-python3))
464 $(eval $(call BuildPackage,libelektra-lua))
465 $(eval $(call BuildPackage,libelektra-zmq))
466 $(eval $(call BuildPackage,libelektra-extra))