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