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.

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