You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

69 lines
2.3 KiB

  1. #
  2. # Copyright (C) 2018 Dengfeng Liu
  3. #
  4. # This is free software, licensed under the GNU General Public License v3.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=apfree-wifidog
  9. PKG_VERSION:=3.8.1588
  10. PKG_RELEASE=1
  11. PKG_LICENSE:=GPL-3.0-or-later
  12. PKG_LICENSE_FILES:=COPYING
  13. PKG_MAINTAINER:=Dengfeng Liu <liudf0716@gmail.com>
  14. PKG_SOURCE_PROTO:=git
  15. PKG_SOURCE_URL:=https://github.com/liudf0716/apfree_wifidog.git
  16. PKG_SOURCE_VERSION:=$(PKG_VERSION)
  17. PKG_MIRROR_HASH:=0d10ad5a29358a7124ba75570894f48998af841519b0f295e3fcbed66ee7bccc
  18. PKG_INSTALL:=1
  19. include $(INCLUDE_DIR)/package.mk
  20. include $(INCLUDE_DIR)/cmake.mk
  21. define Package/apfree-wifidog
  22. SUBMENU:=Captive Portals
  23. SECTION:=net
  24. CATEGORY:=Network
  25. DEPENDS:=+zlib +iptables-mod-extra +iptables-mod-ipopt +kmod-ipt-nat +iptables-mod-nat-extra \
  26. +libjson-c +ipset +libip4tc +libevent2 +libevent2-openssl \
  27. +fping +libmosquitto +libuci +px5g
  28. TITLE:=Apfree's wireless captive portal solution
  29. URL:=https://github.com/liudf0716/apfree_wifidog
  30. endef
  31. define Package/apfree-wifidog/description
  32. The ApFree Wifidog project is a complete and embeddable captive portal
  33. solution for wireless community groups or individuals who wish to open a free
  34. Hotspot while still preventing abuse of their Internet connection.
  35. It's enhanced wifidog
  36. endef
  37. define Package/apfree-wifidog/install
  38. $(INSTALL_DIR) $(1)/usr/bin
  39. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/wifidog $(1)/usr/bin/wifidogx
  40. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/wdctl $(1)/usr/bin/wdctlx
  41. $(INSTALL_DIR) $(1)/usr/lib
  42. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libhttpd.so* $(1)/usr/lib/
  43. $(INSTALL_DIR) $(1)/usr/sbin
  44. $(INSTALL_BIN) ./files/wdping $(1)/usr/sbin/
  45. $(INSTALL_DIR) $(1)/etc
  46. $(INSTALL_DATA) $(PKG_BUILD_DIR)/wifidog-msg.html $(1)/etc/
  47. $(INSTALL_DATA) $(PKG_BUILD_DIR)/wifidog-redir.html $(1)/etc/
  48. $(INSTALL_DATA) $(PKG_BUILD_DIR)/wifidog-redir.html.front $(1)/etc/
  49. $(INSTALL_DATA) $(PKG_BUILD_DIR)/wifidog-redir.html.rear $(1)/etc/
  50. $(INSTALL_DATA) $(PKG_BUILD_DIR)/authserver-offline.html $(1)/etc/
  51. $(INSTALL_DATA) $(PKG_BUILD_DIR)/internet-offline.html $(1)/etc/
  52. $(INSTALL_DIR) $(1)/etc/init.d
  53. $(INSTALL_BIN) ./files/wifidogx.init $(1)/etc/init.d/wifidogx
  54. $(INSTALL_DIR) $(1)/etc/config
  55. $(CP) ./files/wifidogx.conf $(1)/etc/config/wifidogx
  56. endef
  57. $(eval $(call BuildPackage,apfree-wifidog))