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.

146 lines
4.4 KiB

  1. #
  2. # Copyright (C) 2007-2018 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:=coova-chilli
  9. PKG_VERSION:=1.4
  10. PKG_MAINTAINER:=Jaehoon You <teslamint@gmail.com>
  11. PKG_LICENSE:=GPL-2.0+
  12. PKG_LICENSE_FILES:=COPYING
  13. PKG_RELEASE:=7
  14. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  15. PKG_SOURCE_URL:=https://codeload.github.com/coova/coova-chilli/tar.gz/$(PKG_VERSION)?
  16. PKG_HASH:=987647a4c8efe7b1e2d7108d56068e3bd7830d326680f0eaa2c705e4c59c46d9
  17. PKG_INSTALL:=1
  18. PKG_CONFIG_DEPENDS := \
  19. COOVACHILLI_MINIPORTAL \
  20. COOVACHILLI_REDIR \
  21. COOVACHILLI_USERAGENT \
  22. COOVACHILLI_DNSLOG \
  23. COOVACHILLI_UAMDOMAINFILE \
  24. COOVACHILLI_LARGELIMITS \
  25. COOVACHILLI_NOSSL \
  26. COOVACHILLI_CYASSL \
  27. COOVACHILLI_OPENSSL
  28. include $(INCLUDE_DIR)/package.mk
  29. include $(INCLUDE_DIR)/kernel.mk
  30. define Package/coova-chilli
  31. SUBMENU:=Captive Portals
  32. SECTION:=net
  33. CATEGORY:=Network
  34. DEPENDS:=+kmod-tun +librt +COOVACHILLI_CYASSL:libcyassl +COOVACHILLI_OPENSSL:libopenssl
  35. TITLE:=Wireless LAN HotSpot controller (Coova Chilli Version)
  36. URL:=https://coova.github.io/
  37. MENU:=1
  38. endef
  39. define Package/coova-chilli/description
  40. CoovaChilli is an open source access controller for wireless LAN
  41. access points and is based on ChilliSpot. It is used for authenticating
  42. users of a wireless (or wired) LAN. It supports web based login (UAM)
  43. which is today's standard for public HotSpots and it supports Wireless
  44. Protected Access (WPA) which is the standard of the future.
  45. Authentication, authorization and accounting (AAA) is handled by your
  46. favorite radius server.
  47. endef
  48. define Package/coova-chilli/config
  49. source "$(SOURCE)/Config.in"
  50. endef
  51. define KernelPackage/ipt-coova
  52. URL:=http://www.coova.org/CoovaChilli
  53. SUBMENU:=Netfilter Extensions
  54. DEPENDS:=coova-chilli +kmod-ipt-core +libxtables
  55. TITLE:=Coova netfilter module
  56. FILES:=$(PKG_BUILD_DIR)/src/linux/xt_*.$(LINUX_KMOD_SUFFIX)
  57. AUTOLOAD:=$(call AutoProbe,xt_coova)
  58. endef
  59. define KernelPackage/ipt-coova/description
  60. Netfilter kernel module for CoovaChilli
  61. Includes:
  62. - coova
  63. endef
  64. DISABLE_NLS=
  65. TARGET_CFLAGS += $(FPIC)
  66. CONFIGURE_VARS += \
  67. ARCH="$(LINUX_KARCH)" \
  68. KERNEL_DIR="$(LINUX_DIR)"
  69. MAKE_FLAGS += \
  70. ARCH="$(LINUX_KARCH)" \
  71. KERNEL_DIR="$(LINUX_DIR)"
  72. MAKE_INSTALL_FLAGS += \
  73. ARCH="$(LINUX_KARCH)" \
  74. KERNEL_DIR="$(LINUX_DIR)" \
  75. INSTALL_MOD_PATH="$(PKG_INSTALL_DIR)"
  76. define Build/Prepare
  77. $(call Build/Prepare/Default)
  78. ( cd $(PKG_BUILD_DIR) ; \
  79. [ -f ./configure ] || { \
  80. ./bootstrap ; \
  81. } \
  82. )
  83. endef
  84. define Build/Configure
  85. $(call Build/Configure/Default, \
  86. $(if $(CONFIG_COOVACHILLI_PROXY),--enable,--disable)-chilliproxy \
  87. $(if $(CONFIG_COOVACHILLI_REDIR),--enable,--disable)-chilliredir \
  88. $(if $(CONFIG_COOVACHILLI_DNSLOG),--enable,--disable)-dnslog \
  89. $(if $(CONFIG_COOVACHILLI_MINIPORTAL),--enable,--disable)-miniportal \
  90. $(if $(CONFIG_COOVACHILLI_USERAGENT),--enable,--disable)-useragent \
  91. $(if $(CONFIG_COOVACHILLI_LARGELIMITS),--enable,--disable)-largelimits \
  92. $(if $(CONFIG_COOVACHILLI_UAMDOMAINFILE),--enable,--disable)-uamdomainfile \
  93. $(if $(CONFIG_IPV6),--with,--without)-ipv6 \
  94. $(if $(CONFIG_COOVACHILLI_CYASSL),--with,--without)-cyassl \
  95. $(if $(CONFIG_COOVACHILLI_OPENSSL),--with,--without)-openssl \
  96. $(if $(CONFIG_PACKAGE_kmod-ipt-coova),--with-nfcoova) \
  97. )
  98. endef
  99. define Package/coova-chilli/conffiles
  100. /etc/config/chilli
  101. endef
  102. define Package/coova-chilli/install
  103. $(INSTALL_DIR) $(1)/etc
  104. $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/chilli.conf $(1)/etc/
  105. $(INSTALL_DIR) $(1)/etc/chilli
  106. $(CP) $(PKG_INSTALL_DIR)/etc/chilli/* $(1)/etc/chilli/
  107. $(INSTALL_DIR) $(1)/etc/hotplug.d/iface
  108. $(INSTALL_DATA) ./files/chilli.hotplug $(1)/etc/hotplug.d/iface/30-chilli
  109. $(INSTALL_DIR) $(1)/usr/sbin
  110. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/chilli* $(1)/usr/sbin/
  111. $(INSTALL_DIR) $(1)/usr/lib/
  112. $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.so.* $(1)/usr/lib/
  113. $(if $(CONFIG_PACKAGE_kmod-ipt-coova), \
  114. $(INSTALL_DIR) $(1)/usr/lib/iptables; \
  115. $(CP) $(PKG_INSTALL_DIR)/usr/lib/iptables/lib*.so $(1)/usr/lib/iptables/ \
  116. )
  117. $(INSTALL_DIR) $(1)/etc/init.d
  118. $(INSTALL_BIN) files/chilli.init $(1)/etc/init.d/chilli
  119. $(INSTALL_DIR) $(1)/etc/config
  120. $(INSTALL_DATA) files/chilli.config $(1)/etc/config/chilli
  121. $(INSTALL_DIR) $(1)/lib/firewall
  122. $(CP) files/chilli.firewall $(1)/lib/firewall/chilli.sh
  123. endef
  124. $(eval $(call BuildPackage,coova-chilli))
  125. $(eval $(call KernelPackage,ipt-coova))