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.5
  10. PKG_RELEASE:=2
  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:=75e15fd00a870b8a95df1440977c688a05a109f90b57bf679b931101d427d0fb
  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_LARGELIMITS \
  22. COOVACHILLI_MINIPORTAL \
  23. COOVACHILLI_NOSSL \
  24. COOVACHILLI_OPENSSL \
  25. COOVACHILLI_PROXY \
  26. COOVACHILLI_REDIR \
  27. COOVACHILLI_UAMDOMAINFILE \
  28. COOVACHILLI_USERAGENT \
  29. COOVACHILLI_WOLFSSL \
  30. IPV6
  31. include $(INCLUDE_DIR)/package.mk
  32. include $(INCLUDE_DIR)/kernel.mk
  33. define Package/coova-chilli
  34. SUBMENU:=Captive Portals
  35. SECTION:=net
  36. CATEGORY:=Network
  37. DEPENDS:=+kmod-tun +librt +COOVACHILLI_MINIPORTAL:haserl \
  38. +COOVACHILLI_WOLFSSL:libwolfssl +COOVACHILLI_OPENSSL:libopenssl
  39. TITLE:=Wireless LAN HotSpot controller (Coova Chilli Version)
  40. URL:=https://coova.github.io/
  41. MENU:=1
  42. endef
  43. define Package/coova-chilli/description
  44. CoovaChilli is an open source access controller for wireless LAN
  45. access points and is based on ChilliSpot. It is used for authenticating
  46. users of a wireless (or wired) LAN. It supports web based login (UAM)
  47. which is today's standard for public HotSpots and it supports Wireless
  48. Protected Access (WPA) which is the standard of the future.
  49. Authentication, authorization and accounting (AAA) is handled by your
  50. favorite radius server.
  51. endef
  52. define Package/coova-chilli/config
  53. source "$(SOURCE)/Config.in"
  54. endef
  55. define KernelPackage/ipt-coova
  56. URL:=http://www.coova.org/CoovaChilli
  57. SUBMENU:=Netfilter Extensions
  58. DEPENDS:=coova-chilli +kmod-ipt-core +libxtables
  59. TITLE:=Coova netfilter module
  60. FILES:=$(PKG_BUILD_DIR)/src/linux/xt_*.$(LINUX_KMOD_SUFFIX)
  61. AUTOLOAD:=$(call AutoProbe,xt_coova)
  62. endef
  63. define KernelPackage/ipt-coova/description
  64. Netfilter kernel module for CoovaChilli
  65. Includes:
  66. - coova
  67. endef
  68. DISABLE_NLS=
  69. TARGET_CFLAGS += $(FPIC) -Wno-address-of-packed-member
  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_UAMDOMAINFILE),--enable,--disable)-uamdomainfile \
  96. $(if $(CONFIG_IPV6),--with,--without)-ipv6 \
  97. $(if $(CONFIG_COOVACHILLI_WOLFSSL),--with,--without)-cyassl \
  98. $(if $(CONFIG_COOVACHILLI_OPENSSL),--with,--without)-openssl \
  99. $(if $(CONFIG_PACKAGE_kmod-ipt-coova),--with-nfcoova) \
  100. )
  101. endef
  102. define Package/coova-chilli/conffiles
  103. /etc/config/chilli
  104. endef
  105. define Package/coova-chilli/install
  106. $(INSTALL_DIR) $(1)/etc
  107. $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/chilli.conf $(1)/etc/
  108. $(INSTALL_DIR) $(1)/etc/chilli
  109. $(CP) $(PKG_INSTALL_DIR)/etc/chilli/* $(1)/etc/chilli/
  110. $(INSTALL_DIR) $(1)/etc/hotplug.d/iface
  111. $(INSTALL_DATA) ./files/chilli.hotplug $(1)/etc/hotplug.d/iface/30-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))