[package] update vnstat to 1.10 (#6450)
[packages.git] / net / nodogsplash / Makefile
1 #
2 # Copyright (C) 2007 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:=nodogsplash
11 PKG_VERSION:=0.9_beta9.9.5
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://kokoro.ucsd.edu/nodogsplash/ \
16         http://kokoro.ucsd.edu/nodogsplash/old/
17 PKG_MD5SUM:=142f6b761a0ef93bb3e8557e1f53bc56
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/nodogsplash
22   SUBMENU:=Captive Portals
23   SECTION:=net
24   CATEGORY:=Network
25   DEPENDS:=+libpthread +iptables-mod-ipopt
26   TITLE:=Open public network gateway daemon
27   URL:=http://kokoro.ucsd.edu/nodogsplash/
28 endef
29
30 define Package/nodogsplash/description
31         Nodogsplash offers a simple way to open a free hotspot providing restricted access to an
32         internet connection. It is intended for use on wireless access points running OpenWRT
33         (but may also work on other Linux-based devices).
34 endef
35
36 define Build/Configure
37         $(call Build/Configure/Default,\
38                 --enable-static \
39                 --enable-shared \
40         )
41 endef
42
43 define Build/Compile
44         mkdir -p $(PKG_INSTALL_DIR)/usr/{share{,/doc/$(PKG_NAME)-$(PKG_VERSION)},lib,include{,/nodogsplash},bin,sbin}/
45         $(MAKE) -C $(PKG_BUILD_DIR) \
46                 DESTDIR="$(PKG_INSTALL_DIR)" \
47                 mkinstalldirs="$(SHELL) $(PKG_BUILD_DIR)/config/mkinstalldirs" \
48                 install
49 endef
50
51 define Package/nodogsplash/install
52         $(INSTALL_DIR) $(1)/usr/bin
53         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
54         $(INSTALL_DIR) $(1)/usr/lib/
55         $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
56         $(INSTALL_DIR) $(1)/etc/$(PKG_NAME)
57         $(INSTALL_CONF) $(PKG_BUILD_DIR)/$(PKG_NAME).conf $(1)/etc/$(PKG_NAME)/
58         $(SED) 's,br0,br-lan,' $(1)/etc/$(PKG_NAME)/$(PKG_NAME).conf
59         $(CP) $(PKG_BUILD_DIR)/htdocs $(1)/etc/$(PKG_NAME)/
60         $(INSTALL_DIR) $(1)/etc/init.d
61         $(INSTALL_BIN) ./files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME)
62         $(SED) 's,\(do_module_tests "imq"\),#\1,' $(1)/etc/init.d/$(PKG_NAME)
63         $(SED) 's,\(do_module_tests "ipt_IMQ"\),#\1,' $(1)/etc/init.d/$(PKG_NAME)
64         $(SED) 's,\(do_module_tests "sch_htb"\),#\1,' $(1)/etc/init.d/$(PKG_NAME)
65 endef
66
67 $(eval $(call BuildPackage,nodogsplash))