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.

103 lines
2.5 KiB

  1. #
  2. # Copyright (C) 2006,2015 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:=wifidog
  9. PKG_VERSION:=1.3.0
  10. PKG_RELEASE=1
  11. PKG_LICENSE:=GPL-2.0
  12. # Note: Packaging is maintained upstream at
  13. # https://github.com/wifidog/packages
  14. PKG_MAINTAINER:=Michael Haas <haas@computerlinguist.org>
  15. PKG_LICENSE_FILES:=COPYING
  16. PKG_SOURCE_PROTO:=git
  17. PKG_SOURCE_URL:=git://github.com/wifidog/wifidog-gateway.git
  18. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  19. PKG_SOURCE_VERSION:=1.3.0
  20. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
  21. PKG_FIXUP:=autoreconf
  22. # do not run make install
  23. PKG_INSTALL:=0
  24. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
  25. include $(INCLUDE_DIR)/package.mk
  26. define Package/wifidog/Default
  27. SUBMENU:=Captive Portals
  28. SECTION:=net
  29. CATEGORY:=Network
  30. DEPENDS:=+iptables-mod-extra +iptables-mod-ipopt +iptables-mod-nat-extra +libpthread
  31. TITLE:=A wireless captive portal solution
  32. URL:=http://www.wifidog.org
  33. endef
  34. define Package/wifidog
  35. $(call Package/wifidog/Default)
  36. VARIANT:=normal
  37. endef
  38. define Package/wifidog-tls
  39. $(call Package/wifidog/Default)
  40. DEPENDS+= +libcyassl
  41. VARIANT:=tls
  42. endef
  43. define Package/wifidog/description
  44. The Wifidog project is a complete and embeddable captive
  45. portal solution for wireless community groups or individuals
  46. who wish to open a free Hotspot while still preventing abuse
  47. of their Internet connection.
  48. endef
  49. define Package/wifidog-tls/description
  50. $(call Package/wifidog/description)
  51. This variant can talk TLS to the auth server.
  52. endef
  53. define Package/wifidog/conffiles
  54. /etc/wifidog.conf
  55. endef
  56. Package/wifidog-tls/conffiles = $(Package/wifidog/conffiles)
  57. define Package/wifidog/configure
  58. $(call Build/Configure/Default)
  59. endef
  60. ifeq ($(BUILD_VARIANT),tls)
  61. CONFIGURE_ARGS += \
  62. --enable-cyassl
  63. endif
  64. define Package/wifidog/install
  65. $(INSTALL_DIR) $(1)/usr/bin
  66. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/wifidog $(1)/usr/bin/
  67. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/wdctl $(1)/usr/bin/
  68. $(INSTALL_DIR) $(1)/usr/lib
  69. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libhttpd.so* $(1)/usr/lib/
  70. $(INSTALL_DIR) $(1)/etc
  71. $(INSTALL_DATA) $(PKG_BUILD_DIR)/wifidog.conf $(1)/etc/
  72. $(INSTALL_DATA) $(PKG_BUILD_DIR)/wifidog-msg.html $(1)/etc/
  73. $(INSTALL_DIR) $(1)/etc/init.d
  74. $(INSTALL_BIN) ./files/wifidog.init $(1)/etc/init.d/wifidog
  75. endef
  76. Package/wifidog-tls/install = $(Package/wifidog/install)
  77. $(eval $(call BuildPackage,wifidog))
  78. $(eval $(call BuildPackage,wifidog-tls))