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.5 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.3.0+20141128
  10. PKG_MAINTAINER:=Jaehoon You <teslamint@gmail.com>
  11. PKG_LICENSE:=GPL-2.0+
  12. PKG_LICENSE_FILES:=COPYING
  13. PKG_RELEASE:=6
  14. PKG_SOURCE_PROTO:=git
  15. PKG_SOURCE_URL:=git://github.com/coova/coova-chilli
  16. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  17. PKG_SOURCE_VERSION:=b93de20a288c01c2ba28e96e31ad6da01627f45f
  18. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  19. PKG_MIRROR_HASH:=89c9b313881c658a0f6b91329a78bb1a0151878b19bc99b315976081c6355557
  20. PKG_INSTALL:=1
  21. PKG_CONFIG_DEPENDS := \
  22. COOVACHILLI_MINIPORTAL \
  23. COOVACHILLI_REDIR \
  24. COOVACHILLI_USERAGENT \
  25. COOVACHILLI_DNSLOG \
  26. COOVACHILLI_UAMDOMAINFILE \
  27. COOVACHILLI_LARGELIMITS \
  28. COOVACHILLI_NOSSL \
  29. COOVACHILLI_CYASSL \
  30. COOVACHILLI_OPENSSL
  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_CYASSL:libcyassl +COOVACHILLI_OPENSSL:libopenssl
  38. TITLE:=Wireless LAN HotSpot controller (Coova Chilli Version)
  39. URL:=http://www.coova.org/CoovaChilli
  40. MENU:=1
  41. endef
  42. define Package/coova-chilli/description
  43. CoovaChilli is an open source access controller for wireless LAN
  44. access points and is based on ChilliSpot. It is used for authenticating
  45. users of a wireless (or wired) LAN. It supports web based login (UAM)
  46. which is today's standard for public HotSpots and it supports Wireless
  47. Protected Access (WPA) which is the standard of the future.
  48. Authentication, authorization and accounting (AAA) is handled by your
  49. favorite radius server.
  50. endef
  51. define Package/coova-chilli/config
  52. source "$(SOURCE)/Config.in"
  53. endef
  54. define KernelPackage/ipt-coova
  55. URL:=http://www.coova.org/CoovaChilli
  56. SUBMENU:=Netfilter Extensions
  57. DEPENDS:=coova-chilli +kmod-ipt-core +libxtables
  58. TITLE:=Coova netfilter module
  59. FILES:=$(PKG_BUILD_DIR)/src/linux/xt_*.$(LINUX_KMOD_SUFFIX)
  60. AUTOLOAD:=$(call AutoProbe,xt_coova)
  61. endef
  62. define KernelPackage/ipt-coova/description
  63. Netfilter kernel module for CoovaChilli
  64. Includes:
  65. - coova
  66. endef
  67. DISABLE_NLS=
  68. TARGET_CFLAGS += $(FPIC)
  69. CONFIGURE_VARS += \
  70. ARCH="$(LINUX_KARCH)" \
  71. KERNEL_DIR="$(LINUX_DIR)"
  72. MAKE_FLAGS += \
  73. ARCH="$(LINUX_KARCH)" \
  74. KERNEL_DIR="$(LINUX_DIR)"
  75. MAKE_INSTALL_FLAGS += \
  76. ARCH="$(LINUX_KARCH)" \
  77. KERNEL_DIR="$(LINUX_DIR)" \
  78. INSTALL_MOD_PATH="$(PKG_INSTALL_DIR)"
  79. define Build/Prepare
  80. $(call Build/Prepare/Default)
  81. ( cd $(PKG_BUILD_DIR) ; \
  82. [ -f ./configure ] || { \
  83. ./bootstrap ; \
  84. } \
  85. )
  86. endef
  87. define Build/Configure
  88. $(call Build/Configure/Default, \
  89. $(if $(CONFIG_COOVACHILLI_PROXY),--enable,--disable)-chilliproxy \
  90. $(if $(CONFIG_COOVACHILLI_REDIR),--enable,--disable)-chilliredir \
  91. $(if $(CONFIG_COOVACHILLI_DNSLOG),--enable,--disable)-dnslog \
  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_COOVACHILLI_CYASSL),--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. $(CP) files/chilli.firewall $(1)/lib/firewall/chilli.sh
  125. endef
  126. $(eval $(call BuildPackage,coova-chilli))
  127. $(eval $(call KernelPackage,ipt-coova))