# Recipe (MakeRecipe) for Guarddog by Viola Zoli, Hungary, violazoli@gmail.com, on 2008. jan. 15., kedd, 09.01.38 CET
# Recipe for version 2.4.0 by Viola Zoli, Hungary, violazoli@gmail.com, on 2008. jan. 15., kedd, 09.01.38 CET
compile_version=1.10.0
url="http://freshmeat.net/redir/guarddog/3947/url_tgz/guarddog-2.4.0.tar.gz"
file="guarddog-2.4.0.tar.gz"
file_size=978107
file_md5=94753f72d62974914485c9aae07b1772
recipe_type=configure

post_install_message="Remember to add this line to ${goboSettings}/BootScripts/BootUp\nin order to load the rules defined with Guarddog at startup:\nExec 'Loading firewall rules...' Guarddog Start"

pre_build(){
	#Check for mac80211
	if ! zcat $goboStatus/config.gz | grep -q "CONFIG_IP_NF_IPTABLES=[m,y]"; then
		Log_Error "Your kernel does not support iptables or \
			configuration could not be read. Make sure you have enabled \
			CONFIG_IP_NF_IPTABLES=y/m in your kernel or reconfigure your kernel \
			to include it."
		Ask_Continue "Do you want to continue anyway? (Not recommended \
			unless you know what you do)"
	fi
	
	#Check for patches to apply
	make check_inc source
}

post_install(){
	if zcat $goboStatus/config.gz | grep -q "CONFIG_IP_NS_IPTABLES=m"; then
		echo You seem to have iptables built as a module.\
			Be sure to load it at startup in order to use this program.
	fi
}
