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.

409 lines
12 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:=doc/COPYING
  14. PKG_VERSION:=0.8.19
  15. PKG_RELEASE:=1
  16. # Use this for official releasees
  17. PKG_HASH:=cc14f09539aa95623e884f28e8be7bd67c37550d25e08288108a54fd294fd2a8
  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:=elektra/host swig/host
  27. include $(INCLUDE_DIR)/package.mk
  28. include $(INCLUDE_DIR)/host-build.mk
  29. include $(INCLUDE_DIR)/cmake.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
  78. endef
  79. define CONTENT_ELEKTRA_PLUGINS_TEXT
  80. base64 boolean cachefilter ccode conditionals csvstorage
  81. enum filecheck glob hexcode hidden hosts iconv keytometa
  82. line lineendings list mathcheck network null path profile
  83. shell syslog uname 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=dump regexstore struct type
  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 +libopenssl
  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
  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-xml
  144. $(call Package/libelektra/Default)
  145. TITLE:=Elektra xmltool plugin
  146. DEPENDS:=+libelektra-core +libxml2
  147. endef
  148. define Package/libelektra-xml/description
  149. $(call Package/libelektra/Default-description)
  150. This package contains a plugin for storing data with xml syntax.
  151. endef
  152. define Package/libelektra-yajl
  153. $(call Package/libelektra/Default)
  154. TITLE:=Elektra yajl (json) plugin
  155. DEPENDS:=+libelektra-core +yajl
  156. endef
  157. define Package/libelektra-yajl/description
  158. $(call Package/libelektra/Default-description)
  159. This package contains support for storing the key database as json files.
  160. endef
  161. define Package/libelektra-python2
  162. $(call Package/libelektra/Default)
  163. TITLE:=Elektra python2 plugin
  164. DEPENDS:=+libelektra-core +python-light +libstdcpp
  165. endef
  166. define Package/libelektra-python2/description
  167. $(call Package/libelektra/Default-description)
  168. This package adds python2 support to elektra.
  169. endef
  170. define Package/libelektra-python3
  171. $(call Package/libelektra/Default)
  172. TITLE:=Elektra python3 plugin
  173. DEPENDS:=+libelektra-core +python3-light +libstdcpp
  174. endef
  175. define Package/libelektra-python3/description
  176. $(call Package/libelektra/Default-description)
  177. This package adds python3 support to elektra.
  178. endef
  179. define Package/libelektra-lua
  180. $(call Package/libelektra/Default)
  181. TITLE:=Elektra lua plugin
  182. DEPENDS:=+libelektra-core +lua +libstdcpp
  183. endef
  184. define Package/libelektra-lua/description
  185. $(call Package/libelektra/Default-description)
  186. This package adds lua support to elektra.
  187. endef
  188. define Package/libelektra-extra
  189. $(call Package/libelektra/Default)
  190. TITLE:=Additional elektra plugins
  191. DEPENDS:=+libelektra-core +libstdcpp
  192. endef
  193. define CONTENT_EXTRA_PLUGINS_TEXT
  194. blockresolver c constants counter desktop dpkg error
  195. fcrypt fstab logchange mozprefs passwd rename required
  196. simplespeclang timeofday tracer
  197. endef
  198. CONTENT_ELEKTRA_EXTRA:=$(strip $(CONTENT_EXTRA_PLUGINS_TEXT))
  199. define Package/libelektra-extra/description
  200. $(call Package/libelektra/Default-description)
  201. This package contains extra plugins that are only useful for debugging
  202. or as an example of what can be done. Also most experimental plugins
  203. are included in this package. Currently this includes:
  204. $(CONTENT_EXTRA_PLUGINS_TEXT)
  205. endef
  206. CMAKE_OPTIONS = \
  207. -DTARGET_PLUGIN_FOLDER="" \
  208. -DBUILD_FULL=OFF \
  209. -DBUILD_STATIC=OFF \
  210. -DBUILD_DOCUMENTATION=OFF \
  211. -DFORCE_IN_SOURCE_BUILD=ON \
  212. -DBUILD_TESTING=OFF \
  213. -DKDB_DEFAULT_RESOLVER=resolver_fm_pb_b \
  214. -DKDB_DEFAULT_STORAGE=ini \
  215. -DENABLE_OPTIMIZATIONS=OFF \
  216. -DPLUGINS="ALL"
  217. CMAKE_HOST_OPTIONS = \
  218. -DCMAKE_SKIP_RPATH=FALSE \
  219. -DCMAKE_INSTALL_RPATH=$(STAGING_DIR_HOST)/lib/ \
  220. -DINSTALL_BUILD_TOOLS=ON \
  221. -DBUILD_STATIC=OFF \
  222. -DBUILD_DOCUMENTATION=OFF \
  223. -DINSTALL_SYSTEM_FILES=OFF \
  224. -DFORCE_IN_SOURCE_BUILD=ON \
  225. -DBUILD_TESTING=OFF \
  226. -DPLUGINS="ALL;-python2;-python" \
  227. -DTOOLS="gen;kdb"
  228. define Package/libelektra-core/install
  229. $(INSTALL_DIR) $(1)/etc/kdb/
  230. $(INSTALL_DIR) $(1)/usr/lib/
  231. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra.so* $(1)/usr/lib/
  232. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-core.so* $(1)/usr/lib/
  233. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-ease.so* $(1)/usr/lib/
  234. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-kdb.so* $(1)/usr/lib/
  235. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-meta.so* $(1)/usr/lib/
  236. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-plugin.so* $(1)/usr/lib/
  237. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-proposal.so* $(1)/usr/lib/
  238. #The next is only supported with glibc, so skip it.
  239. #$(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektraintercept-* $(1)/usr/lib/
  240. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-resolver_fm_pb_b.so $(1)/usr/lib/
  241. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-ni.so $(1)/usr/lib/
  242. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-ini.so $(1)/usr/lib/
  243. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-sync.so $(1)/usr/lib/
  244. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-storage.so $(1)/usr/lib/
  245. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-resolver.so $(1)/usr/lib/
  246. endef
  247. define Package/elektra-kdb/install
  248. $(INSTALL_DIR) $(1)/usr/bin/
  249. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/kdb $(1)/usr/bin
  250. $(INSTALL_DIR) $(1)/usr/lib/elektra/
  251. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektratools* $(1)/usr/lib/
  252. $(CP) $(PKG_INSTALL_DIR)/usr/lib/elektra/tool_exec/ $(1)/usr/lib/elektra/
  253. endef
  254. define Package/libelektra-resolvers/install
  255. $(INSTALL_DIR) $(1)/usr/lib/
  256. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-resolver_* $(1)/usr/lib/
  257. rm -f $(1)/usr/lib/libelektra-resolver_fm_pb_b.so
  258. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-wresolver.so $(1)/usr/lib/
  259. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-noresolver.so $(1)/usr/lib/
  260. endef
  261. define Package/libelektra-plugins/install
  262. $(INSTALL_DIR) $(1)/usr/lib/
  263. $(CP) $(foreach plugin,$(CONTENT_ELEKTRA_PLUGINS),$(PKG_INSTALL_DIR)/usr/lib/libelektra-$(plugin).so) $(1)/usr/lib/
  264. endef
  265. define Package/libelektra-boost/install
  266. $(INSTALL_DIR) $(1)/usr/lib/
  267. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-tcl.so $(1)/usr/lib/
  268. endef
  269. define Package/libelektra-cpp/install
  270. $(INSTALL_DIR) $(1)/usr/lib/
  271. $(CP) $(foreach plugin,$(CONTENT_ELEKTRA_CPP),$(PKG_INSTALL_DIR)/usr/lib/libelektra-$(plugin).so) $(1)/usr/lib/
  272. endef
  273. define Package/libelektra-crypto/install
  274. $(INSTALL_DIR) $(1)/usr/lib/
  275. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-crypto_openssl.so $(1)/usr/lib/
  276. endef
  277. define Package/libelektra-curlget/install
  278. $(INSTALL_DIR) $(1)/usr/lib/
  279. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-curlget.so $(1)/usr/lib/
  280. endef
  281. define Package/libelektra-dbus/install
  282. $(INSTALL_DIR) $(1)/usr/lib/
  283. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-dbus.so $(1)/usr/lib/
  284. endef
  285. define Package/libelektra-xml/install
  286. $(INSTALL_DIR) $(1)/usr/lib/
  287. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-xmltool.so $(1)/usr/lib/
  288. endef
  289. define Package/libelektra-yajl/install
  290. $(INSTALL_DIR) $(1)/usr/lib/
  291. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-yajl.so $(1)/usr/lib/
  292. endef
  293. define Package/libelektra-python2/install
  294. $(INSTALL_DIR) $(1)/usr/lib/
  295. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-python2.so $(1)/usr/lib/
  296. endef
  297. define Package/libelektra-python3/install
  298. $(INSTALL_DIR) $(1)/usr/lib/
  299. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-python.so $(1)/usr/lib/
  300. endef
  301. define Package/libelektra-lua/install
  302. $(INSTALL_DIR) $(1)/usr/lib/
  303. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-lua.so $(1)/usr/lib/
  304. endef
  305. define Package/libelektra-extra/install
  306. $(INSTALL_DIR) $(1)/usr/lib/
  307. $(CP) $(foreach plugin,$(CONTENT_ELEKTRA_EXTRA),$(PKG_INSTALL_DIR)/usr/lib/libelektra-$(plugin).so) $(1)/usr/lib/
  308. endef
  309. define Build/InstallDev
  310. $(INSTALL_DIR) $(1)/usr/include/elektra/
  311. $(CP) $(PKG_INSTALL_DIR)/usr/include/elektra/* $(1)/usr/include/elektra/
  312. $(INSTALL_DIR) $(1)/usr/lib/
  313. $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
  314. endef
  315. $(eval $(call HostBuild))
  316. $(eval $(call BuildPackage,libelektra-core))
  317. $(eval $(call BuildPackage,elektra-kdb))
  318. $(eval $(call BuildPackage,libelektra-resolvers))
  319. $(eval $(call BuildPackage,libelektra-plugins))
  320. $(eval $(call BuildPackage,libelektra-boost))
  321. $(eval $(call BuildPackage,libelektra-cpp))
  322. $(eval $(call BuildPackage,libelektra-curlget))
  323. $(eval $(call BuildPackage,libelektra-crypto))
  324. $(eval $(call BuildPackage,libelektra-dbus))
  325. $(eval $(call BuildPackage,libelektra-xml))
  326. $(eval $(call BuildPackage,libelektra-yajl))
  327. $(eval $(call BuildPackage,libelektra-python2))
  328. $(eval $(call BuildPackage,libelektra-python3))
  329. $(eval $(call BuildPackage,libelektra-lua))
  330. $(eval $(call BuildPackage,libelektra-extra))