Merge pull request #478 from ecsv/batadv-for-19.07
[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.3.2
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:=5a7b14dd2cce6a8ca261a720d87948565fc2f05d4926bf155b9e0db483ff6bcb
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 CONFLICTS:=nodogsplash2
33 endef
34
35 define Package/nodogsplash/description
36 Nodogsplash is a Captive Portal that offers a simple way to
37 provide restricted access to the Internet by showing a splash
38 page to the user before Internet access is granted.
39 It also incorporates an API that allows the creation of
40 sophisticated authentication applications.
41 endef
42
43 define Package/nodogsplash/install
44
45 $(INSTALL_DIR) $(1)/usr/bin
46 $(INSTALL_BIN) $(PKG_BUILD_DIR)/nodogsplash $(1)/usr/bin/
47 $(INSTALL_BIN) $(PKG_BUILD_DIR)/ndsctl $(1)/usr/bin/
48
49 $(INSTALL_DIR) $(1)/etc/nodogsplash/htdocs/images
50 $(INSTALL_DIR) $(1)/etc/config
51 $(INSTALL_DIR) $(1)/etc/init.d
52 $(INSTALL_DIR) $(1)/etc/uci-defaults
53 $(INSTALL_DIR) $(1)/usr/lib/nodogsplash
54 $(CP) $(PKG_BUILD_DIR)/resources/splash.html $(1)/etc/nodogsplash/htdocs/
55 $(CP) $(PKG_BUILD_DIR)/resources/splash.css $(1)/etc/nodogsplash/htdocs/
56 $(CP) $(PKG_BUILD_DIR)/resources/status.html $(1)/etc/nodogsplash/htdocs/
57 $(CP) $(PKG_BUILD_DIR)/resources/splash.jpg $(1)/etc/nodogsplash/htdocs/images/
58 $(CP) $(PKG_BUILD_DIR)/openwrt/nodogsplash/files/etc/config/nodogsplash $(1)/etc/config/
59 $(CP) $(PKG_BUILD_DIR)/openwrt/nodogsplash/files/etc/init.d/nodogsplash $(1)/etc/init.d/
60 $(CP) $(PKG_BUILD_DIR)/openwrt/nodogsplash/files/etc/uci-defaults/40_nodogsplash $(1)/etc/uci-defaults/
61 $(CP) $(PKG_BUILD_DIR)/openwrt/nodogsplash/files/usr/lib/nodogsplash/restart.sh $(1)/usr/lib/nodogsplash/
62 $(CP) $(PKG_BUILD_DIR)/forward_authentication_service/PreAuth/demo-preauth.sh $(1)/usr/lib/nodogsplash/login.sh
63 endef
64
65 define Package/nodogsplash/postrm
66 #!/bin/sh
67 uci delete firewall.nodogsplash
68 uci commit firewall
69 endef
70
71 define Package/nodogsplash/conffiles
72 /etc/config/nodogsplash
73 endef
74
75 $(eval $(call BuildPackage,nodogsplash))