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
:=doc
/COPYING
20 # Use this for official releasees
21 PKG_MD5SUM
:=33ec1e5982fb7fbd8893bf7b579b80f0
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
:=elektra
/host swig
/host
34 include $(INCLUDE_DIR
)/package.mk
35 include $(INCLUDE_DIR
)/host-build.mk
36 include $(INCLUDE_DIR
)/cmake.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
99 define CONTENT_ELEKTRA_PLUGINS_TEXT
100 ccode conditionals csvstorage enum filecheck glob hexcode hidden hosts
101 iconv keytometa line lineendings list mathcheck network null path
102 simpleini syslog uname validation
105 CONTENT_ELEKTRA_PLUGINS
= $(strip $(CONTENT_ELEKTRA_PLUGINS_TEXT
))
107 define Package
/libelektra-plugins
/description
108 $(call Package
/libelektra
/Default-description
)
110 This package contains plugins for various common configuration file
111 format and optional features without heavy dependencies. Currently
112 these plugins are included
:
113 $(CONTENT_ELEKTRA_PLUGINS_TEXT
)
116 define Package
/libelektra-cpp
117 $(call Package
/libelektra
/Default
)
118 TITLE
:=Elektra plugins depending on libstdcpp
119 DEPENDS
:=+libelektra-core
+libstdcpp
122 CONTENT_ELEKTRA_CPP
=dump regexstore struct type
124 define Package
/libelektra-cpp
/description
125 $(call Package
/libelektra
/Default-description
)
127 This package contains plugins written in C
++.
129 $(CONTENT_ELEKTRA_CPP
)
132 define Package
/libelektra-boost
133 $(call Package
/libelektra
/Default
)
134 TITLE
:=Elektra plugins depending on boost
135 DEPENDS
:=+libelektra-core
+libstdcpp
+boost
138 define Package
/libelektra-boost
/description
139 $(call Package
/libelektra
/Default-description
)
141 This package contains plugins written in C
++ with an dependency on
142 boost. Currently this is a plugin for a tcl like format.
145 define Package
/libelektra-crypto
146 $(call Package
/libelektra
/Default
)
147 TITLE
:=Elektra crypto plugin
148 DEPENDS
:=+libelektra-core
+libopenssl
151 define Package
/libelektra-crypto
/description
152 $(call Package
/libelektra
/Default-description
)
154 This package contains support for encrypting values before storage.
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-xml
171 $(call Package
/libelektra
/Default
)
172 TITLE
:=Elektra xmltool plugin
173 DEPENDS
:=+libelektra-core
+libxml2
176 define Package
/libelektra-xml
/description
177 $(call Package
/libelektra
/Default-description
)
179 This package contains a plugin for storing data with xml syntax.
182 define Package
/libelektra-yajl
183 $(call Package
/libelektra
/Default
)
184 TITLE
:=Elektra yajl
(json
) plugin
185 DEPENDS
:=+libelektra-core
+yajl
188 define Package
/libelektra-yajl
/description
189 $(call Package
/libelektra
/Default-description
)
191 This package contains support for storing the key database
as json files.
194 define Package
/libelektra-python2
195 $(call Package
/libelektra
/Default
)
196 TITLE
:=Elektra python2 plugin
197 DEPENDS
:=+libelektra-core
+python-light
+libstdcpp
200 define Package
/libelektra-python2
/description
201 $(call Package
/libelektra
/Default-description
)
203 This package adds python2 support to elektra.
206 define Package
/libelektra-python3
207 $(call Package
/libelektra
/Default
)
208 TITLE
:=Elektra python3 plugin
209 DEPENDS
:=+libelektra-core
+python3-light
+libstdcpp
212 define Package
/libelektra-python3
/description
213 $(call Package
/libelektra
/Default-description
)
215 This package adds python3 support to elektra.
218 define Package
/libelektra-lua
219 $(call Package
/libelektra
/Default
)
220 TITLE
:=Elektra lua plugin
221 DEPENDS
:=+libelektra-core
+lua
+libstdcpp
224 define Package
/libelektra-lua
/description
225 $(call Package
/libelektra
/Default-description
)
227 This package adds lua support to elektra.
230 define Package
/libelektra-extra
231 $(call Package
/libelektra
/Default
)
232 TITLE
:=Additional elektra plugins
233 DEPENDS
:=+libelektra-core
236 CONTENT_ELEKTRA_EXTRA
:=constants counter error fstab logchange rename timeofday tracer
238 define Package
/libelektra-extra
/description
239 $(call Package
/libelektra
/Default-description
)
241 This package contains extra plugins that are only useful for debugging
242 or
as an example of what can be done. Currently this includes
:
243 $(CONTENT_ELEKTRA_EXTRA
)
247 -DTARGET_PLUGIN_FOLDER
="" \
250 -DBUILD_DOCUMENTATION
=OFF \
251 -DFORCE_IN_SOURCE_BUILD
=ON \
252 -DBUILD_TESTING
=OFF \
253 -DKDB_DEFAULT_RESOLVER
=resolver_fm_pb_b \
254 -DKDB_DEFAULT_STORAGE
=ini \
255 -DPLUGINS
="ALL;-crypto_gcrypt"
257 CMAKE_HOST_OPTIONS
= \
258 -DCMAKE_SKIP_RPATH
=FALSE \
259 -DCMAKE_INSTALL_RPATH
=$(STAGING_DIR_HOST
)/lib
/ \
260 -DINSTALL_BUILD_TOOLS
=ON \
262 -DBUILD_DOCUMENTATION
=OFF \
263 -DINSTALL_SYSTEM_FILES
=OFF \
264 -DFORCE_IN_SOURCE_BUILD
=ON \
265 -DBUILD_TESTING
=OFF \
266 -DPLUGINS
="ALL;-python2;-python" \
269 define Package
/libelektra-core
/install
270 $(INSTALL_DIR
) $(1)/etc
/kdb
/
271 $(INSTALL_DIR
) $(1)/usr
/lib
/
272 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libelektra.so
* $(1)/usr
/lib
/
273 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libelektra-core.so
* $(1)/usr
/lib
/
274 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libelektra-ease.so
* $(1)/usr
/lib
/
275 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libelektra-kdb.so
* $(1)/usr
/lib
/
276 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libelektra-meta.so
* $(1)/usr
/lib
/
277 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libelektra-plugin.so
* $(1)/usr
/lib
/
278 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libelektra-proposal.so
* $(1)/usr
/lib
/
279 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libelektra-resolver_fm_pb_b.so
$(1)/usr
/lib
/
280 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libelektra-ni.so
$(1)/usr
/lib
/
281 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libelektra-ini.so
$(1)/usr
/lib
/
282 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libelektra-sync.so
$(1)/usr
/lib
/
285 define Package
/elektra-kdb
/install
286 $(INSTALL_DIR
) $(1)/usr
/bin
/
287 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/kdb
$(1)/usr
/bin
288 $(INSTALL_DIR
) $(1)/usr
/lib
/elektra
/
289 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libelektratools
* $(1)/usr
/lib
/
290 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/elektra
/tool_exec
/ $(1)/usr
/lib
/elektra
/
293 define Package
/libelektra-resolvers
/install
294 $(INSTALL_DIR
) $(1)/usr
/lib
/
295 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libelektra-resolver_
* $(1)/usr
/lib
/
296 rm -f
$(1)/usr
/lib
/libelektra-resolver_fm_pb_b.so
297 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libelektra-wresolver.so
$(1)/usr
/lib
/
298 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libelektra-noresolver.so
$(1)/usr
/lib
/
301 define Package
/libelektra-plugins
/install
302 $(INSTALL_DIR
) $(1)/usr
/lib
/
303 $(foreach plugin
,$(CONTENT_ELEKTRA_PLUGINS
),$(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libelektra-
$(plugin
).so
$(1)/usr
/lib
/;)
306 define Package
/libelektra-boost
/install
307 $(INSTALL_DIR
) $(1)/usr
/lib
/
308 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libelektra-tcl.so
$(1)/usr
/lib
/
311 define Package
/libelektra-cpp
/install
312 $(INSTALL_DIR
) $(1)/usr
/lib
/
313 $(CP
) $(foreach plugin
,$(CONTENT_ELEKTRA_CPP
),$(PKG_INSTALL_DIR
)/usr
/lib
/libelektra-
$(plugin
).so
) $(1)/usr
/lib
/
316 define Package
/libelektra-crypto
/install
317 $(INSTALL_DIR
) $(1)/usr
/lib
/
318 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libelektra-crypto
* $(1)/usr
/lib
/
321 define Package
/libelektra-dbus
/install
322 $(INSTALL_DIR
) $(1)/usr
/lib
/
323 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libelektra-dbus.so
$(1)/usr
/lib
/
326 define Package
/libelektra-xml
/install
327 $(INSTALL_DIR
) $(1)/usr
/lib
/
328 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libelektra-xmltool.so
$(1)/usr
/lib
/
331 define Package
/libelektra-yajl
/install
332 $(INSTALL_DIR
) $(1)/usr
/lib
/
333 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libelektra-yajl.so
$(1)/usr
/lib
/
336 define Package
/libelektra-python2
/install
337 $(INSTALL_DIR
) $(1)/usr
/lib
/
338 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libelektra-python2.so
$(1)/usr
/lib
/
341 define Package
/libelektra-python3
/install
342 $(INSTALL_DIR
) $(1)/usr
/lib
/
343 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libelektra-python.so
$(1)/usr
/lib
/
346 define Package
/libelektra-lua
/install
347 $(INSTALL_DIR
) $(1)/usr
/lib
/
348 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libelektra-lua.so
$(1)/usr
/lib
/
351 define Package
/libelektra-extra
/install
352 $(INSTALL_DIR
) $(1)/usr
/lib
/
353 $(CP
) $(foreach plugin
,$(CONTENT_ELEKTRA_EXTRA
),$(PKG_INSTALL_DIR
)/usr
/lib
/libelektra-
$(plugin
).so
) $(1)/usr
/lib
/
356 define Build
/InstallDev
357 $(INSTALL_DIR
) $(1)/usr
/include/elektra
/
358 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/elektra
/* $(1)/usr
/include/elektra
/
359 $(INSTALL_DIR
) $(1)/usr
/lib
/
360 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/* $(1)/usr
/lib
/
364 $(eval
$(call HostBuild
))
365 $(eval
$(call BuildPackage
,libelektra-core
))
366 $(eval
$(call BuildPackage
,elektra-kdb
))
367 $(eval
$(call BuildPackage
,libelektra-resolvers
))
368 $(eval
$(call BuildPackage
,libelektra-plugins
))
369 $(eval
$(call BuildPackage
,libelektra-boost
))
370 $(eval
$(call BuildPackage
,libelektra-cpp
))
371 $(eval
$(call BuildPackage
,libelektra-crypto
))
372 $(eval
$(call BuildPackage
,libelektra-dbus
))
373 $(eval
$(call BuildPackage
,libelektra-xml
))
374 $(eval
$(call BuildPackage
,libelektra-yajl
))
375 $(eval
$(call BuildPackage
,libelektra-python2
))
376 $(eval
$(call BuildPackage
,libelektra-python3
))
377 $(eval
$(call BuildPackage
,libelektra-lua
))
378 $(eval
$(call BuildPackage
,libelektra-extra
))