Merge pull request #395 from mwarning/nodogsplash2
[feed/routing.git] / nodogsplash2 / 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:=nodogsplash2
9 PKG_FIXUP:=autoreconf
10 PKG_VERSION:=2.1.1
11 PKG_RELEASE:=1
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:=86463a93259f34745a7427d643e0810e7776d37470b32f4f823a1e6019ba9246
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/nodogsplash2
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 CONFLICTS:=nodogsplash
33 endef
34
35 define Package/nodogsplash2/description
36 Nodogsplash offers a simple way to open a free hotspot providing
37 restricted access to an internet connection.
38 endef
39
40 define Package/nodogsplash2/install
41 $(CP) ./files/* $(1)/
42
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/nodogsplash/htdocs/images
48 $(CP) $(PKG_BUILD_DIR)/resources/splash.html $(1)/etc/nodogsplash/htdocs/
49 $(CP) $(PKG_BUILD_DIR)/resources/infoskel.html $(1)/etc/nodogsplash/htdocs/
50 $(CP) $(PKG_BUILD_DIR)/resources/splash.jpg $(1)/etc/nodogsplash/htdocs/images/
51 endef
52
53 define Package/nodogsplash2/postrm
54 #!/bin/sh
55 uci delete firewall.nodogsplash2
56 uci commit firewall
57 endef
58
59 define Package/nodogsplash2/conffiles
60 /etc/config/nodogsplash
61 endef
62
63 $(eval $(call BuildPackage,nodogsplash2))