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