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.

106 lines
3.1 KiB

  1. #
  2. # Copyright (C) 2014-2017 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=wifidog-ng
  9. PKG_VERSION:=1.5.6
  10. PKG_RELEASE:=1
  11. PKG_SOURCE_PROTO:=git
  12. PKG_SOURCE_VERSION:=v$(PKG_VERSION)
  13. PKG_SOURCE_URL=https://github.com/zhaojh329/wifidog-ng.git
  14. PKG_MIRROR_HASH:=a81e9a4d5feb3facbe1b2b55d2d813944b569865f53421680efbfc6876aa3f5d
  15. PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_SOURCE_SUBDIR)
  16. PKG_LICENSE:=LGPL-2.1
  17. PKG_LICENSE_FILES:=LICENSE
  18. PKG_MAINTAINER:=Jianhui Zhao <jianhuizhao329@gmail.com>
  19. include $(INCLUDE_DIR)/package.mk
  20. include $(INCLUDE_DIR)/cmake.mk
  21. define Package/wifidog-ng/default
  22. SUBMENU:=Captive Portals
  23. SECTION:=net
  24. CATEGORY:=Network
  25. TITLE:=Next generation WifiDog
  26. DEPENDS:=+kmod-wifidog-ng +libuci +libuclient +libblobmsg-json +libubus +libcares \
  27. +ipset +libpcap
  28. endef
  29. define Package/wifidog-ng-nossl
  30. $(Package/wifidog-ng/default)
  31. TITLE += (NO SSL)
  32. DEPENDS += +libuhttpd-nossl
  33. VARIANT:=nossl
  34. CONFLICTS:=wifidog-ng-openssl wifidog-ng-wolfssl wifidog-ng-mbedtls
  35. endef
  36. define Package/wifidog-ng-openssl
  37. $(Package/wifidog-ng/default)
  38. TITLE += (openssl)
  39. DEPENDS += +libuhttpd-openssl
  40. VARIANT:=openssl
  41. CONFLICTS:=wifidog-ng-wolfssl wifidog-ng-mbedtls
  42. endef
  43. define Package/wifidog-ng-wolfssl
  44. $(Package/wifidog-ng/default)
  45. TITLE += (wolfssl)
  46. DEPENDS += +libuhttpd-wolfssl
  47. VARIANT:=wolfssl
  48. CONFLICTS:=wifidog-ng-mbedtls
  49. endef
  50. define Package/wifidog-ng-mbedtls
  51. $(Package/wifidog-ng/default)
  52. TITLE += (mbedtls)
  53. DEPENDS += +libuhttpd-mbedtls
  54. VARIANT:=mbedtls
  55. endef
  56. define Package/wifidog-ng/default/install
  57. $(INSTALL_DIR) $(1)/usr/bin $(1)/etc/init.d $(1)/etc/config \
  58. $(1)/etc/wifidog-ng $(1)//etc/hotplug.d/dhcp
  59. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/wifidog-ng $(1)/usr/bin
  60. $(INSTALL_BIN) ./files/wifidog-ng.init $(1)/etc/init.d/wifidog-ng
  61. $(INSTALL_CONF) ./files/wifidog-ng.config $(1)/etc/config/wifidog-ng
  62. $(INSTALL_CONF) ./files/wifidog-ng.key $(1)/etc/wifidog-ng
  63. $(INSTALL_CONF) ./files/wifidog-ng.crt $(1)/etc/wifidog-ng
  64. $(INSTALL_DATA) ./files/wifidog-ng.hotplug $(1)/etc/hotplug.d/dhcp/00-wifidog-ng
  65. endef
  66. Package/wifidog-ng-nossl/install = $(Package/wifidog-ng/default/install)
  67. Package/wifidog-ng-openssl/install = $(Package/wifidog-ng/default/install)
  68. Package/wifidog-ng-wolfssl/install = $(Package/wifidog-ng/default/install)
  69. Package/wifidog-ng-mbedtls/install = $(Package/wifidog-ng/default/install)
  70. include $(INCLUDE_DIR)/kernel.mk
  71. define KernelPackage/wifidog-ng
  72. SUBMENU:=Other modules
  73. TITLE:=Kernel module for wifidog-ng
  74. DEPENDS:=+kmod-nf-nat +kmod-ipt-ipset
  75. FILES:=$(PKG_BUILD_DIR)/kmod/wifidog-ng.ko
  76. endef
  77. include $(INCLUDE_DIR)/kernel-defaults.mk
  78. define Build/Compile
  79. $(call Build/Compile/Default)
  80. $(MAKE) $(KERNEL_MAKEOPTS) SUBDIRS="$(PKG_BUILD_DIR)"/kmod modules
  81. endef
  82. $(eval $(call BuildPackage,wifidog-ng-nossl))
  83. $(eval $(call BuildPackage,wifidog-ng-mbedtls))
  84. $(eval $(call BuildPackage,wifidog-ng-wolfssl))
  85. $(eval $(call BuildPackage,wifidog-ng-openssl))
  86. $(eval $(call KernelPackage,wifidog-ng))