Makefile 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. #
  2. # Copyright (C) 2008 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. # $Id$
  8. include $(TOPDIR)/rules.mk
  9. UCI_VERSION=0.6
  10. UCI_RELEASE=4
  11. PKG_NAME:=uci
  12. PKG_VERSION:=$(UCI_VERSION)$(if $(UCI_RELEASE),.$(UCI_RELEASE))
  13. PKG_RELEASE:=1
  14. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  15. PKG_SOURCE_URL:=http://downloads.openwrt.org/sources
  16. PKG_MD5SUM:=5f67132f2c225e7a5c8bd814f2dff2a9
  17. include $(INCLUDE_DIR)/package.mk
  18. # set to 1 to enable debugging
  19. DEBUG=
  20. define Package/libuci
  21. SECTION:=libs
  22. CATEGORY:=Libraries
  23. TITLE:=C library for the Unified Configuration Interface (UCI)
  24. endef
  25. define Package/uci
  26. SECTION:=base
  27. CATEGORY:=Base system
  28. DEPENDS:=+libuci
  29. TITLE:=Utility for the Unified Configuration Interface (UCI)
  30. endef
  31. define Package/libuci-lua
  32. SECTION=libs
  33. CATEGORY=Libraries
  34. DEPENDS:=+libuci +lua
  35. TITLE:=Lua plugin for UCI
  36. endef
  37. define Build/Configure
  38. endef
  39. TARGET_CFLAGS += $(FPIC)
  40. UCI_MAKEOPTS = \
  41. $(TARGET_CONFIGURE_OPTS) \
  42. COPTS="$(TARGET_CFLAGS)" \
  43. DEBUG="$(DEBUG)" \
  44. VERSION="$(UCI_VERSION)" \
  45. CPPFLAGS="-I$(PKG_BUILD_DIR) -I$(STAGING_DIR)/usr/include" \
  46. OS="Linux"
  47. define Build/Compile
  48. $(MAKE) -C $(PKG_BUILD_DIR) $(UCI_MAKEOPTS)
  49. $(MAKE) -C $(PKG_BUILD_DIR)/lua $(UCI_MAKEOPTS)
  50. endef
  51. define Package/libuci/install
  52. $(INSTALL_DIR) $(1)/lib
  53. $(CP) $(PKG_BUILD_DIR)/libuci.so* $(1)/lib/
  54. endef
  55. define Package/libuci-lua/install
  56. $(INSTALL_DIR) $(1)/usr/lib/lua
  57. $(CP) $(PKG_BUILD_DIR)/lua/uci.so $(1)/usr/lib/lua/
  58. endef
  59. define Package/uci/install
  60. $(INSTALL_DIR) $(1)/etc/uci-defaults
  61. $(INSTALL_DIR) $(1)/sbin
  62. $(INSTALL_BIN) $(PKG_BUILD_DIR)/uci $(1)/sbin/
  63. $(CP) ./files/* $(1)/
  64. endef
  65. define Build/InstallDev
  66. $(INSTALL_DIR) $(1)/usr/include
  67. $(CP) $(PKG_BUILD_DIR)/uci{,_config}.h $(1)/usr/include
  68. $(INSTALL_DIR) $(1)/usr/lib
  69. $(CP) $(PKG_BUILD_DIR)/libuci.so* $(1)/usr/lib
  70. endef
  71. $(eval $(call BuildPackage,uci))
  72. $(eval $(call BuildPackage,libuci))
  73. $(eval $(call BuildPackage,libuci-lua))