* luci/contrib/luci-addons: fix config file overwriting issue
[project/luci.git] / contrib / package / luci-addons / Makefile
1 include $(TOPDIR)/rules.mk
2
3 PKG_NAME:=luci-addons
4 PKG_VERSION:=0.3
5 PKG_RELEASE:=1
6
7 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
8 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
9
10 include $(INCLUDE_DIR)/package.mk
11
12
13 define Build/Compile
14 endef
15
16
17 define Package/luci-addons
18   SECTION:=utils
19   CATEGORY:=Utilities
20   TITLE:=LuCI System Addons for Kamikaze
21   URL:=http://luci.freifunk-halle.net
22 endef
23
24 define Package/luci-addons/conffiles
25 /etc/config/luci_hosts
26 /etc/config/luci_ethers
27 endef
28
29 define Package/luci-addons/install
30         $(INSTALL_DIR) $(1)/usr/bin
31         $(INSTALL_DIR) $(1)/sbin
32         $(INSTALL_DIR) $(1)/etc/crontabs
33         $(INSTALL_DIR) $(1)/etc/init.d
34         $(INSTALL_DIR) $(1)/etc/config
35
36         $(INSTALL_BIN) ./dist/usr/bin/run-parts $(1)/usr/bin
37         $(INSTALL_BIN) ./dist/sbin/luci-flash $(1)/sbin
38         $(INSTALL_BIN) ./dist/etc/init.d/luci_fixtime $(1)/etc/init.d
39         $(INSTALL_BIN) ./dist/etc/init.d/luci_ethers $(1)/etc/init.d
40         $(INSTALL_BIN) ./dist/etc/init.d/luci_hosts $(1)/etc/init.d
41
42         $(INSTALL_CONF) ./dist/etc/config/luci_ethers $(1)/etc/config
43         $(INSTALL_CONF) ./dist/etc/config/luci_hosts $(1)/etc/config
44
45         $(CP) ./dist/etc/crontabs/root $(1)/etc/crontabs/root
46 endef
47
48 $(eval $(call BuildPackage,luci-addons))