2
0

Makefile 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. #
  2. # Copyright (C) 2008-2014 OpenWrt.org
  3. # Copyright (C) 2016 LEDE project
  4. #
  5. # This is free software, licensed under the GNU General Public License v2.
  6. # See /LICENSE for more information.
  7. #
  8. include $(TOPDIR)/rules.mk
  9. PKG_NAME:=uci
  10. PKG_RELEASE:=1
  11. PKG_SOURCE_URL=$(LEDE_GIT)/project/uci.git
  12. PKG_SOURCE_PROTO:=git
  13. PKG_SOURCE_DATE=2016-07-04
  14. PKG_SOURCE_VERSION:=e1bf4356e1b513e158e1b5049147087ed6342cfd
  15. PKG_MIRROR_HASH:=4994a10a9e15f71312502f8babf045da7cea18c64227b387fc2dcf64f2252f19
  16. PKG_LICENSE:=LGPL-2.1
  17. PKG_LICENSE_FILES:=
  18. PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
  19. PKG_BUILD_PARALLEL:=0
  20. include $(INCLUDE_DIR)/package.mk
  21. include $(INCLUDE_DIR)/cmake.mk
  22. # set to 1 to enable debugging
  23. DEBUG=
  24. define Package/libuci
  25. SECTION:=libs
  26. CATEGORY:=Libraries
  27. TITLE:=C library for the Unified Configuration Interface (UCI)
  28. DEPENDS:=+libubox
  29. endef
  30. define Package/uci
  31. SECTION:=base
  32. CATEGORY:=Base system
  33. DEPENDS:=+libuci
  34. TITLE:=Utility for the Unified Configuration Interface (UCI)
  35. endef
  36. define Package/libuci-lua
  37. SECTION=libs
  38. CATEGORY=Libraries
  39. DEPENDS:=+libuci +liblua
  40. TITLE:=Lua plugin for UCI
  41. endef
  42. TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include
  43. TARGET_LDFLAGS += -L$(STAGING_DIR)/usr/lib
  44. CMAKE_OPTIONS = \
  45. -DLUAPATH=/usr/lib/lua \
  46. $(if $(DEBUG),-DUCI_DEBUG=ON)
  47. define Package/libuci/install
  48. $(INSTALL_DIR) $(1)/lib
  49. $(CP) $(PKG_BUILD_DIR)/libuci.so* $(1)/lib/
  50. endef
  51. define Package/libuci-lua/install
  52. $(INSTALL_DIR) $(1)/usr/lib/lua
  53. $(CP) $(PKG_BUILD_DIR)/lua/uci.so $(1)/usr/lib/lua/
  54. endef
  55. define Package/uci/install
  56. $(INSTALL_DIR) $(1)/etc/uci-defaults
  57. $(INSTALL_DIR) $(1)/sbin
  58. $(INSTALL_BIN) $(PKG_BUILD_DIR)/uci $(1)/sbin/
  59. $(CP) ./files/* $(1)/
  60. endef
  61. define Build/InstallDev
  62. $(INSTALL_DIR) $(1)/usr/include
  63. $(CP) $(PKG_BUILD_DIR)/uci{,_config,_blob,map}.h $(1)/usr/include
  64. $(INSTALL_DIR) $(1)/usr/lib
  65. $(CP) $(PKG_BUILD_DIR)/libuci.so* $(1)/usr/lib
  66. $(CP) $(PKG_BUILD_DIR)/libucimap.a $(1)/usr/lib
  67. endef
  68. $(eval $(call BuildPackage,uci))
  69. $(eval $(call BuildPackage,libuci))
  70. $(eval $(call BuildPackage,libuci-lua))