Makefile 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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.2
  10. UCI_RELEASE=1
  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:=ef8e4f1d80d7c55079e9781a6d4a3f0d
  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/uci-sh
  32. SECTION:=base
  33. CATEGORY:=Base system
  34. DEPENDS:=@!PACKAGE_uci
  35. TITLE:=Old shell/awk implementation of UCI
  36. endef
  37. define Build/Configure
  38. endef
  39. define Build/Compile
  40. $(MAKE) -C $(PKG_BUILD_DIR) \
  41. $(TARGET_CONFIGURE_OPTS) \
  42. COPTS="$(TARGET_CFLAGS)" \
  43. DEBUG="$(DEBUG)" \
  44. VERSION="$(UCI_VERSION)" \
  45. OS="Linux"
  46. endef
  47. define Package/libuci/install
  48. $(INSTALL_DIR) $(1)/lib
  49. $(CP) $(PKG_BUILD_DIR)/libuci.so* $(1)/lib/
  50. endef
  51. define Package/uci/install
  52. $(INSTALL_DIR) $(1)/sbin
  53. $(INSTALL_BIN) $(PKG_BUILD_DIR)/uci $(1)/sbin/
  54. $(CP) ./files/uci/* $(1)/
  55. endef
  56. define Package/uci-sh/install
  57. $(INSTALL_DIR) $(1)
  58. $(CP) ./files/uci-sh/* $(1)/
  59. endef
  60. $(eval $(call BuildPackage,uci))
  61. $(eval $(call BuildPackage,libuci))
  62. $(eval $(call BuildPackage,uci-sh))