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