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.

104 lines
2.6 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:=3
  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:=https://github.com/wifidog/wifidog-gateway
  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.xz
  21. PKG_MIRROR_HASH:=9ffd9f3ae54baceb723abb7a04e27a9b6a3ff1479f8a3bfda9b8a496e8b4050f
  22. PKG_FIXUP:=autoreconf
  23. # do not run make install
  24. PKG_INSTALL:=0
  25. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
  26. include $(INCLUDE_DIR)/package.mk
  27. define Package/wifidog/Default
  28. SUBMENU:=Captive Portals
  29. SECTION:=net
  30. CATEGORY:=Network
  31. DEPENDS:=+iptables-mod-extra +iptables-mod-ipopt +iptables-mod-nat-extra +libpthread
  32. TITLE:=A wireless captive portal solution
  33. URL:=http://www.wifidog.org
  34. endef
  35. define Package/wifidog
  36. $(call Package/wifidog/Default)
  37. VARIANT:=normal
  38. endef
  39. define Package/wifidog-tls
  40. $(call Package/wifidog/Default)
  41. DEPENDS+= +libcyassl
  42. VARIANT:=tls
  43. endef
  44. define Package/wifidog/description
  45. The Wifidog project is a complete and embeddable captive
  46. portal solution for wireless community groups or individuals
  47. who wish to open a free Hotspot while still preventing abuse
  48. of their Internet connection.
  49. endef
  50. define Package/wifidog-tls/description
  51. $(call Package/wifidog/description)
  52. This variant can talk TLS to the auth server.
  53. endef
  54. define Package/wifidog/conffiles
  55. /etc/wifidog.conf
  56. endef
  57. Package/wifidog-tls/conffiles = $(Package/wifidog/conffiles)
  58. define Package/wifidog/configure
  59. $(call Build/Configure/Default)
  60. endef
  61. ifeq ($(BUILD_VARIANT),tls)
  62. CONFIGURE_ARGS += \
  63. --enable-cyassl
  64. endif
  65. define Package/wifidog/install
  66. $(INSTALL_DIR) $(1)/usr/bin
  67. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/wifidog $(1)/usr/bin/
  68. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/wdctl $(1)/usr/bin/
  69. $(INSTALL_DIR) $(1)/usr/lib
  70. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libhttpd.so* $(1)/usr/lib/
  71. $(INSTALL_DIR) $(1)/etc
  72. $(INSTALL_DATA) $(PKG_BUILD_DIR)/wifidog.conf $(1)/etc/
  73. $(INSTALL_DATA) $(PKG_BUILD_DIR)/wifidog-msg.html $(1)/etc/
  74. $(INSTALL_DIR) $(1)/etc/init.d
  75. $(INSTALL_BIN) ./files/wifidog.init $(1)/etc/init.d/wifidog
  76. endef
  77. Package/wifidog-tls/install = $(Package/wifidog/install)
  78. $(eval $(call BuildPackage,wifidog))
  79. $(eval $(call BuildPackage,wifidog-tls))