1 #############################################################
5 # There exists a real need in the embedded community for a
6 # captive portal with authentication. Till now I've been hording
7 # this sweet little creation to myself.
9 # NoCatSplash is a Open Public Network Gateway Daemon. It performs as a
10 # [captive/open/active] portal. When run on a gateway/router on a
11 # network, all web requests are redirected until the client clicks I
12 # Accept to an AUP. The gateway daemon then changes the firewall rules
13 # on the gateway to pass traffic for that client (based on IP address
16 # NoCatSplash is the successor to NoCatAuth, which was written in Perl.
17 # NoCatSplash is written in multi-threaded ANSI C in order to be smaller
18 # and work better on embedded style devices.
20 # NoCatSplash-Auth is the successor to them all which is NoCatSplash
21 # with the features found on NoCatAuth but written in ANSI C in order to
22 # be smaller and work better on embedded style devices.
24 #############################################################
25 NOCATSPLASHAUTH_SOURCE_URL
:=
26 NOCATSPLASHAUTH_SOURCE
=NoCatSplash-auth.tgz
27 NOCATSPLASHAUTH_BUILD_DIR
=$(BUILD_DIR
)/NoCatSplash-auth
29 $(DL_DIR
)/$(NOCATSPLASHAUTH_SOURCE
):
30 $(WGET
) -P
$(DL_DIR
) $(NOCATSPLASHAUTH_SOURCE_URL
)/$(NOCATSPLASHAUTH_SOURCE
)
32 $(NOCATSPLASHAUTH_BUILD_DIR
)/.unpacked
: $(DL_DIR
)/$(NOCATSPLASHAUTH_SOURCE
)
33 zcat
$(DL_DIR
)/$(NOCATSPLASHAUTH_SOURCE
) |
tar -C
$(BUILD_DIR
) -xvf
-
34 touch
$(NOCATSPLASHAUTH_BUILD_DIR
)/.unpacked
36 $(NOCATSPLASHAUTH_BUILD_DIR
)/.configured
: $(NOCATSPLASHAUTH_BUILD_DIR
)/.unpacked
37 # Allow patches. Needed for openwrt for instance.
38 #$(SOURCE_DIR)/patch-kernel.sh $(NOCATSPLASHAUTH_BUILD_DIR) $(SOURCE_DIR) nocatsplash-*.patch
39 (cd
$(NOCATSPLASHAUTH_BUILD_DIR
); \
43 --with-glib-prefix
=$(TARGET_DIR
)/usr \
46 touch
$(NOCATSPLASHAUTH_BUILD_DIR
)/.configured
48 $(NOCATSPLASHAUTH_BUILD_DIR
)/splashd
: $(NOCATSPLASHAUTH_BUILD_DIR
)/.configured
49 $(TARGET_CONFIGURE_OPTS
) \
50 $(MAKE
) -C
$(NOCATSPLASHAUTH_BUILD_DIR
) \
51 CC
=$(TARGET_CC
) COPT_FLAGS
="$(TARGET_CFLAGS)"
53 $(TARGET_DIR
)/sbin
/splashd
: $(NOCATSPLASHAUTH_BUILD_DIR
)/splashd
54 $(TARGET_CONFIGURE_OPTS
) \
55 $(MAKE
) -C
$(NOCATSPLASHAUTH_BUILD_DIR
) \
57 CC
=$(TARGET_CC
) COPT_FLAGS
="$(TARGET_CFLAGS)" \
58 DESTDIR
=$(TARGET_DIR
) install
59 $(STRIP
) $(TARGET_DIR
)/usr
/bin
/nocat
*
60 rm -rf
$(TARGET_DIR
)/usr
/man
62 nocatauth
: $(TARGET_DIR
)/sbin
/splashd
64 nocatauth-source
: $(DL_DIR
)/$(NOCATSPLASHAUTH_SOURCE
)
67 $(MAKE
) DESTDIR
=$(TARGET_DIR
) CC
=$(TARGET_CC
) -C
$(NOCATSPLASHAUTH_BUILD_DIR
) uninstall
68 -$(MAKE
) -C
$(NOCATSPLASHAUTH_BUILD_DIR
) clean
71 rm -rf
$(NOCATSPLASHAUTH_BUILD_DIR
)