blob: 677c865ce1eac67eb3394dfc3c5157eadea70584 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
include $(TOPDIR)/rules.mk
PKG_NAME:=ffluci
PKG_VERSION:=0.2
PKG_RELEASE:=1
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
MAKE_ACTION:=dist-source
include $(INCLUDE_DIR)/package.mk
define Package/ffluci
SECTION:=admin
CATEGORY:=Administration
TITLE:=FFLuCI
DEPENDS:=+liblua +luafilesystem +haserl
MAINTAINER:=Steven Barth <steven-at-midlink-dot-org>
endef
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)
$(CP) ./src/* $(PKG_BUILD_DIR)/ -R
endef
define Build/Configure
endef
define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_ACTION)
endef
define Package/ffluci/install
$(INSTALL_DIR) $(1)/usr/lib/lua
$(INSTALL_DIR) $(1)/www/cgi-bin
$(INSTALL_DIR) $(1)/www/ffluci
$(CP) $(PKG_BUILD_DIR)/dist/* $(1)/usr/lib/lua/ -R
$(CP) $(PKG_BUILD_DIR)/contrib/media $(1)/www/ffluci/ -R
$(INSTALL_BIN) $(PKG_BUILD_DIR)/contrib/ffluci $(1)/www/cgi-bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/contrib/index.cgi $(1)/www/cgi-bin
$(CP) $(PKG_BUILD_DIR)/contrib/ffluci.uci $(1)/etc/config/luci
$(CP) -a ./ipkg/ffluci.postinst $(1)/CONTROL/postinst
$(CP) -a ./ipkg/conffiles $(1)/CONTROL/conffiles
endef
$(eval $(call BuildPackage,ffluci))
|