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