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.

405 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.18
  15. PKG_RELEASE:=1
  16. # Use this for official releasees
  17. PKG_MD5SUM:=62fe0fbf9ee57ffaa58a982f602f596a
  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. boolean cachefilter ccode conditionals csvstorage enum filecheck glob
  81. hexcode hidden hosts iconv keytometa line lineendings list mathcheck
  82. network null path profile shell syslog uname validation
  83. endef
  84. CONTENT_ELEKTRA_PLUGINS = $(strip $(CONTENT_ELEKTRA_PLUGINS_TEXT))
  85. define Package/libelektra-plugins/description
  86. $(call Package/libelektra/Default-description)
  87. This package contains plugins for various common configuration file
  88. format and optional features without heavy dependencies. Currently
  89. these plugins are included:
  90. $(CONTENT_ELEKTRA_PLUGINS_TEXT)
  91. endef
  92. define Package/libelektra-cpp
  93. $(call Package/libelektra/Default)
  94. TITLE:=Elektra plugins depending on libstdcpp
  95. DEPENDS:=+libelektra-core +libstdcpp
  96. endef
  97. CONTENT_ELEKTRA_CPP=dump regexstore struct type
  98. define Package/libelektra-cpp/description
  99. $(call Package/libelektra/Default-description)
  100. This package contains plugins written in C++.
  101. Currently these are:
  102. $(CONTENT_ELEKTRA_CPP)
  103. endef
  104. define Package/libelektra-boost
  105. $(call Package/libelektra/Default)
  106. TITLE:=Elektra plugins depending on boost
  107. DEPENDS:=+libelektra-core +libstdcpp +boost
  108. endef
  109. define Package/libelektra-boost/description
  110. $(call Package/libelektra/Default-description)
  111. This package contains plugins written in C++ with an dependency on
  112. boost. Currently this is a plugin for a tcl like format.
  113. endef
  114. define Package/libelektra-crypto
  115. $(call Package/libelektra/Default)
  116. TITLE:=Elektra crypto plugin
  117. DEPENDS:=+libelektra-core +libopenssl
  118. endef
  119. define Package/libelektra-crypto/description
  120. $(call Package/libelektra/Default-description)
  121. This package contains support for encrypting values before storage.
  122. endef
  123. define Package/libelektra-curlget
  124. $(call Package/libelektra/Default)
  125. TITLE:=Elektra curlget plugin
  126. DEPENDS:=+libelektra-core +libcurl
  127. endef
  128. define Package/libelektra-curlget/description
  129. $(call Package/libelektra/Default-description)
  130. This plugin can get configuration data from remote URLs before access.
  131. endef
  132. define Package/libelektra-dbus
  133. $(call Package/libelektra/Default)
  134. TITLE:=Elektra dbus plugin
  135. DEPENDS:=+libelektra-core +libdbus
  136. endef
  137. define Package/libelektra-dbus/description
  138. $(call Package/libelektra/Default-description)
  139. This package contains support for dbus notification on configuration
  140. changes.
  141. endef
  142. define Package/libelektra-xml
  143. $(call Package/libelektra/Default)
  144. TITLE:=Elektra xmltool plugin
  145. DEPENDS:=+libelektra-core +libxml2
  146. endef
  147. define Package/libelektra-xml/description
  148. $(call Package/libelektra/Default-description)
  149. This package contains a plugin for storing data with xml syntax.
  150. endef
  151. define Package/libelektra-yajl
  152. $(call Package/libelektra/Default)
  153. TITLE:=Elektra yajl (json) plugin
  154. DEPENDS:=+libelektra-core +yajl
  155. endef
  156. define Package/libelektra-yajl/description
  157. $(call Package/libelektra/Default-description)
  158. This package contains support for storing the key database as json files.
  159. endef
  160. define Package/libelektra-python2
  161. $(call Package/libelektra/Default)
  162. TITLE:=Elektra python2 plugin
  163. DEPENDS:=+libelektra-core +python-light +libstdcpp
  164. endef
  165. define Package/libelektra-python2/description
  166. $(call Package/libelektra/Default-description)
  167. This package adds python2 support to elektra.
  168. endef
  169. define Package/libelektra-python3
  170. $(call Package/libelektra/Default)
  171. TITLE:=Elektra python3 plugin
  172. DEPENDS:=+libelektra-core +python3-light +libstdcpp
  173. endef
  174. define Package/libelektra-python3/description
  175. $(call Package/libelektra/Default-description)
  176. This package adds python3 support to elektra.
  177. endef
  178. define Package/libelektra-lua
  179. $(call Package/libelektra/Default)
  180. TITLE:=Elektra lua plugin
  181. DEPENDS:=+libelektra-core +lua +libstdcpp
  182. endef
  183. define Package/libelektra-lua/description
  184. $(call Package/libelektra/Default-description)
  185. This package adds lua support to elektra.
  186. endef
  187. define Package/libelektra-extra
  188. $(call Package/libelektra/Default)
  189. TITLE:=Additional elektra plugins
  190. DEPENDS:=+libelektra-core
  191. endef
  192. define CONTENT_EXTRA_PLUGINS_TEXT
  193. blockresolver constants counter desktop dpkg error fstab logchange
  194. mozprefs passwd rename timeofday tracer
  195. endef
  196. CONTENT_ELEKTRA_EXTRA:=$(strip $(CONTENT_EXTRA_PLUGINS_TEXT))
  197. define Package/libelektra-extra/description
  198. $(call Package/libelektra/Default-description)
  199. This package contains extra plugins that are only useful for debugging
  200. or as an example of what can be done. Also most experimental plugins are
  201. included in this package. Currently this includes:
  202. $(CONTENT_EXTRA_PLUGINS_TEXT)
  203. endef
  204. CMAKE_OPTIONS = \
  205. -DTARGET_PLUGIN_FOLDER="" \
  206. -DBUILD_FULL=OFF \
  207. -DBUILD_STATIC=OFF \
  208. -DBUILD_DOCUMENTATION=OFF \
  209. -DFORCE_IN_SOURCE_BUILD=ON \
  210. -DBUILD_TESTING=OFF \
  211. -DKDB_DEFAULT_RESOLVER=resolver_fm_pb_b \
  212. -DKDB_DEFAULT_STORAGE=ini \
  213. -DENABLE_OPTIMIZATIONS=OFF \
  214. -DPLUGINS="ALL"
  215. CMAKE_HOST_OPTIONS = \
  216. -DCMAKE_SKIP_RPATH=FALSE \
  217. -DCMAKE_INSTALL_RPATH=$(STAGING_DIR_HOST)/lib/ \
  218. -DINSTALL_BUILD_TOOLS=ON \
  219. -DBUILD_STATIC=OFF \
  220. -DBUILD_DOCUMENTATION=OFF \
  221. -DINSTALL_SYSTEM_FILES=OFF \
  222. -DFORCE_IN_SOURCE_BUILD=ON \
  223. -DBUILD_TESTING=OFF \
  224. -DPLUGINS="ALL;-python2;-python" \
  225. -DTOOLS="gen;kdb"
  226. define Package/libelektra-core/install
  227. $(INSTALL_DIR) $(1)/etc/kdb/
  228. $(INSTALL_DIR) $(1)/usr/lib/
  229. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra.so* $(1)/usr/lib/
  230. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-core.so* $(1)/usr/lib/
  231. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-ease.so* $(1)/usr/lib/
  232. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-kdb.so* $(1)/usr/lib/
  233. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-meta.so* $(1)/usr/lib/
  234. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-plugin.so* $(1)/usr/lib/
  235. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-proposal.so* $(1)/usr/lib/
  236. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-resolver_fm_pb_b.so $(1)/usr/lib/
  237. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-ni.so $(1)/usr/lib/
  238. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-ini.so $(1)/usr/lib/
  239. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-sync.so $(1)/usr/lib/
  240. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-storage.so $(1)/usr/lib/
  241. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-resolver.so $(1)/usr/lib/
  242. endef
  243. define Package/elektra-kdb/install
  244. $(INSTALL_DIR) $(1)/usr/bin/
  245. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/kdb $(1)/usr/bin
  246. $(INSTALL_DIR) $(1)/usr/lib/elektra/
  247. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektratools* $(1)/usr/lib/
  248. $(CP) $(PKG_INSTALL_DIR)/usr/lib/elektra/tool_exec/ $(1)/usr/lib/elektra/
  249. endef
  250. define Package/libelektra-resolvers/install
  251. $(INSTALL_DIR) $(1)/usr/lib/
  252. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-resolver_* $(1)/usr/lib/
  253. rm -f $(1)/usr/lib/libelektra-resolver_fm_pb_b.so
  254. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-wresolver.so $(1)/usr/lib/
  255. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-noresolver.so $(1)/usr/lib/
  256. endef
  257. define Package/libelektra-plugins/install
  258. $(INSTALL_DIR) $(1)/usr/lib/
  259. $(CP) $(foreach plugin,$(CONTENT_ELEKTRA_PLUGINS),$(PKG_INSTALL_DIR)/usr/lib/libelektra-$(plugin).so) $(1)/usr/lib/
  260. endef
  261. define Package/libelektra-boost/install
  262. $(INSTALL_DIR) $(1)/usr/lib/
  263. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-tcl.so $(1)/usr/lib/
  264. endef
  265. define Package/libelektra-cpp/install
  266. $(INSTALL_DIR) $(1)/usr/lib/
  267. $(CP) $(foreach plugin,$(CONTENT_ELEKTRA_CPP),$(PKG_INSTALL_DIR)/usr/lib/libelektra-$(plugin).so) $(1)/usr/lib/
  268. endef
  269. define Package/libelektra-crypto/install
  270. $(INSTALL_DIR) $(1)/usr/lib/
  271. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-crypto_openssl.so $(1)/usr/lib/
  272. endef
  273. define Package/libelektra-curlget/install
  274. $(INSTALL_DIR) $(1)/usr/lib/
  275. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-curlget.so $(1)/usr/lib/
  276. endef
  277. define Package/libelektra-dbus/install
  278. $(INSTALL_DIR) $(1)/usr/lib/
  279. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-dbus.so $(1)/usr/lib/
  280. endef
  281. define Package/libelektra-xml/install
  282. $(INSTALL_DIR) $(1)/usr/lib/
  283. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-xmltool.so $(1)/usr/lib/
  284. endef
  285. define Package/libelektra-yajl/install
  286. $(INSTALL_DIR) $(1)/usr/lib/
  287. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-yajl.so $(1)/usr/lib/
  288. endef
  289. define Package/libelektra-python2/install
  290. $(INSTALL_DIR) $(1)/usr/lib/
  291. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-python2.so $(1)/usr/lib/
  292. endef
  293. define Package/libelektra-python3/install
  294. $(INSTALL_DIR) $(1)/usr/lib/
  295. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-python.so $(1)/usr/lib/
  296. endef
  297. define Package/libelektra-lua/install
  298. $(INSTALL_DIR) $(1)/usr/lib/
  299. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libelektra-lua.so $(1)/usr/lib/
  300. endef
  301. define Package/libelektra-extra/install
  302. $(INSTALL_DIR) $(1)/usr/lib/
  303. $(CP) $(foreach plugin,$(CONTENT_ELEKTRA_EXTRA),$(PKG_INSTALL_DIR)/usr/lib/libelektra-$(plugin).so) $(1)/usr/lib/
  304. endef
  305. define Build/InstallDev
  306. $(INSTALL_DIR) $(1)/usr/include/elektra/
  307. $(CP) $(PKG_INSTALL_DIR)/usr/include/elektra/* $(1)/usr/include/elektra/
  308. $(INSTALL_DIR) $(1)/usr/lib/
  309. $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
  310. endef
  311. $(eval $(call HostBuild))
  312. $(eval $(call BuildPackage,libelektra-core))
  313. $(eval $(call BuildPackage,elektra-kdb))
  314. $(eval $(call BuildPackage,libelektra-resolvers))
  315. $(eval $(call BuildPackage,libelektra-plugins))
  316. $(eval $(call BuildPackage,libelektra-boost))
  317. $(eval $(call BuildPackage,libelektra-cpp))
  318. $(eval $(call BuildPackage,libelektra-curlget))
  319. $(eval $(call BuildPackage,libelektra-crypto))
  320. $(eval $(call BuildPackage,libelektra-dbus))
  321. $(eval $(call BuildPackage,libelektra-xml))
  322. $(eval $(call BuildPackage,libelektra-yajl))
  323. $(eval $(call BuildPackage,libelektra-python2))
  324. $(eval $(call BuildPackage,libelektra-python3))
  325. $(eval $(call BuildPackage,libelektra-lua))
  326. $(eval $(call BuildPackage,libelektra-extra))