43c7fee69b8dff05075c20505c2ceb9122234a6b
[project/luci.git] / contrib / package / sysupgrade-atheros / Makefile
1 #
2 # Copyright (C) 2009 Jo-Philipp Wich <xm@subsignal.org>
3 #
4 # This is free software, licensed under the Apache 2.0 license.
5 #
6
7 include $(TOPDIR)/rules.mk
8
9 PKG_NAME:=sysupgrade-atheros
10 PKG_RELEASE:=1
11
12 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
13
14 include $(INCLUDE_DIR)/package.mk
15
16 define Package/sysupgrade-atheros
17   SECTION:=luci
18   CATEGORY:=LuCI
19   SUBMENU:=Freifunk
20   TITLE:=Experimental sysupgrade support for Atheros SoC
21   DEPENDS:=@TARGET_atheros +base-files
22 endef
23
24 define Package/sysupgrade-atheros/description
25   This package implements experimental sysupgrade support for Atheros SoC devices
26   like the classic Fonera or the D-Link DIR-300.
27   See https://lists.openwrt.org/pipermail/openwrt-devel/2009-June/004499.html for details.
28 endef
29
30 define Build/Prepare
31         mkdir -p $(PKG_BUILD_DIR)
32 endef
33
34 define Build/Configure
35 endef
36
37 define Build/Compile
38 endef
39
40 define Package/sysupgrade-atheros/postinst
41 #!/bin/sh
42 [ -n "$${IPKG_INSTROOT}" ] || {
43   if ! grep -q /etc/firewall.freifunk /etc/config/firewall; then
44     uci add firewall include >/dev/null
45     uci set firewall.@include[-1].path=/etc/firewall.freifunk
46     uci commit firewall
47   fi
48 }
49 endef
50
51 define Package/sysupgrade-atheros/install
52         $(CP) ./files/* $(1)/
53 endef
54
55 $(eval $(call BuildPackage,sysupgrade-atheros))