# Copyright 2009, Martin Gregorie.
# 
# This file is part of the Spamscan package.
#
# Spamkiller is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 3 as
# published by the Free Software Foundation.
#
# Spamkiller is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Foobar.  If not, see <http://www.gnu.org/licenses/>.
#              

CONF	= spamscan.conf
CMD     = spamscan 
DIR     = spamscan
EXE	= /usr/local/bin
LWSCR	= /etc/logwatch/scripts/services
LWCONF	= /etc/logwatch/conf/services
SCRIPT  = ruleuse 
TARBALL = spamscan.tgz

install:
	cp $(CMD) $(SCRIPT) $(EXE)
	chmod uga-w $(EXE)/$(CMD) $(EXE)/$(SCRIPT)
	chmod uga+x $(EXE)/$(CMD) $(EXE)/$(SCRIPT)
	cp $(CMD) $(LWSCR)
	chmod uga-w  $(LWSCR)/$(CMD)
	chmod uga+rx $(LWSCR)/$(CMD)
	cp $(CONF) $(LWCONF)
	chmod uga-wx $(LWCONF)/$(CONF)
	chmod uga+r  $(LWCONF)/$(CONF)

tarball:
	rm -f $(TARBALL)
	cd ..; tar czvf $(DIR)/$(TARBALL) --exclude CVS $(DIR)/* 


