[packages] nodogsplash: new OpenWrt package for new nodogsplash build system
[lede-routing/.git] / nodogsplash / Makefile
1 #
2 # Copyright (C) 2013 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=nodogsplash
11 PKG_VERSION:=0.9_beta9.9.8
12 PKG_RELEASE:=1
13
14 include $(INCLUDE_DIR)/package.mk
15
16
17 define Package/nodogsplash
18         SUBMENU:=Captive Portals
19         SECTION:=net
20         CATEGORY:=Network
21         DEPENDS:=+libpthread +iptables-mod-ipopt
22         TITLE:=Open public network gateway daemon
23         URL:=https://github.com/mwarning/nodogsplash
24 endef
25
26 define Package/nodogsplash/description
27         Nodogsplash offers a simple way to open a free hotspot providing
28         restricted access to an internet connection.
29 endef
30
31 define Build/Prepare
32         mkdir -p $(PKG_BUILD_DIR)
33         git clone https://github.com/mwarning/nodogsplash.git $(PKG_BUILD_DIR)
34 endef
35
36 #for sources inside the package
37 #define Build/Prepare
38 #       mkdir -p $(PKG_BUILD_DIR)
39 #       $(CP) ./src/* $(PKG_BUILD_DIR)/
40 #endef
41
42 define Package/nodogsplash/install
43         $(INSTALL_DIR) $(1)/usr/bin
44         $(INSTALL_BIN) $(PKG_BUILD_DIR)/nodogsplash $(1)/usr/bin/
45         $(INSTALL_BIN) $(PKG_BUILD_DIR)/ndsctl $(1)/usr/bin/
46
47         $(INSTALL_DIR) $(1)/etc/init.d
48         $(INSTALL_BIN) files/nodogsplash.init $(1)/etc/init.d/$(PKG_NAME)
49
50         $(INSTALL_DIR) $(1)/etc/$(PKG_NAME)/htdocs/images
51         $(CP) $(PKG_BUILD_DIR)/resources/nodogsplash.conf $(1)/etc/$(PKG_NAME)/
52         $(CP) $(PKG_BUILD_DIR)/resources/splash.html $(1)/etc/$(PKG_NAME)/htdocs/
53         $(CP) $(PKG_BUILD_DIR)/resources/infoskel.html $(1)/etc/$(PKG_NAME)/htdocs/
54         $(CP) $(PKG_BUILD_DIR)/resources/splash.jpg $(1)/etc/$(PKG_NAME)/htdocs/images/
55 endef
56
57
58 $(eval $(call BuildPackage,nodogsplash))