prometheus-node-exporter-lua: add dawn exporter
[feed/packages.git] / libs / elektra / Makefile
1 #
2 # Copyright (C) 2006-2016 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # No copyright by Harald Geyer as filling in a template doesn't constitute
8 # an original work in the sense of copyright law.
9
10 include $(TOPDIR)/rules.mk
11
12 PKG_MAINTAINER:=Harald Geyer <harald@ccbib.org>
13
14 PKG_NAME:=elektra
15 PKG_LICENSE:=BSD-3-Clause
16 PKG_LICENSE_FILES:=LICENSE.md
17 PKG_VERSION:=0.8.21
18 PKG_RELEASE:=5
19
20 # Use this for official releasees
21 PKG_HASH:=51892570f18d1667d0da4d0908a091e41b41c20db9835765677109a3d150cd26
22 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
23 PKG_SOURCE_URL:=http://ftp.libelektra.org/ftp/elektra/releases
24
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
31
32 HOST_BUILD_DEPENDS:=swig/host
33 PKG_BUILD_DEPENDS:=elektra/host lua
34
35 include $(INCLUDE_DIR)/package.mk
36 include $(INCLUDE_DIR)/host-build.mk
37 include $(INCLUDE_DIR)/cmake.mk
38 include $(INCLUDE_DIR)/nls.mk
39
40 define Package/libelektra/Default
41 SECTION:=libs
42 CATEGORY:=Libraries
43 TITLE:=Elektra
44 URL:=http://www.libelektra.org/
45 SUBMENU:=LibElektra
46 endef
47
48 define Package/libelektra/Default-description
49 Elektra provides an universal and secure framework to store
50 configuration parameters in a global, hierarchical key database.
51 endef
52
53 define Package/libelektra-core
54 $(call Package/libelektra/Default)
55 TITLE:=Elektra core library
56 DEPENDS:=+libpthread
57 endef
58
59 define Package/libelektra-core/description
60 $(call Package/libelektra/Default-description)
61
62 This package contains the core libraries, that all other parts of
63 elektra and all programs using elektra depend on, and an almost
64 minimal set of plugins to be actually useful.
65 endef
66
67 define Package/elektra-kdb
68 SECTION:=utils
69 CATEGORY:=Utilities
70 TITLE:=Elektra kdb tool
71 URL:=http://www.libelektra.org/
72 DEPENDS:=+libelektra-core +libstdcpp
73 endef
74
75 define Package/elektra-kdb/description
76 $(call Package/libelektra/Default-description)
77
78 This package contains the kdb tool, which allows to access and change
79 the content of the key database from the shell.
80 endef
81
82 define Package/libelektra-resolvers
83 $(call Package/libelektra/Default)
84 TITLE:=Elektra additional resolvers
85 DEPENDS:=+libelektra-core +libpthread
86 endef
87
88 define Package/libelektra-resolvers/description
89 $(call Package/libelektra/Default-description)
90
91 This package contains additional resolvers not included in the
92 libelektra-core package. Usually there is no reason to install this.
93 endef
94
95 define Package/libelektra-plugins
96 $(call Package/libelektra/Default)
97 TITLE:=Useful elektra plugins
98 DEPENDS:=+libelektra-core $(ICONV_DEPENDS)
99 endef
100
101 define CONTENT_ELEKTRA_PLUGINS_TEXT
102 base64 boolean cachefilter camel ccode conditionals csvstorage
103 date directoryvalue enum file filecheck glob hexcode hidden
104 hosts iconv ipaddr keytometa line lineendings list mathcheck
105 mini network null path profile range shell syslog uname
106 validation
107 endef
108
109 CONTENT_ELEKTRA_PLUGINS = $(strip $(CONTENT_ELEKTRA_PLUGINS_TEXT))
110
111 define Package/libelektra-plugins/description
112 $(call Package/libelektra/Default-description)
113
114 This package contains plugins for various common configuration file
115 format and optional features without heavy dependencies. Currently
116 these plugins are included:
117 $(CONTENT_ELEKTRA_PLUGINS_TEXT)
118 endef
119
120 define Package/libelektra-cpp
121 $(call Package/libelektra/Default)
122 TITLE:=Elektra plugins depending on libstdcpp
123 DEPENDS:=+libelektra-core +libstdcpp
124 endef
125
126 CONTENT_ELEKTRA_CPP=dump regexstore struct type
127
128 define Package/libelektra-cpp/description
129 $(call Package/libelektra/Default-description)
130
131 This package contains plugins written in C++.
132 Currently these are:
133 $(CONTENT_ELEKTRA_CPP)
134 endef
135
136 define Package/libelektra-boost
137 $(call Package/libelektra/Default)
138 TITLE:=Elektra plugins depending on boost
139 DEPENDS:=+libelektra-core +libstdcpp +boost
140 endef
141
142 define Package/libelektra-boost/description
143 $(call Package/libelektra/Default-description)
144
145 This package contains plugins written in C++ with an dependency on
146 boost. Currently this is a plugin for a tcl like format.
147 endef
148
149 define Package/libelektra-crypto
150 $(call Package/libelektra/Default)
151 TITLE:=Elektra crypto plugin
152 DEPENDS:=+libelektra-core +libopenssl
153 endef
154
155 define Package/libelektra-crypto/description
156 $(call Package/libelektra/Default-description)
157
158 This package contains support for encrypting values before storage.
159 endef
160
161 define Package/libelektra-curlget
162 $(call Package/libelektra/Default)
163 TITLE:=Elektra curlget plugin
164 DEPENDS:=+libelektra-core +libcurl +libopenssl
165 endef
166
167 define Package/libelektra-curlget/description
168 $(call Package/libelektra/Default-description)
169
170 This plugin can get configuration data from remote URLs before access.
171 endef
172
173 define Package/libelektra-dbus
174 $(call Package/libelektra/Default)
175 TITLE:=Elektra dbus plugin
176 DEPENDS:=+libelektra-core +libdbus
177 endef
178
179 define Package/libelektra-dbus/description
180 $(call Package/libelektra/Default-description)
181
182 This package contains support for dbus notification on configuration
183 changes.
184 endef
185
186 define Package/libelektra-xerces
187 $(call Package/libelektra/Default)
188 TITLE:=Elektra xerces based xml plugin
189 DEPENDS:=+libelektra-core +libstdcpp +libxerces-c
190 endef
191
192 define Package/libelektra-xerces/description
193 $(call Package/libelektra/Default-description)
194
195 The xerces plugin supplants the xmltool plugin
196 and allows us to use XML files not following a specific schemata.
197 Attributes are mapped to Elektra's metadata, multiple keys with the
198 same names are mapped to arrays.
199 endef
200
201 define Package/libelektra-xml
202 $(call Package/libelektra/Default)
203 TITLE:=Elektra xmltool plugin
204 DEPENDS:=+libelektra-core +libxml2
205 endef
206
207 define Package/libelektra-xml/description
208 $(call Package/libelektra/Default-description)
209
210 This package contains a plugin for storing data with xml syntax.
211 endef
212
213 define Package/libelektra-yajl
214 $(call Package/libelektra/Default)
215 TITLE:=Elektra yajl (json) plugin
216 DEPENDS:=+libelektra-core +yajl
217 endef
218
219 define Package/libelektra-yajl/description
220 $(call Package/libelektra/Default-description)
221
222 This package contains support for storing the key database as json files.
223 endef
224
225 define Package/libelektra-yamlcpp
226 $(call Package/libelektra/Default)
227 TITLE:=Elektra yaml plugin
228 DEPENDS:=+libelektra-core +libyaml-cpp
229 endef
230
231 define Package/libelektra-yamlcpp/description
232 $(call Package/libelektra/Default-description)
233
234 This package contains support for storing the key database as yaml files.
235 endef
236
237 define Package/libelektra-python3
238 $(call Package/libelektra/Default)
239 TITLE:=Elektra python3 plugin
240 DEPENDS:=+libelektra-core +python3-light +libstdcpp
241 endef
242
243 define Package/libelektra-python3/description
244 $(call Package/libelektra/Default-description)
245
246 This package adds python3 support to elektra.
247 endef
248
249 define Package/libelektra-lua
250 $(call Package/libelektra/Default)
251 TITLE:=Elektra lua plugin
252 DEPENDS:=+libelektra-core +lua5.3 +libstdcpp
253 endef
254
255 define Package/libelektra-lua/description
256 $(call Package/libelektra/Default-description)
257
258 This package adds lua support to elektra.
259 endef
260
261 define Package/libelektra-extra
262 $(call Package/libelektra/Default)
263 TITLE:=Additional elektra plugins
264 DEPENDS:=+libelektra-core +libstdcpp
265 endef
266
267 define CONTENT_EXTRA_PLUGINS_TEXT
268 blockresolver c constants counter desktop dini dpkg error
269 fcrypt fstab logchange mozprefs passwd rename required
270 simplespeclang timeofday tracer
271 endef
272
273 CONTENT_ELEKTRA_EXTRA:=$(strip $(CONTENT_EXTRA_PLUGINS_TEXT))
274
275 define Package/libelektra-extra/description
276 $(call Package/libelektra/Default-description)
277
278 This package contains extra plugins that are only useful for debugging
279 or as an example of what can be done. Also most experimental plugins
280 are included in this package. Currently this includes:
281 $(CONTENT_EXTRA_PLUGINS_TEXT)
282 endef
283
284 CMAKE_OPTIONS = \
285 -DTARGET_PLUGIN_FOLDER="" \
286 -DBUILD_FULL=OFF \
287 -DBUILD_STATIC=OFF \
288 -DBUILD_DOCUMENTATION=OFF \
289 -DFORCE_IN_SOURCE_BUILD=ON \
290 -DBUILD_TESTING=OFF \
291 -DKDB_DEFAULT_RESOLVER=resolver_fm_pb_b \
292 -DKDB_DEFAULT_STORAGE=ini \
293 -DENABLE_OPTIMIZATIONS=OFF \
294 -DPLUGINS="ALL;-multifile;-python2" \
295 -DICONV_FIND_REQUIRED=ON \
296 -DICONV_INCLUDE_DIR="$(ICONV_PREFIX)/include" \
297 -DICONV_LIBRARY="$(ICONV_PREFIX)/lib"
298
299 CMAKE_HOST_OPTIONS = \
300 -DCMAKE_SKIP_RPATH=FALSE \
301 -DCMAKE_INSTALL_RPATH=$(STAGING_DIR_HOST)/lib/ \
302 -DINSTALL_BUILD_TOOLS=ON \
303 -DBUILD_STATIC=OFF \
304 -DBUILD_DOCUMENTATION=OFF \
305 -DINSTALL_SYSTEM_FILES=OFF \
306 -DFORCE_IN_SOURCE_BUILD=ON \
307 -DBUILD_TESTING=OFF \
308 -DPLUGINS="ALL;-python2;-python;-ruby" \
309 -DTOOLS="gen;kdb"
310
311 define Package/libelektra-core/install
312 $(INSTALL_DIR) $(1)/etc/kdb/
313 $(INSTALL_DIR) $(1)/usr/lib/
314 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra.so* $(1)/usr/lib/
315 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-core.so* $(1)/usr/lib/
316 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-ease.so* $(1)/usr/lib/
317 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-invoke.so* $(1)/usr/lib/
318 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-kdb.so* $(1)/usr/lib/
319 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-meta.so* $(1)/usr/lib/
320 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-plugin.so* $(1)/usr/lib/
321 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-proposal.so* $(1)/usr/lib/
322 #The next is only supported with glibc, so skip it.
323 #$(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektraintercept-* $(1)/usr/lib/
324 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-resolver_fm_pb_b.so $(1)/usr/lib/
325 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-utility.so* $(1)/usr/lib/
326 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-ni.so $(1)/usr/lib/
327 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-ini.so $(1)/usr/lib/
328 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-sync.so $(1)/usr/lib/
329 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-storage.so $(1)/usr/lib/
330 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-resolver.so $(1)/usr/lib/
331 endef
332
333 define Package/elektra-kdb/install
334 $(INSTALL_DIR) $(1)/usr/bin/
335 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/kdb $(1)/usr/bin
336 $(INSTALL_DIR) $(1)/usr/lib/elektra/
337 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektratools* $(1)/usr/lib/
338 $(CP) $(PKG_INSTALL_DIR)/usr/lib/elektra/tool_exec/ $(1)/usr/lib/elektra/
339 endef
340
341 define Package/libelektra-resolvers/install
342 $(INSTALL_DIR) $(1)/usr/lib/
343 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-resolver_* $(1)/usr/lib/
344 rm -f $(1)/usr/lib/libelektra-resolver_fm_pb_b.so
345 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-wresolver.so $(1)/usr/lib/
346 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-noresolver.so $(1)/usr/lib/
347 endef
348
349 define Package/libelektra-plugins/install
350 $(INSTALL_DIR) $(1)/usr/lib/
351 $(CP) $(foreach plugin,$(CONTENT_ELEKTRA_PLUGINS),$(PKG_INSTALL_DIR)/usr/lib/libelektra-$(plugin).so) $(1)/usr/lib/
352 endef
353
354 define Package/libelektra-boost/install
355 $(INSTALL_DIR) $(1)/usr/lib/
356 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-tcl.so $(1)/usr/lib/
357 endef
358
359 define Package/libelektra-cpp/install
360 $(INSTALL_DIR) $(1)/usr/lib/
361 $(CP) $(foreach plugin,$(CONTENT_ELEKTRA_CPP),$(PKG_INSTALL_DIR)/usr/lib/libelektra-$(plugin).so) $(1)/usr/lib/
362 endef
363
364 define Package/libelektra-crypto/install
365 $(INSTALL_DIR) $(1)/usr/lib/
366 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-crypto_openssl.so $(1)/usr/lib/
367 endef
368
369 define Package/libelektra-curlget/install
370 $(INSTALL_DIR) $(1)/usr/lib/
371 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-curlget.so $(1)/usr/lib/
372 endef
373
374 define Package/libelektra-dbus/install
375 $(INSTALL_DIR) $(1)/usr/lib/
376 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-dbus.so $(1)/usr/lib/
377 endef
378
379 define Package/libelektra-xerces/install
380 $(INSTALL_DIR) $(1)/usr/lib/
381 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-xerces.so $(1)/usr/lib/
382 endef
383
384 define Package/libelektra-xml/install
385 $(INSTALL_DIR) $(1)/usr/lib/
386 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-xmltool.so $(1)/usr/lib/
387 endef
388
389 define Package/libelektra-yajl/install
390 $(INSTALL_DIR) $(1)/usr/lib/
391 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-yajl.so $(1)/usr/lib/
392 endef
393
394 define Package/libelektra-yamlcpp/install
395 $(INSTALL_DIR) $(1)/usr/lib/
396 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-yamlcpp.so $(1)/usr/lib/
397 endef
398
399 define Package/libelektra-python3/install
400 $(INSTALL_DIR) $(1)/usr/lib/
401 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-python.so $(1)/usr/lib/
402 endef
403
404 define Package/libelektra-lua/install
405 $(INSTALL_DIR) $(1)/usr/lib/
406 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-lua.so $(1)/usr/lib/
407 endef
408
409 define Package/libelektra-extra/install
410 $(INSTALL_DIR) $(1)/usr/lib/
411 $(CP) $(foreach plugin,$(CONTENT_ELEKTRA_EXTRA),$(PKG_INSTALL_DIR)/usr/lib/libelektra-$(plugin).so) $(1)/usr/lib/
412 endef
413
414 define Build/InstallDev
415 $(INSTALL_DIR) $(1)/usr/include/elektra/
416 $(CP) $(PKG_INSTALL_DIR)/usr/include/elektra/* $(1)/usr/include/elektra/
417 $(INSTALL_DIR) $(1)/usr/lib/
418 $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
419 endef
420
421
422 $(eval $(call HostBuild))
423 $(eval $(call BuildPackage,libelektra-core))
424 $(eval $(call BuildPackage,elektra-kdb))
425 $(eval $(call BuildPackage,libelektra-resolvers))
426 $(eval $(call BuildPackage,libelektra-plugins))
427 $(eval $(call BuildPackage,libelektra-boost))
428 $(eval $(call BuildPackage,libelektra-cpp))
429 $(eval $(call BuildPackage,libelektra-curlget))
430 $(eval $(call BuildPackage,libelektra-crypto))
431 $(eval $(call BuildPackage,libelektra-dbus))
432 $(eval $(call BuildPackage,libelektra-xerces))
433 $(eval $(call BuildPackage,libelektra-yamlcpp))
434 $(eval $(call BuildPackage,libelektra-xml))
435 $(eval $(call BuildPackage,libelektra-yajl))
436 $(eval $(call BuildPackage,libelektra-python3))
437 $(eval $(call BuildPackage,libelektra-lua))
438 $(eval $(call BuildPackage,libelektra-extra))