8890669cda40320d3b5defe2208887605698ffbe
[openwrt/svn-archive/archive.git] / net / nocatsplash / Makefile
1 #
2 # Copyright (C) 2006 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:=nocatsplash
11 PKG_VERSION:=0.92
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=NoCatSplash-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://wifi.rulez.org/~josephus/
16 PKG_MD5SUM:=e0fcc0effe52e63bc31070d16d0b4a81
17
18 PKG_BUILD_DIR:=$(BUILD_DIR)/NoCatSplash-$(PKG_VERSION)
19
20 include $(INCLUDE_DIR)/package.mk
21
22 define Package/nocatsplash
23 SUBMENU:=Captive Portals
24 SECTION:=net
25 CATEGORY:=Network
26 DEPENDS:=+glib1
27 TITLE:=Open public network gateway daemon
28 URL:=http://nocat.net
29 endef
30
31 define Package/nocatsplash/description
32 NoCatSplash is an Open Public Network Gateway Daemon.
33 It performs as a [captive/open/active] portal. When run on a gateway/router
34 on a network, all web requests are redirected until the client either logs
35 in or clicks "I Accept" to an AUP. The gateway daemon then changes the
36 firewall rules on the gateway to pass traffic for that client (based on IP
37 address and MAC address).
38 endef
39
40 define Package/nocatsplash/conffiles
41 /etc/nocat.conf
42 endef
43
44 define Build/Configure
45 $(call Build/Configure/Default, \
46 --with-firewall=iptables \
47 --with-glib-prefix="$(STAGING_DIR)/usr" \
48 )
49 endef
50
51 define Build/Compile
52 mkdir -p $(PKG_INSTALL_DIR)
53 $(MAKE) -C $(PKG_BUILD_DIR) \
54 DESTDIR="$(PKG_INSTALL_DIR)" \
55 all install
56 endef
57
58 define Package/nocatsplash/install
59 $(INSTALL_DIR) $(1)
60 $(CP) $(PKG_INSTALL_DIR)/* $(1)/
61 endef
62
63 $(eval $(call BuildPackage,nocatsplash))