Makefile 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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:=4
  11. PKG_SOURCE_URL=$(PROJECT_GIT)/uci.git
  12. PKG_SOURCE_PROTO:=git
  13. PKG_SOURCE_DATE=2019-09-01
  14. PKG_SOURCE_VERSION:=415f9e48436d29f612348f58f546b3ad8d74ac38
  15. PKG_MIRROR_HASH:=06f2801b103c359129c1675cbe5045c2cd04d756c2ab1efd2160608f34a27a8f
  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. ABI_VERSION:=20130104
  30. endef
  31. define Package/uci
  32. SECTION:=base
  33. CATEGORY:=Base system
  34. DEPENDS:=+libuci
  35. TITLE:=Utility for the Unified Configuration Interface (UCI)
  36. endef
  37. define Package/libuci-lua
  38. SECTION=libs
  39. CATEGORY=Libraries
  40. DEPENDS:=+libuci +liblua
  41. TITLE:=Lua plugin for UCI
  42. endef
  43. TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include
  44. TARGET_LDFLAGS += -L$(STAGING_DIR)/usr/lib
  45. CMAKE_OPTIONS = \
  46. -DLUAPATH=/usr/lib/lua \
  47. $(if $(DEBUG),-DUCI_DEBUG=ON)
  48. define Package/libuci/install
  49. $(INSTALL_DIR) $(1)/lib
  50. $(CP) $(PKG_BUILD_DIR)/libuci.so* $(1)/lib/
  51. endef
  52. define Package/libuci-lua/install
  53. $(INSTALL_DIR) $(1)/usr/lib/lua
  54. $(CP) $(PKG_BUILD_DIR)/lua/uci.so $(1)/usr/lib/lua/
  55. endef
  56. define Package/uci/install
  57. $(INSTALL_DIR) $(1)/etc/uci-defaults
  58. $(INSTALL_DIR) $(1)/sbin
  59. $(INSTALL_BIN) $(PKG_BUILD_DIR)/uci $(1)/sbin/
  60. $(CP) ./files/* $(1)/
  61. endef
  62. define Build/InstallDev
  63. $(INSTALL_DIR) $(1)/usr/include
  64. $(CP) $(PKG_BUILD_DIR)/uci{,_config,_blob,map}.h $(1)/usr/include
  65. $(INSTALL_DIR) $(1)/usr/lib
  66. $(CP) $(PKG_BUILD_DIR)/libuci.so* $(1)/usr/lib
  67. $(CP) $(PKG_BUILD_DIR)/libucimap.a $(1)/usr/lib
  68. endef
  69. $(eval $(call BuildPackage,uci))
  70. $(eval $(call BuildPackage,libuci))
  71. $(eval $(call BuildPackage,libuci-lua))