Makefile 2.4 KB

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