Merge pull request #4832 from dedeckeh/pr-coap
[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=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 PKG_MIRROR_HASH:=cdab08c11ba04ffa58c2df69c2c62f63196e290a216708fa5b7d43087c18d1b0
28
29 PKG_FIXUP:=autoreconf
30 # do not run make install
31 PKG_INSTALL:=0
32 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
33
34 include $(INCLUDE_DIR)/package.mk
35
36 define Package/wifidog/Default
37 SUBMENU:=Captive Portals
38 SECTION:=net
39 CATEGORY:=Network
40 DEPENDS:=+iptables-mod-extra +iptables-mod-ipopt +iptables-mod-nat-extra +libpthread
41 TITLE:=A wireless captive portal solution
42 URL:=http://www.wifidog.org
43 endef
44
45 define Package/wifidog
46 $(call Package/wifidog/Default)
47 VARIANT:=normal
48 endef
49
50 define Package/wifidog-tls
51 $(call Package/wifidog/Default)
52 DEPENDS+= +libcyassl
53 VARIANT:=tls
54 endef
55
56
57 define Package/wifidog/description
58 The Wifidog project is a complete and embeddable captive
59 portal solution for wireless community groups or individuals
60 who wish to open a free Hotspot while still preventing abuse
61 of their Internet connection.
62 endef
63
64 define Package/wifidog-tls/description
65 $(call Package/wifidog/description)
66
67 This variant can talk TLS to the auth server.
68 endef
69
70 define Package/wifidog/conffiles
71 /etc/wifidog.conf
72 endef
73
74 Package/wifidog-tls/conffiles = $(Package/wifidog/conffiles)
75
76
77 define Package/wifidog/configure
78 $(call Build/Configure/Default)
79 endef
80
81 ifeq ($(BUILD_VARIANT),tls)
82
83 CONFIGURE_ARGS += \
84 --enable-cyassl
85
86 endif
87
88 define Package/wifidog/install
89 $(INSTALL_DIR) $(1)/usr/bin
90 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/wifidog $(1)/usr/bin/
91 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/wdctl $(1)/usr/bin/
92 $(INSTALL_DIR) $(1)/usr/lib
93 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libhttpd.so* $(1)/usr/lib/
94 $(INSTALL_DIR) $(1)/etc
95 $(INSTALL_DATA) $(PKG_BUILD_DIR)/wifidog.conf $(1)/etc/
96 $(INSTALL_DATA) $(PKG_BUILD_DIR)/wifidog-msg.html $(1)/etc/
97 $(INSTALL_DIR) $(1)/etc/init.d
98 $(INSTALL_BIN) ./files/wifidog.init $(1)/etc/init.d/wifidog
99 endef
100
101 Package/wifidog-tls/install = $(Package/wifidog/install)
102
103 $(eval $(call BuildPackage,wifidog))
104 $(eval $(call BuildPackage,wifidog-tls))