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