You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

446 lines
14 KiB

  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. include $(TOPDIR)/rules.mk
  10. PKG_MAINTAINER:=Harald Geyer <harald@ccbib.org>
  11. PKG_NAME:=elektra
  12. PKG_LICENSE:=BSD-3-Clause
  13. PKG_LICENSE_FILES:=LICENSE.md
  14. PKG_VERSION:=0.9.2
  15. PKG_RELEASE:=1
  16. # Use this for official releasees
  17. PKG_HASH:=6f2fcf8aaed8863e1cc323265ca2617751ca50dac974b43a0811bcfd4a511f2e
  18. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  19. PKG_SOURCE_URL:=http://ftp.libelektra.org/ftp/elektra/releases
  20. # Use this to test versions still under development
  21. #PKG_SOURCE_PROTO:=git
  22. #PKG_SOURCE_URL:=https://github.com/ElektraInitiative/libelektra.git
  23. #PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  24. #PKG_SOURCE_VERSION:=e97efb29a94f3a49cb952d06552fcf53708ea8c7
  25. #PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
  26. PKG_BUILD_DEPENDS:= lua
  27. include $(INCLUDE_DIR)/package.mk
  28. include $(INCLUDE_DIR)/cmake.mk
  29. include $(INCLUDE_DIR)/nls.mk
  30. define Package/libelektra/Default
  31. SECTION:=libs
  32. CATEGORY:=Libraries
  33. TITLE:=Elektra
  34. URL:=http://www.libelektra.org/
  35. SUBMENU:=LibElektra
  36. endef
  37. define Package/libelektra/Default-description
  38. Elektra provides an universal and secure framework to store
  39. configuration parameters in a global, hierarchical key database.
  40. endef
  41. define Package/libelektra-core
  42. $(call Package/libelektra/Default)
  43. TITLE:=Elektra core library
  44. DEPENDS:=+libpthread
  45. endef
  46. define Package/libelektra-core/description
  47. $(call Package/libelektra/Default-description)
  48. This package contains the core libraries, that all other parts of
  49. elektra and all programs using elektra depend on, and an almost
  50. minimal set of plugins to be actually useful.
  51. endef
  52. define Package/elektra-kdb
  53. SECTION:=utils
  54. CATEGORY:=Utilities
  55. TITLE:=Elektra kdb tool
  56. URL:=http://www.libelektra.org/
  57. DEPENDS:=+libelektra-core +libstdcpp
  58. endef
  59. define Package/elektra-kdb/description
  60. $(call Package/libelektra/Default-description)
  61. This package contains the kdb tool, which allows to access and change
  62. the content of the key database from the shell.
  63. endef
  64. define Package/libelektra-resolvers
  65. $(call Package/libelektra/Default)
  66. TITLE:=Elektra additional resolvers
  67. DEPENDS:=+libelektra-core +libpthread
  68. endef
  69. define Package/libelektra-resolvers/description
  70. $(call Package/libelektra/Default-description)
  71. This package contains additional resolvers not included in the
  72. libelektra-core package. Usually there is no reason to install this.
  73. endef
  74. define Package/libelektra-plugins
  75. $(call Package/libelektra/Default)
  76. TITLE:=Useful elektra plugins
  77. DEPENDS:=+libelektra-core $(ICONV_DEPENDS)
  78. endef
  79. define CONTENT_ELEKTRA_PLUGINS_TEXT
  80. base64 conditionals csvstorage date file filecheck glob hexcode
  81. hexnumber hidden hosts iconv ipaddr keytometa line lineendings list
  82. mathcheck macaddr mini network null path profile quickdump
  83. range reference rgbcolor shell syslog type uname unit validation
  84. endef
  85. CONTENT_ELEKTRA_PLUGINS = $(strip $(CONTENT_ELEKTRA_PLUGINS_TEXT))
  86. define Package/libelektra-plugins/description
  87. $(call Package/libelektra/Default-description)
  88. This package contains plugins for various common configuration file
  89. format and optional features without heavy dependencies. Currently
  90. these plugins are included:
  91. $(CONTENT_ELEKTRA_PLUGINS_TEXT)
  92. endef
  93. define Package/libelektra-cpp
  94. $(call Package/libelektra/Default)
  95. TITLE:=Elektra plugins depending on libstdcpp
  96. DEPENDS:=+libelektra-core +libstdcpp
  97. endef
  98. CONTENT_ELEKTRA_CPP=ccode directoryvalue dump
  99. define Package/libelektra-cpp/description
  100. $(call Package/libelektra/Default-description)
  101. This package contains plugins written in C++.
  102. Currently these are:
  103. $(CONTENT_ELEKTRA_CPP)
  104. endef
  105. define Package/libelektra-boost
  106. $(call Package/libelektra/Default)
  107. TITLE:=Elektra plugins depending on boost
  108. DEPENDS:=+libelektra-core +libstdcpp +boost
  109. endef
  110. define Package/libelektra-boost/description
  111. $(call Package/libelektra/Default-description)
  112. This package contains plugins written in C++ with an dependency on
  113. boost. Currently this is a plugin for a tcl like format.
  114. endef
  115. define Package/libelektra-crypto
  116. $(call Package/libelektra/Default)
  117. TITLE:=Elektra crypto plugin
  118. DEPENDS:=+libelektra-core +libgcrypt
  119. endef
  120. define Package/libelektra-crypto/description
  121. $(call Package/libelektra/Default-description)
  122. This package contains support for encrypting values before storage.
  123. endef
  124. define Package/libelektra-curlget
  125. $(call Package/libelektra/Default)
  126. TITLE:=Elektra curlget plugin
  127. DEPENDS:=+libelektra-core +libcurl +libopenssl
  128. endef
  129. define Package/libelektra-curlget/description
  130. $(call Package/libelektra/Default-description)
  131. This plugin can get configuration data from remote URLs before access.
  132. endef
  133. define Package/libelektra-dbus
  134. $(call Package/libelektra/Default)
  135. TITLE:=Elektra dbus plugin
  136. DEPENDS:=+libelektra-core +libdbus
  137. endef
  138. define Package/libelektra-dbus/description
  139. $(call Package/libelektra/Default-description)
  140. This package contains support for dbus notification on configuration
  141. changes.
  142. endef
  143. define Package/libelektra-xerces
  144. $(call Package/libelektra/Default)
  145. TITLE:=Elektra xerces based xml plugin
  146. DEPENDS:=+libelektra-core +libstdcpp +libxerces-c
  147. endef
  148. define Package/libelektra-xerces/description
  149. $(call Package/libelektra/Default-description)
  150. The xerces plugin supplants the xmltool plugin
  151. and allows us to use XML files not following a specific schemata.
  152. Attributes are mapped to Elektra's metadata, multiple keys with the
  153. same names are mapped to arrays.
  154. endef
  155. define Package/libelektra-xml
  156. $(call Package/libelektra/Default)
  157. TITLE:=Elektra xmltool plugin
  158. DEPENDS:=+libelektra-core +libxml2
  159. endef
  160. define Package/libelektra-xml/description
  161. $(call Package/libelektra/Default-description)
  162. This package contains a plugin for storing data with xml syntax.
  163. endef
  164. define Package/libelektra-yajl
  165. $(call Package/libelektra/Default)
  166. TITLE:=Elektra yajl (json) plugin
  167. DEPENDS:=+libelektra-core +yajl
  168. endef
  169. define Package/libelektra-yajl/description
  170. $(call Package/libelektra/Default-description)
  171. This package contains support for storing the key database as json files.
  172. endef
  173. define Package/libelektra-yamlcpp
  174. $(call Package/libelektra/Default)
  175. TITLE:=Elektra yaml plugin
  176. DEPENDS:=+libelektra-core +libyaml-cpp
  177. endef
  178. define Package/libelektra-yamlcpp/description
  179. $(call Package/libelektra/Default-description)
  180. This package contains support for storing the key database as yaml files.
  181. endef
  182. define Package/libelektra-zmq
  183. $(call Package/libelektra/Default)
  184. TITLE:=Elektra ZeroMQ transport plugins
  185. DEPENDS:=+libelektra-core +libzmq
  186. endef
  187. define Package/libelektra-python3
  188. $(call Package/libelektra/Default)
  189. TITLE:=Elektra python3 plugin
  190. DEPENDS:=+libelektra-core +python3-light +libstdcpp
  191. endef
  192. define Package/libelektra-python3/description
  193. $(call Package/libelektra/Default-description)
  194. This package adds python3 support to elektra.
  195. endef
  196. define Package/libelektra-lua
  197. $(call Package/libelektra/Default)
  198. TITLE:=Elektra lua plugin
  199. DEPENDS:=+libelektra-core +lua5.3 +libstdcpp
  200. endef
  201. define Package/libelektra-lua/description
  202. $(call Package/libelektra/Default-description)
  203. This package adds lua support to elektra.
  204. endef
  205. define Package/libelektra-extra
  206. $(call Package/libelektra/Default)
  207. TITLE:=Additional elektra plugins
  208. DEPENDS:=+libelektra-core +libstdcpp
  209. endef
  210. define CONTENT_EXTRA_PLUGINS_TEXT
  211. blockresolver c constants counter desktop dpkg error fcrypt
  212. fstab logchange mozprefs passwd process rename
  213. timeofday tracer yamlsmith
  214. endef
  215. CONTENT_ELEKTRA_EXTRA:=$(strip $(CONTENT_EXTRA_PLUGINS_TEXT))
  216. define Package/libelektra-extra/description
  217. $(call Package/libelektra/Default-description)
  218. This package contains extra plugins that are only useful for debugging
  219. or as an example of what can be done. Also most experimental plugins
  220. are included in this package. Currently this includes:
  221. $(CONTENT_EXTRA_PLUGINS_TEXT)
  222. endef
  223. CMAKE_BINARY_SUBDIR=build
  224. CMAKE_OPTIONS = \
  225. -DTARGET_PLUGIN_FOLDER="" \
  226. -DBUILD_FULL=OFF \
  227. -DBUILD_STATIC=OFF \
  228. -DBUILD_DOCUMENTATION=OFF \
  229. -DFORCE_IN_SOURCE_BUILD=ON \
  230. -DBUILD_TESTING=OFF \
  231. -DKDB_DEFAULT_RESOLVER=resolver_fm_pb_b \
  232. -DKDB_DEFAULT_STORAGE=ini \
  233. -DENABLE_OPTIMIZATIONS=OFF \
  234. -DPLUGINS="ALL;-multifile;-simpleini;-internalnotification" \
  235. -DIconv_INCLUDE_DIR="$(ICONV_PREFIX)/include" \
  236. -DIconv_LIBRARY="$(ICONV_PREFIX)/lib/libiconv.$(if $(CONFIG_BUILD_NLS),so,a)" \
  237. -DBINDINGS="MAINTAINED;-intercept_env;-intercept_fs;-io_uv;-io_ev;-io_glib"
  238. define Package/libelektra-core/install
  239. $(INSTALL_DIR) $(1)/etc/kdb/
  240. $(INSTALL_DIR) $(1)/usr/lib/
  241. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-core.so* $(1)/usr/lib/
  242. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-ease.so* $(1)/usr/lib/
  243. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-globbing.so* $(1)/usr/lib/
  244. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-highlevel.so* $(1)/usr/lib/
  245. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-invoke.so* $(1)/usr/lib/
  246. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-io.so* $(1)/usr/lib/
  247. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-kdb.so* $(1)/usr/lib/
  248. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-merge.so* $(1)/usr/lib/
  249. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-meta.so* $(1)/usr/lib/
  250. #The next is excluded because of an upstream bug
  251. #$(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-notification.so* $(1)/usr/lib/
  252. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-opts.so* $(1)/usr/lib/
  253. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-plugin.so* $(1)/usr/lib/
  254. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-pluginprocess.so* $(1)/usr/lib/
  255. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-proposal.so* $(1)/usr/lib/
  256. #The next is only supported with glibc, so skip it.
  257. #$(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektraintercept-* $(1)/usr/lib/
  258. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-resolver_fm_pb_b.so $(1)/usr/lib/
  259. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-utility.so* $(1)/usr/lib/
  260. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-cache.so $(1)/usr/lib/
  261. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-mmapstorage.so $(1)/usr/lib/
  262. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-ni.so $(1)/usr/lib/
  263. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-ini.so $(1)/usr/lib/
  264. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-sync.so $(1)/usr/lib/
  265. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-storage.so $(1)/usr/lib/
  266. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-resolver.so $(1)/usr/lib/
  267. endef
  268. define Package/elektra-kdb/install
  269. $(INSTALL_DIR) $(1)/usr/bin/
  270. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/kdb $(1)/usr/bin
  271. $(INSTALL_DIR) $(1)/usr/lib/elektra/
  272. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektratools* $(1)/usr/lib/
  273. $(CP) $(PKG_INSTALL_DIR)/usr/lib/elektra/tool_exec/ $(1)/usr/lib/elektra/
  274. endef
  275. define Package/libelektra-resolvers/install
  276. $(INSTALL_DIR) $(1)/usr/lib/
  277. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-resolver_* $(1)/usr/lib/
  278. rm -f $(1)/usr/lib/libelektra-resolver_fm_pb_b.so
  279. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-wresolver.so $(1)/usr/lib/
  280. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-noresolver.so $(1)/usr/lib/
  281. endef
  282. define Package/libelektra-plugins/install
  283. $(INSTALL_DIR) $(1)/usr/lib/
  284. $(CP) $(foreach plugin,$(CONTENT_ELEKTRA_PLUGINS),$(PKG_INSTALL_DIR)/usr/lib/libelektra-$(plugin).so) $(1)/usr/lib/
  285. endef
  286. define Package/libelektra-boost/install
  287. $(INSTALL_DIR) $(1)/usr/lib/
  288. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-tcl.so $(1)/usr/lib/
  289. endef
  290. define Package/libelektra-cpp/install
  291. $(INSTALL_DIR) $(1)/usr/lib/
  292. $(CP) $(foreach plugin,$(CONTENT_ELEKTRA_CPP),$(PKG_INSTALL_DIR)/usr/lib/libelektra-$(plugin).so) $(1)/usr/lib/
  293. endef
  294. define Package/libelektra-crypto/install
  295. $(INSTALL_DIR) $(1)/usr/lib/
  296. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-crypto.so $(1)/usr/lib/
  297. endef
  298. define Package/libelektra-curlget/install
  299. $(INSTALL_DIR) $(1)/usr/lib/
  300. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-curlget.so $(1)/usr/lib/
  301. endef
  302. define Package/libelektra-dbus/install
  303. $(INSTALL_DIR) $(1)/usr/lib/
  304. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-dbus.so $(1)/usr/lib/
  305. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-dbusrecv.so $(1)/usr/lib/
  306. endef
  307. define Package/libelektra-xerces/install
  308. $(INSTALL_DIR) $(1)/usr/lib/
  309. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-xerces.so $(1)/usr/lib/
  310. endef
  311. define Package/libelektra-xml/install
  312. $(INSTALL_DIR) $(1)/usr/lib/
  313. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-xmltool.so $(1)/usr/lib/
  314. endef
  315. define Package/libelektra-yajl/install
  316. $(INSTALL_DIR) $(1)/usr/lib/
  317. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-yajl.so $(1)/usr/lib/
  318. endef
  319. define Package/libelektra-yamlcpp/install
  320. $(INSTALL_DIR) $(1)/usr/lib/
  321. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-yamlcpp.so $(1)/usr/lib/
  322. endef
  323. define Package/libelektra-zmq/install
  324. $(INSTALL_DIR) $(1)/usr/lib/
  325. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-zeromqsend.so $(1)/usr/lib/
  326. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-zeromqrecv.so $(1)/usr/lib/
  327. endef
  328. define Package/libelektra-python3/install
  329. $(INSTALL_DIR) $(1)/usr/lib/
  330. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-python.so $(1)/usr/lib/
  331. endef
  332. define Package/libelektra-lua/install
  333. $(INSTALL_DIR) $(1)/usr/lib/
  334. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-lua.so $(1)/usr/lib/
  335. endef
  336. define Package/libelektra-extra/install
  337. $(INSTALL_DIR) $(1)/usr/lib/
  338. $(CP) $(foreach plugin,$(CONTENT_ELEKTRA_EXTRA),$(PKG_INSTALL_DIR)/usr/lib/libelektra-$(plugin).so) $(1)/usr/lib/
  339. endef
  340. define Build/InstallDev
  341. $(INSTALL_DIR) $(1)/usr/include/elektra/
  342. $(CP) $(PKG_INSTALL_DIR)/usr/include/elektra/* $(1)/usr/include/elektra/
  343. $(INSTALL_DIR) $(1)/usr/lib/
  344. $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
  345. endef
  346. $(eval $(call BuildPackage,libelektra-core))
  347. $(eval $(call BuildPackage,elektra-kdb))
  348. $(eval $(call BuildPackage,libelektra-resolvers))
  349. $(eval $(call BuildPackage,libelektra-plugins))
  350. $(eval $(call BuildPackage,libelektra-boost))
  351. $(eval $(call BuildPackage,libelektra-cpp))
  352. $(eval $(call BuildPackage,libelektra-curlget))
  353. $(eval $(call BuildPackage,libelektra-crypto))
  354. $(eval $(call BuildPackage,libelektra-dbus))
  355. $(eval $(call BuildPackage,libelektra-xerces))
  356. $(eval $(call BuildPackage,libelektra-yamlcpp))
  357. $(eval $(call BuildPackage,libelektra-xml))
  358. $(eval $(call BuildPackage,libelektra-yajl))
  359. $(eval $(call BuildPackage,libelektra-python3))
  360. $(eval $(call BuildPackage,libelektra-lua))
  361. $(eval $(call BuildPackage,libelektra-zmq))
  362. $(eval $(call BuildPackage,libelektra-extra))