#
# 	Firewall-easy build
#

#TODO: install man pages in ./man/* and in proper place
# Debian does this authomatically...


# This is for Debian GNU/Linux
DESTDIR = 


###########################################################################
###   Start of user-modified settings
###   Examine these and change the ones that need to be
###   Altered on your system
###


# destination directory for scripts
SBIN = $(DESTDIR)/usr/sbin
BIN = $(DESTDIR)/usr/bin
LIB = $(DESTDIR)/usr/lib/firewall-easy
#EXAMPLES = $(DESTDIR)/usr/share/doc/examples

# destination directory for config files
CONFIG = $(DESTDIR)/etc

# destination for symlinks to antispoof protection scripts for ppp connections
# we also have antispoof with kernel 2.2 so this is a redundant protection ;-)
PPPUP = $(DESTDIR)/etc/ppp/ip-up.d
PPPDOWN = $(DESTDIR)/etc/ppp/ip-down.d

# destination for man pages
MANDIR  = $(DESTDIR)/usr/share/man


###########################################################################
###   End of user-modified settings
###   You should not need to change anything after this
###


all:
# All are scripts, nothing to do


install: all
	install -d $(LIB) $(SBIN) $(BIN) $(CONFIG) $(PPPUP) $(PPPDOWN)
#	install -d $(EXAMPLES)
	install -m755 ./lib/* $(LIB)
	install -m755 ./sbin/* $(SBIN)
	install -m755 ./bin/* $(BIN)
	install -m644 ./config/* $(CONFIG)
#	install -m644 ./examples/* $(EXAMPLES)


# PPPUP & PPPDOWN STUFF
	ln -s /usr/lib/firewall-easy/antispoofppp-up $(PPPUP)/00antispoofppp-up
	ln -s /usr/lib/firewall-easy/antispoofppp-down $(PPPDOWN)/00antispoofppp-down


clean:
# All are scripts, nothing to do

