* Reworked Theme "Fledermaus"
[project/luci.git] / contrib / package / ffluci / Makefile
1 include $(TOPDIR)/rules.mk
2
3 PKG_NAME:=ffluci
4 PKG_REV:=HEAD
5 PKG_VERSION:=0.3+svn$(PKG_REV)
6 PKG_RELEASE:=1
7 PKG_BRANCH:=trunk
8
9 PKG_SOURCE_PROTO:=svn
10 PKG_SOURCE_VERSION:=$(PKG_REV)
11 PKG_SOURCE_URL:=https://dev.leipzig.freifunk.net/svn/ff-luci/$(PKG_BRANCH)
12 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
13 PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz
14
15 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
16 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
17
18 PKG_BUILD_DEPENDS:=lua-luci
19
20 MAKE_ACTION:=compile LUAC=$(BUILD_DIR_HOST)/lua-luci/luac
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/ffluci
25 SECTION:=admin
26 CATEGORY:=Administration
27 TITLE:=FFLuCI
28 SUBMENU:=FFLuCI
29 DEPENDS:=+luaposix +haserl-lua +ffluci-system-addons +ffluci-splash
30 MAINTAINER:=Steven Barth <steven-at-midlink-dot-org>
31 endef
32
33 define Build/Configure
34 endef
35
36 define Build/Compile
37 $(MAKE) -C $(PKG_BUILD_DIR)/core $(MAKE_ACTION)
38 $(MAKE) -C $(PKG_BUILD_DIR)/module/admin-core $(MAKE_ACTION)
39 $(MAKE) -C $(PKG_BUILD_DIR)/module/public-core $(MAKE_ACTION)
40 $(MAKE) -C $(PKG_BUILD_DIR)/module/rpc-core $(MAKE_ACTION)
41 endef
42
43 define Package/ffluci/install
44 $(INSTALL_DIR) $(1)/usr/lib/lua/ffluci
45 $(INSTALL_DIR) $(1)/www/cgi-bin
46 $(INSTALL_DIR) $(1)/www/ffluci
47 $(INSTALL_DIR) $(1)/etc/config
48 $(INSTALL_DIR) $(1)/etc/init.d
49 $(INSTALL_DIR) $(1)/sbin
50 $(INSTALL_DIR) $(1)/etc/hotplug.d/iface
51
52 $(CP) $(PKG_BUILD_DIR)/core/dist/* $(1)/usr/lib/lua/ -R
53 $(CP) $(PKG_BUILD_DIR)/core/contrib/uci/* $(1)/etc/config/
54 $(INSTALL_BIN) $(PKG_BUILD_DIR)/core/contrib/ffluci $(1)/www/cgi-bin
55 $(INSTALL_BIN) $(PKG_BUILD_DIR)/core/contrib/ffluci-upload $(1)/www/cgi-bin
56 $(INSTALL_BIN) $(PKG_BUILD_DIR)/core/contrib/index.cgi $(1)/www/cgi-bin
57 $(INSTALL_BIN) $(PKG_BUILD_DIR)/core/contrib/index.html $(1)/www
58
59 $(CP) $(PKG_BUILD_DIR)/themes/fledermaus/contrib/media $(1)/www/ffluci/ -R
60
61 $(CP) $(PKG_BUILD_DIR)/module/admin-core/dist/* $(1)/usr/lib/lua/ffluci/ -R
62 $(CP) $(PKG_BUILD_DIR)/module/admin-core/contrib/uci/luci_fw $(1)/etc/config/luci_fw
63 $(INSTALL_BIN) $(PKG_BUILD_DIR)/module/admin-core/contrib/init.d/luci_fw $(1)/etc/init.d/luci_fw
64 $(INSTALL_BIN) $(PKG_BUILD_DIR)/module/admin-core/contrib/init.d/luci_freifunk $(1)/etc/init.d/luci_freifunk
65 $(INSTALL_BIN) $(PKG_BUILD_DIR)/module/admin-core/contrib/ffluci-flash $(1)/sbin
66 $(INSTALL_BIN) $(PKG_BUILD_DIR)/module/admin-core/contrib/luci-splash $(1)/www/cgi-bin
67
68 $(CP) $(PKG_BUILD_DIR)/module/public-core/dist/* $(1)/usr/lib/lua/ffluci/ -R
69 $(CP) $(PKG_BUILD_DIR)/module/public-core/contrib/media $(1)/www/ffluci/ -R
70
71 $(CP) $(PKG_BUILD_DIR)/module/rpc-core/dist/* $(1)/usr/lib/lua/ffluci/ -R
72
73 $(CP) -a ./ipkg/ffluci.postinst $(1)/CONTROL/postinst
74 $(CP) -a ./ipkg/conffiles $(1)/CONTROL/conffiles
75 rm $(DL_DIR)/$(PKG_SOURCE)
76 endef
77
78 $(eval $(call BuildPackage,ffluci))