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.
8 include $(TOPDIR
)/rules.mk
10 UCI_VERSION
=2011-01-19
14 PKG_VERSION
:=$(UCI_VERSION
)$(if
$(UCI_RELEASE
),.
$(UCI_RELEASE
))
16 PKG_REV
:=a5eb996e0f04d911ff61479508bbc3e17b16ff0c
18 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
19 PKG_SOURCE_URL
:=git
://nbd.name
/uci.git
20 PKG_SOURCE_SUBDIR
:=uci-
$(PKG_VERSION
)
21 PKG_SOURCE_VERSION
:=$(PKG_REV
)
24 include $(INCLUDE_DIR
)/package.mk
26 # set to 1 to enable debugging
32 TITLE
:=C library for the Unified Configuration Interface
(UCI
)
39 TITLE
:=Utility for the Unified Configuration Interface
(UCI
)
42 define Package
/ucitrigger
45 DEPENDS
:=+libuci-lua
+lua
46 TITLE
:=Automatic triggers for applying system config changes
49 define Package
/libuci-lua
52 DEPENDS
:=+libuci
+liblua
53 TITLE
:=Lua plugin for UCI
56 define Build
/Configure
60 $(TARGET_CONFIGURE_OPTS
) \
61 COPTS
="$(TARGET_CFLAGS)" \
63 VERSION
="$(UCI_VERSION)" \
64 CPPFLAGS
="-I$(PKG_BUILD_DIR) $(TARGET_CPPFLAGS)" \
69 $(MAKE
) -C
$(PKG_BUILD_DIR
) $(UCI_MAKEOPTS
)
70 $(MAKE
) -C
$(PKG_BUILD_DIR
)/lua
$(UCI_MAKEOPTS
)
71 $(MAKE
) -C
$(PKG_BUILD_DIR
)/trigger
$(UCI_MAKEOPTS
) \
72 LIBS
="$(TARGET_LDFLAGS) -L$(PKG_BUILD_DIR) -luci -llua -lcrypt -lm"
75 define Package
/libuci
/install
76 $(INSTALL_DIR
) $(1)/lib
77 $(CP
) $(PKG_BUILD_DIR
)/libuci.so
* $(1)/lib
/
80 define Package
/libuci-lua
/install
81 $(INSTALL_DIR
) $(1)/usr
/lib
/lua
82 $(CP
) $(PKG_BUILD_DIR
)/lua
/uci.so
$(1)/usr
/lib
/lua
/
85 define Package
/ucitrigger
/install
86 $(INSTALL_DIR
) $(1)/usr
/lib
/lua
/uci
$(1)/lib
/config
/trigger
$(1)/usr
/sbin
87 $(INSTALL_DATA
) .
/trigger
/lib
/trigger.lua
$(1)/usr
/lib
/lua
/uci
/
88 $(INSTALL_DATA
) .
/trigger
/modules
/*.lua
$(1)/lib
/config
/trigger
/
89 $(INSTALL_DATA
) $(PKG_BUILD_DIR
)/trigger
/uci_trigger.so
$(1)/usr
/lib
/
90 $(INSTALL_BIN
) .
/trigger
/apply_config
$(1)/usr
/sbin
/
93 define Package
/uci
/install
94 $(INSTALL_DIR
) $(1)/etc
/uci-defaults
95 $(INSTALL_DIR
) $(1)/sbin
96 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/uci
$(1)/sbin
/
100 define Build
/InstallDev
101 $(INSTALL_DIR
) $(1)/usr
/include
102 $(CP
) $(PKG_BUILD_DIR
)/uci
{,_config
,map
}.h
$(1)/usr
/include
103 $(INSTALL_DIR
) $(1)/usr
/lib
104 $(CP
) $(PKG_BUILD_DIR
)/libuci.so
* $(1)/usr
/lib
105 $(CP
) $(PKG_BUILD_DIR
)/libuci.a
$(1)/usr
/lib
108 $(eval
$(call BuildPackage
,uci
))
109 $(eval
$(call BuildPackage
,libuci
))
110 $(eval
$(call BuildPackage
,libuci-lua
))
111 $(eval
$(call BuildPackage
,ucitrigger
))