Makefile 2.4 KB

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