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
:=63ca39fcc1fc3819ab6daeabcc241cda
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" \
59 # work around a nasty gcc bug
60 ifneq ($(CONFIG_GCC_VERSION_4_2_4
),)
61 UCI_MAKEOPTS
+= WOPTS
=""
65 $(MAKE
) -C
$(PKG_BUILD_DIR
) $(UCI_MAKEOPTS
)
66 $(MAKE
) -C
$(PKG_BUILD_DIR
)/lua
$(UCI_MAKEOPTS
)
69 define Package
/libuci
/install
70 $(INSTALL_DIR
) $(1)/lib
71 $(CP
) $(PKG_BUILD_DIR
)/libuci.so
* $(1)/lib
/
74 define Package
/libuci-lua
/install
75 $(INSTALL_DIR
) $(1)/usr
/lib
/lua
76 $(CP
) $(PKG_BUILD_DIR
)/lua
/uci.so
$(1)/usr
/lib
/lua
/
79 define Package
/uci
/install
80 $(INSTALL_DIR
) $(1)/etc
/uci-defaults
81 $(INSTALL_DIR
) $(1)/sbin
82 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/uci
$(1)/sbin
/
86 define Build
/InstallDev
87 $(INSTALL_DIR
) $(1)/usr
/include
88 $(CP
) $(PKG_BUILD_DIR
)/uci
{,_config
}.h
$(1)/usr
/include
89 $(INSTALL_DIR
) $(1)/usr
/lib
90 $(CP
) $(PKG_BUILD_DIR
)/libuci.so
* $(1)/usr
/lib
91 $(CP
) $(PKG_BUILD_DIR
)/libuci.a
$(1)/usr
/lib
92 $(CP
) $(PKG_BUILD_DIR
)/libucimap.a
$(1)/usr
/lib
95 $(eval
$(call BuildPackage
,uci
))
96 $(eval
$(call BuildPackage
,libuci
))
97 $(eval
$(call BuildPackage
,libuci-lua
))