Makefile 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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=$(PROJECT_GIT)/uci.git
  12. PKG_SOURCE_PROTO:=git
  13. PKG_SOURCE_DATE=2023-08-10
  14. PKG_SOURCE_VERSION:=5781664d5087ccc4b5ab58505883231212dbedbc
  15. PKG_MIRROR_HASH:=2d60a8543fa00cfc75df6417354b004abf58f672c91bf0a3bffe3ea1dbf84a4b
  16. PKG_LICENSE:=LGPL-2.1
  17. PKG_LICENSE_FILES:=
  18. PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
  19. include $(INCLUDE_DIR)/package.mk
  20. include $(INCLUDE_DIR)/cmake.mk
  21. # set to 1 to enable debugging
  22. DEBUG=
  23. define Package/libuci
  24. SECTION:=libs
  25. CATEGORY:=Libraries
  26. TITLE:=C library for the Unified Configuration Interface (UCI)
  27. DEPENDS:=+libubox
  28. ABI_VERSION:=20130104
  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,libuci))
  69. $(eval $(call BuildPackage,libuci-lua))
  70. $(eval $(call BuildPackage,uci))