##-*- makefile -*-############################################################
#
#  System        : 
#  Module        : 
#  Object Name   : $RCSfile$
#  Revision      : $Revision$
#  Date          : $Date$
#  Author        : $Author$
#  Created By    : Jonathan Bayer
#  Created       : Sat Feb 27 06:49:13 2010
#  Last Modified : <100316.1501>
#
#  Description	
#
#  Notes
#
#  History
#	
#  $Log$
#
##############################################################################
#
#  Copyright (c) 2010 Jonathan Bayer.
# 
#  All Rights Reserved.
# 
#  This  document  may  not, in  whole  or in  part, be  copied,  photocopied,
#  reproduced,  translated,  or  reduced to any  electronic  medium or machine
#  readable form without prior written consent from Jonathan Bayer.
#
##############################################################################


# Macros
CONFIG_FILES="www/status/plugins/revokecrt/local.inc www/status/plugins/win32installer/local.inc www/status/config.inc"
TAR_GZ=/tmp/openvpn.tar.gz
DEST=/home/openvpn
APACHE_USER=httpd

save:
	tar czf openvpn.config.tar.gz $(CONFIG_FILES) servers clients easy-rsa/keys

distclean:
	setup/distclean.sh $(CONFIG_FILES)
	
dist:
	tar czf $(TAR_GZ) $(DEST)

upgrade:
	cp -a . $(DEST)
	chown -R $(APACHE_USER).$(APACHE_USER) $(DEST)
	make pam

install:	upgrade
	setup/installconfig.sh
	chown -R $(APACHE_USER).$(APACHE_USER) $(DEST)
	
pam:
	cd www/status/pam && make -f Makefile
