Merge pull request #2126 from lynxis/libmicrohttpd
[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:=doc/COPYING
17 PKG_VERSION:=0.8.15
18 PKG_RELEASE:=1
19
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
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 PKG_BUILD_DEPENDS:=elektra/host swig/host
33
34 include $(INCLUDE_DIR)/package.mk
35 include $(INCLUDE_DIR)/host-build.mk
36 include $(INCLUDE_DIR)/cmake.mk
37
38 define Package/libelektra/Default
39 SECTION:=libs
40 CATEGORY:=Libraries
41 TITLE:=Elektra
42 URL:=http://www.libelektra.org/
43 SUBMENU:=libelektra
44 endef
45
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.
49 endef
50
51 define Package/libelektra-core
52 $(call Package/libelektra/Default)
53 TITLE:=Elektra core library
54 DEPENDS:=+libpthread
55 endef
56
57 define Package/libelektra-core/description
58 $(call Package/libelektra/Default-description)
59
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.
63 endef
64
65 define Package/elektra-kdb
66 SECTION:=utils
67 CATEGORY:=Utilities
68 TITLE:=Elektra kdb tool
69 URL:=http://www.libelektra.org/
70 DEPENDS:=+libelektra-core +libstdcpp
71 endef
72
73 define Package/elektra-kdb/description
74 $(call Package/libelektra/Default-description)
75
76 This package contains the kdb tool, which allows to access and change
77 the content of the key database from the shell.
78 endef
79
80 define Package/libelektra-resolvers
81 $(call Package/libelektra/Default)
82 TITLE:=Elektra additional resolvers
83 DEPENDS:=+libelektra-core +libpthread
84 endef
85
86 define Package/libelektra-resolvers/description
87 $(call Package/libelektra/Default-description)
88
89 This package contains additional resolvers not included in the
90 libelektra-core package. Usually there is no reason to install this.
91 endef
92
93 define Package/libelektra-plugins
94 $(call Package/libelektra/Default)
95 TITLE:=Useful elektra plugins
96 DEPENDS:=+libelektra-core
97 endef
98
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
103 endef
104
105 CONTENT_ELEKTRA_PLUGINS = $(strip $(CONTENT_ELEKTRA_PLUGINS_TEXT))
106
107 define Package/libelektra-plugins/description
108 $(call Package/libelektra/Default-description)
109
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)
114 endef
115
116 define Package/libelektra-cpp
117 $(call Package/libelektra/Default)
118 TITLE:=Elektra plugins depending on libstdcpp
119 DEPENDS:=+libelektra-core +libstdcpp
120 endef
121
122 CONTENT_ELEKTRA_CPP=dump regexstore struct type
123
124 define Package/libelektra-cpp/description
125 $(call Package/libelektra/Default-description)
126
127 This package contains plugins written in C++.
128 Currently these are:
129 $(CONTENT_ELEKTRA_CPP)
130 endef
131
132 define Package/libelektra-boost
133 $(call Package/libelektra/Default)
134 TITLE:=Elektra plugins depending on boost
135 DEPENDS:=+libelektra-core +libstdcpp +boost
136 endef
137
138 define Package/libelektra-boost/description
139 $(call Package/libelektra/Default-description)
140
141 This package contains plugins written in C++ with an dependency on
142 boost. Currently this is a plugin for a tcl like format.
143 endef
144
145 define Package/libelektra-crypto
146 $(call Package/libelektra/Default)
147 TITLE:=Elektra crypto plugin
148 DEPENDS:=+libelektra-core +libopenssl
149 endef
150
151 define Package/libelektra-crypto/description
152 $(call Package/libelektra/Default-description)
153
154 This package contains support for encrypting values before storage.
155 endef
156
157 define Package/libelektra-dbus
158 $(call Package/libelektra/Default)
159 TITLE:=Elektra dbus plugin
160 DEPENDS:=+libelektra-core +libdbus
161 endef
162
163 define Package/libelektra-dbus/description
164 $(call Package/libelektra/Default-description)
165
166 This package contains support for dbus notification on configuration
167 changes.
168 endef
169
170 define Package/libelektra-xml
171 $(call Package/libelektra/Default)
172 TITLE:=Elektra xmltool plugin
173 DEPENDS:=+libelektra-core +libxml2
174 endef
175
176 define Package/libelektra-xml/description
177 $(call Package/libelektra/Default-description)
178
179 This package contains a plugin for storing data with xml syntax.
180 endef
181
182 define Package/libelektra-yajl
183 $(call Package/libelektra/Default)
184 TITLE:=Elektra yajl (json) plugin
185 DEPENDS:=+libelektra-core +yajl
186 endef
187
188 define Package/libelektra-yajl/description
189 $(call Package/libelektra/Default-description)
190
191 This package contains support for storing the key database as json files.
192 endef
193
194 define Package/libelektra-python2
195 $(call Package/libelektra/Default)
196 TITLE:=Elektra python2 plugin
197 DEPENDS:=+libelektra-core +python-light +libstdcpp
198 endef
199
200 define Package/libelektra-python2/description
201 $(call Package/libelektra/Default-description)
202
203 This package adds python2 support to elektra.
204 endef
205
206 define Package/libelektra-python3
207 $(call Package/libelektra/Default)
208 TITLE:=Elektra python3 plugin
209 DEPENDS:=+libelektra-core +python3-light +libstdcpp
210 endef
211
212 define Package/libelektra-python3/description
213 $(call Package/libelektra/Default-description)
214
215 This package adds python3 support to elektra.
216 endef
217
218 define Package/libelektra-lua
219 $(call Package/libelektra/Default)
220 TITLE:=Elektra lua plugin
221 DEPENDS:=+libelektra-core +lua +libstdcpp
222 endef
223
224 define Package/libelektra-lua/description
225 $(call Package/libelektra/Default-description)
226
227 This package adds lua support to elektra.
228 endef
229
230 define Package/libelektra-extra
231 $(call Package/libelektra/Default)
232 TITLE:=Additional elektra plugins
233 DEPENDS:=+libelektra-core
234 endef
235
236 CONTENT_ELEKTRA_EXTRA:=constants counter error fstab logchange rename timeofday tracer
237
238 define Package/libelektra-extra/description
239 $(call Package/libelektra/Default-description)
240
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)
244 endef
245
246 CMAKE_OPTIONS = \
247 -DTARGET_PLUGIN_FOLDER="" \
248 -DBUILD_FULL=OFF \
249 -DBUILD_STATIC=OFF \
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"
256
257 CMAKE_HOST_OPTIONS = \
258 -DCMAKE_SKIP_RPATH=FALSE \
259 -DCMAKE_INSTALL_RPATH=$(STAGING_DIR_HOST)/lib/ \
260 -DINSTALL_BUILD_TOOLS=ON \
261 -DBUILD_STATIC=OFF \
262 -DBUILD_DOCUMENTATION=OFF \
263 -DINSTALL_SYSTEM_FILES=OFF \
264 -DFORCE_IN_SOURCE_BUILD=ON \
265 -DBUILD_TESTING=OFF \
266 -DPLUGINS="ALL;-python2;-python" \
267 -DTOOLS="gen;kdb"
268
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/
283 endef
284
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/
291 endef
292
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/
299 endef
300
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/;)
304 endef
305
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/
309 endef
310
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/
314 endef
315
316 define Package/libelektra-crypto/install
317 $(INSTALL_DIR) $(1)/usr/lib/
318 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-crypto* $(1)/usr/lib/
319 endef
320
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/
324 endef
325
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/
329 endef
330
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/
334 endef
335
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/
339 endef
340
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/
344 endef
345
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/
349 endef
350
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/
354 endef
355
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/
361 endef
362
363
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))