2 # Copyright (C) 2008 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 include $(TOPDIR
)/rules.mk
15 PKG_VERSION
:=$(UCI_VERSION
)$(if
$(UCI_RELEASE
),.
$(UCI_RELEASE
))
18 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
19 PKG_SOURCE_URL
:=http
://downloads.openwrt.org
/sources
20 PKG_MD5SUM
:=8268990d6f31872943c947c9b4529d59
22 include $(INCLUDE_DIR
)/package.mk
24 # set to 1 to enable debugging
30 TITLE
:=C library for the Unified Configuration Interface
(UCI
)
37 TITLE
:=Utility for the Unified Configuration Interface
(UCI
)
40 define Package
/libuci-lua
44 TITLE
:=Lua plugin for UCI
47 define Build
/Configure
51 $(TARGET_CONFIGURE_OPTS
) \
52 COPTS
="$(TARGET_CFLAGS)" \
54 VERSION
="$(UCI_VERSION)" \
55 CPPFLAGS
="-I$(PKG_BUILD_DIR) -I$(STAGING_DIR)/usr/include" \
59 $(MAKE
) -C
$(PKG_BUILD_DIR
) $(UCI_MAKEOPTS
)
60 $(MAKE
) -C
$(PKG_BUILD_DIR
)/lua
$(UCI_MAKEOPTS
)
63 define Package
/libuci
/install
64 $(INSTALL_DIR
) $(1)/lib
65 $(CP
) $(PKG_BUILD_DIR
)/libuci.so
* $(1)/lib
/
68 define Package
/libuci-lua
/install
69 $(INSTALL_DIR
) $(1)/usr
/lib
/lua
70 $(CP
) $(PKG_BUILD_DIR
)/lua
/uci.so
$(1)/usr
/lib
/lua
/
73 define Package
/uci
/install
74 $(INSTALL_DIR
) $(1)/etc
/uci-defaults
75 $(INSTALL_DIR
) $(1)/sbin
76 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/uci
$(1)/sbin
/
80 define Build
/InstallDev
81 $(INSTALL_DIR
) $(1)/usr
/include
82 $(CP
) $(PKG_BUILD_DIR
)/uci
{,_config
}.h
$(1)/usr
/include
83 $(INSTALL_DIR
) $(1)/usr
/lib
84 $(CP
) $(PKG_BUILD_DIR
)/libuci.so
* $(1)/usr
/lib
87 $(eval
$(call BuildPackage
,uci
))
88 $(eval
$(call BuildPackage
,libuci
))
89 $(eval
$(call BuildPackage
,libuci-lua
))