Makefile 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. #
  2. # Copyright (C) 2007-2014 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:=Imre Kaloz <kaloz@openwrt.org>
  11. PKG_LICENSE:=GPL-2.0+
  12. PKG_LICENSE_FILES:=COPYING
  13. PKG_RELEASE:=4
  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_MD5SUM:=2adb27ec56172b18c5beee359dd7898d
  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_MATRIXSSL \
  30. COOVACHILLI_CYASSL \
  31. COOVACHILLI_OPENSSL
  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_MATRIXSSL:libmatrixssl +COOVACHILLI_CYASSL:libcyassl +COOVACHILLI_OPENSSL:libopenssl
  39. TITLE:=Wireless LAN HotSpot controller (Coova Chilli Version)
  40. URL:=http://www.coova.org/CoovaChilli
  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)
  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_DNSLOG),--enable,--disable)-dnslog \
  93. $(if $(CONFIG_COOVACHILLI_MINIPORTAL),--enable,--disable)-miniportal \
  94. $(if $(CONFIG_COOVACHILLI_USERAGENT),--enable,--disable)-useragent \
  95. $(if $(CONFIG_COOVACHILLI_LARGELIMITS),--enable,--disable)-largelimits \
  96. $(if $(CONFIG_COOVACHILLI_UAMDOMAINFILE),--enable,--disable)-uamdomainfile \
  97. $(if $(CONFIG_COOVACHILLI_MATRIXSSL),--with,--without)-matrixssl \
  98. $(if $(CONFIG_COOVACHILLI_CYASSL),--with,--without)-cyassl \
  99. $(if $(CONFIG_COOVACHILLI_OPENSSL),--with,--without)-openssl \
  100. $(if $(CONFIG_PACKAGE_kmod-ipt-coova),--with-nfcoova) \
  101. )
  102. endef
  103. define Package/coova-chilli/conffiles
  104. /etc/config/chilli
  105. endef
  106. define Package/coova-chilli/install
  107. $(INSTALL_DIR) $(1)/etc
  108. $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/chilli.conf $(1)/etc/
  109. $(INSTALL_DIR) $(1)/etc/chilli
  110. $(CP) $(PKG_INSTALL_DIR)/etc/chilli/* $(1)/etc/chilli/
  111. $(INSTALL_DIR) $(1)/etc/hotplug.d/iface
  112. $(INSTALL_DATA) ./files/chilli.hotplug $(1)/etc/hotplug.d/iface/30-chilli
  113. $(INSTALL_DIR) $(1)/usr/sbin
  114. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/chilli* $(1)/usr/sbin/
  115. $(INSTALL_DIR) $(1)/usr/lib/
  116. $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.so.* $(1)/usr/lib/
  117. $(if $(CONFIG_PACKAGE_kmod-ipt-coova), \
  118. $(INSTALL_DIR) $(1)/usr/lib/iptables; \
  119. $(CP) $(PKG_INSTALL_DIR)/usr/lib/iptables/lib*.so $(1)/usr/lib/iptables/ \
  120. )
  121. $(INSTALL_DIR) $(1)/etc/init.d
  122. $(INSTALL_BIN) files/chilli.init $(1)/etc/init.d/chilli
  123. $(INSTALL_DIR) $(1)/etc/config
  124. $(INSTALL_DATA) files/chilli.config $(1)/etc/config/chilli
  125. $(INSTALL_DIR) $(1)/lib/firewall
  126. $(CP) files/chilli.firewall $(1)/lib/firewall/chilli.sh
  127. endef
  128. $(eval $(call BuildPackage,coova-chilli))
  129. $(eval $(call KernelPackage,ipt-coova))