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.

152 lines
4.6 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)
  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:=coova-chilli +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. Includes:
  68. - coova
  69. endef
  70. DISABLE_NLS=
  71. TARGET_CFLAGS += $(FPIC) -Wno-error
  72. CONFIGURE_VARS += \
  73. ARCH="$(LINUX_KARCH)" \
  74. KERNEL_DIR="$(LINUX_DIR)"
  75. MAKE_FLAGS += \
  76. ARCH="$(LINUX_KARCH)" \
  77. KERNEL_DIR="$(LINUX_DIR)"
  78. MAKE_INSTALL_FLAGS += \
  79. ARCH="$(LINUX_KARCH)" \
  80. KERNEL_DIR="$(LINUX_DIR)" \
  81. INSTALL_MOD_PATH="$(PKG_INSTALL_DIR)"
  82. define Build/Prepare
  83. $(call Build/Prepare/Default)
  84. ( cd $(PKG_BUILD_DIR) ; \
  85. [ -f ./configure ] || { \
  86. ./bootstrap ; \
  87. } \
  88. )
  89. endef
  90. define Build/Configure
  91. $(call Build/Configure/Default, \
  92. $(if $(CONFIG_COOVACHILLI_PROXY),--enable,--disable)-chilliproxy \
  93. $(if $(CONFIG_COOVACHILLI_REDIR),--enable,--disable)-chilliredir \
  94. $(if $(CONFIG_COOVACHILLI_MINIPORTAL),--enable,--disable)-miniportal \
  95. $(if $(CONFIG_COOVACHILLI_USERAGENT),--enable,--disable)-useragent \
  96. $(if $(CONFIG_COOVACHILLI_LARGELIMITS),--enable,--disable)-largelimits \
  97. $(if $(CONFIG_COOVACHILLI_JSONINTERFACE),--enable,--disable)-libjson \
  98. $(if $(CONFIG_COOVACHILLI_JSONINTERFACE),--enable,--disable)-json \
  99. $(if $(CONFIG_COOVACHILLI_UAMDOMAINFILE),--enable,--disable)-uamdomainfile \
  100. $(if $(CONFIG_IPV6),--with,--without)-ipv6 \
  101. $(if $(CONFIG_COOVACHILLI_WOLFSSL),--with,--without)-cyassl \
  102. $(if $(CONFIG_COOVACHILLI_OPENSSL),--with,--without)-openssl \
  103. $(if $(CONFIG_PACKAGE_kmod-ipt-coova),--with-nfcoova) \
  104. )
  105. endef
  106. define Package/coova-chilli/conffiles
  107. /etc/config/chilli
  108. endef
  109. define Package/coova-chilli/install
  110. $(INSTALL_DIR) $(1)/etc
  111. $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/chilli.conf $(1)/etc/
  112. $(INSTALL_DIR) $(1)/etc/chilli
  113. $(CP) $(PKG_INSTALL_DIR)/etc/chilli/* $(1)/etc/chilli/
  114. $(INSTALL_DIR) $(1)/etc/hotplug.d/iface
  115. $(INSTALL_DATA) ./files/chilli.hotplug $(1)/etc/hotplug.d/iface/30-chilli
  116. $(INSTALL_DIR) $(1)/usr/sbin
  117. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/chilli* $(1)/usr/sbin/
  118. $(INSTALL_DIR) $(1)/usr/lib/
  119. $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.so.* $(1)/usr/lib/
  120. $(if $(CONFIG_PACKAGE_kmod-ipt-coova), \
  121. $(INSTALL_DIR) $(1)/usr/lib/iptables; \
  122. $(CP) $(PKG_INSTALL_DIR)/usr/lib/iptables/lib*.so $(1)/usr/lib/iptables/ \
  123. )
  124. $(INSTALL_DIR) $(1)/etc/init.d
  125. $(INSTALL_BIN) files/chilli.init $(1)/etc/init.d/chilli
  126. $(INSTALL_DIR) $(1)/etc/config
  127. $(INSTALL_DATA) files/chilli.config $(1)/etc/config/chilli
  128. endef
  129. $(eval $(call BuildPackage,coova-chilli))
  130. $(eval $(call KernelPackage,ipt-coova))