394be1ba3de7ff7b9a2ca931860f6e8006aef4bb
[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_VERSION:=5.0.2
10 PKG_RELEASE:=1
11
12 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
13 PKG_SOURCE_URL:=https://codeload.github.com/nodogsplash/nodogsplash/tar.gz/v$(PKG_VERSION)?
14 PKG_HASH:=908d3674e93726fdcefb4c3b6705c745753435df9d46425781a57e3f6b417797
15
16 PKG_MAINTAINER:=Moritz Warning <moritzwarning@web.de>
17 PKG_LICENSE:=GPL-2.0-or-later
18 PKG_LICENSE_FILES:=COPYING
19
20 PKG_FIXUP:=autoreconf
21 PKG_BUILD_PARALLEL:=1
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/nodogsplash
26 SUBMENU:=Captive Portals
27 SECTION:=net
28 CATEGORY:=Network
29 DEPENDS:=+libpthread +libmicrohttpd-no-ssl +iptables-nft \
30 +iptables-mod-nat-extra +iptables-mod-ipopt \
31 +iptables-mod-conntrack-extra
32 TITLE:=Open public network gateway daemon
33 URL:=https://github.com/nodogsplash/nodogsplash
34 endef
35
36 define Package/nodogsplash/description
37 Nodogsplash is a Captive Portal that offers a simple way to
38 provide restricted access to the Internet by showing a splash
39 page to the user before Internet access is granted.
40 endef
41
42 define Package/nodogsplash/install
43 $(CP) ./files/* $(1)/
44 $(INSTALL_DIR) $(1)/usr/bin
45 $(INSTALL_BIN) $(PKG_BUILD_DIR)/nodogsplash $(1)/usr/bin/
46 $(INSTALL_BIN) $(PKG_BUILD_DIR)/ndsctl $(1)/usr/bin/
47 $(INSTALL_DIR) $(1)/etc/nodogsplash/htdocs/images
48 $(INSTALL_DIR) $(1)/etc/config
49 $(INSTALL_DIR) $(1)/etc/init.d
50 $(INSTALL_DIR) $(1)/etc/uci-defaults
51 $(INSTALL_DIR) $(1)/usr/lib/nodogsplash
52 $(CP) $(PKG_BUILD_DIR)/resources/splash.html $(1)/etc/nodogsplash/htdocs/
53 $(CP) $(PKG_BUILD_DIR)/resources/splash.css $(1)/etc/nodogsplash/htdocs/
54 $(CP) $(PKG_BUILD_DIR)/resources/status.html $(1)/etc/nodogsplash/htdocs/
55 $(CP) $(PKG_BUILD_DIR)/resources/splash.jpg $(1)/etc/nodogsplash/htdocs/images/
56 endef
57
58 define Package/nodogsplash/postrm
59 #!/bin/sh
60 uci delete firewall.nodogsplash
61 uci commit firewall
62 endef
63
64 define Package/nodogsplash/conffiles
65 /etc/config/nodogsplash
66 endef
67
68 $(eval $(call BuildPackage,nodogsplash))