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
:=00379a1da940eb6427c57e79c0d9605c
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
50 TARGET_CFLAGS
+= $(FPIC
)
52 $(TARGET_CONFIGURE_OPTS
) \
53 COPTS
="$(TARGET_CFLAGS)" \
55 VERSION
="$(UCI_VERSION)" \
56 CPPFLAGS
="-I$(PKG_BUILD_DIR) -I$(STAGING_DIR)/usr/include" \
60 $(MAKE
) -C
$(PKG_BUILD_DIR
) $(UCI_MAKEOPTS
)
61 $(MAKE
) -C
$(PKG_BUILD_DIR
)/lua
$(UCI_MAKEOPTS
)
64 define Package
/libuci
/install
65 $(INSTALL_DIR
) $(1)/lib
66 $(CP
) $(PKG_BUILD_DIR
)/libuci.so
* $(1)/lib
/
69 define Package
/libuci-lua
/install
70 $(INSTALL_DIR
) $(1)/usr
/lib
/lua
71 $(CP
) $(PKG_BUILD_DIR
)/lua
/uci.so
$(1)/usr
/lib
/lua
/
74 define Package
/uci
/install
75 $(INSTALL_DIR
) $(1)/etc
/uci-defaults
76 $(INSTALL_DIR
) $(1)/sbin
77 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/uci
$(1)/sbin
/
81 define Build
/InstallDev
82 $(INSTALL_DIR
) $(1)/usr
/include
83 $(CP
) $(PKG_BUILD_DIR
)/uci
{,_config
}.h
$(1)/usr
/include
84 $(INSTALL_DIR
) $(1)/usr
/lib
85 $(CP
) $(PKG_BUILD_DIR
)/libuci.so
* $(1)/usr
/lib
88 $(eval
$(call BuildPackage
,uci
))
89 $(eval
$(call BuildPackage
,libuci
))
90 $(eval
$(call BuildPackage
,libuci-lua
))