Merge pull request #401 from mwarning/nodogsplash2
[feed/routing.git] / nodogsplash / Makefile
1 #
2 # This is free software, licensed under the GNU General Public License v2.
3 # See /LICENSE for more information.
4 #
5
6 include $(TOPDIR)/rules.mk
7
8 PKG_NAME:=nodogsplash
9 PKG_FIXUP:=autoreconf
10 PKG_VERSION:=3.0.0
11 PKG_RELEASE:=0
12
13 PKG_SOURCE_URL:=https://codeload.github.com/nodogsplash/nodogsplash/tar.gz/v$(PKG_VERSION)?
14 PKG_SOURCE:=nodogsplash-$(PKG_VERSION).tar.gz
15 PKG_HASH:=01a5adc9202781fa725c6b20e4c1d0f5cede2f65d3db3dbb9bacb81d3e1c5ba5
16 PKG_BUILD_DIR:=$(BUILD_DIR)/nodogsplash-$(PKG_VERSION)
17
18 PKG_MAINTAINER:=Moritz Warning <moritzwarning@web.de>
19 PKG_BUILD_PARALLEL:=1
20 PKG_LICENSE:=GPL-2.0+
21
22 include $(INCLUDE_DIR)/package.mk
23
24
25 define Package/nodogsplash
26 SUBMENU:=Captive Portals
27 SECTION:=net
28 CATEGORY:=Network
29 DEPENDS:=+libpthread +iptables-mod-ipopt +libmicrohttpd-no-ssl
30 TITLE:=Open public network gateway daemon
31 URL:=https://github.com/nodogsplash/nodogsplash
32 endef
33
34 define Package/nodogsplash/description
35 Nodogsplash offers a simple way to open a free hotspot providing
36 restricted access to an internet connection.
37 endef
38
39 define Package/nodogsplash/install
40 $(CP) ./files/* $(1)/
41
42 $(INSTALL_DIR) $(1)/usr/bin
43 $(INSTALL_BIN) $(PKG_BUILD_DIR)/nodogsplash $(1)/usr/bin/
44 $(INSTALL_BIN) $(PKG_BUILD_DIR)/ndsctl $(1)/usr/bin/
45
46 $(INSTALL_DIR) $(1)/etc/nodogsplash/htdocs/images
47 $(CP) $(PKG_BUILD_DIR)/resources/splash.html $(1)/etc/nodogsplash/htdocs/
48 $(CP) $(PKG_BUILD_DIR)/resources/status.html $(1)/etc/nodogsplash/htdocs/
49 $(CP) $(PKG_BUILD_DIR)/resources/splash.jpg $(1)/etc/nodogsplash/htdocs/images/
50 endef
51
52 define Package/nodogsplash/postrm
53 #!/bin/sh
54 uci delete firewall.nodogsplash
55 uci commit firewall
56 endef
57
58 define Package/nodogsplash/conffiles
59 /etc/config/nodogsplash
60 endef
61
62 $(eval $(call BuildPackage,nodogsplash))