####################################################################################
# @version $Id: Makefile 20070308 1:49 durtle
# @package VHCP
# @copyright Copyright (C) 2007 [VHCP] Virtual Host Control Panel. All rights reserved.
# @license http://www.mozilla.org/MPL/ [MPL] Mozilla Public License, see LICENSE.php
#
# VHCP is free software; you can redistribute it and/or
# modify it under the terms of the MPL General Public License
# as published by the Free Software Foundation; either version 1.1
# of the License, or (at your option) any later version.
#
# You should have received a copy of the MPL Mozilla Public License
# along with this program; if not, write to the Open Source Initiative (OSI)
# http://opensource.org | osi@opensource.org
#
# See COPYRIGHT.php for copyright notices and details.
#
# For more information please see our website at http://www.vhcp.org
####################################################################################
         
INST_PREF=/tmp/vhcp-0.9.0

HOST_OS=debian

ROOT_CONF=$(INST_PREF)/etc

SYSTEM_ROOT=$(INST_PREF)/var/www/webadmin

SYSTEM_CONF=$(INST_PREF)/etc/vhcp

SYSTEM_LOG=$(INST_PREF)/var/log/vhcp

SYSTEM_APACHE_BACK_LOG=$(INST_PREF)/var/log/apache2/backup

SYSTEM_VIRTUAL=$(INST_PREF)/var/www/virtual

SYSTEM_MAIL_VIRTUAL=$(INST_PREF)/var/mail/virtual

SYSTEM_MAKE_DIRS=/usr/sbin/vhcp-mkdirs.pl

CODE_PHP=/usr/sbin/encode-file

export

install:

	cd ./tools && $(MAKE) install

	$(SYSTEM_MAKE_DIRS) $(SYSTEM_CONF)
	$(SYSTEM_MAKE_DIRS) $(SYSTEM_ROOT)
	$(SYSTEM_MAKE_DIRS) $(SYSTEM_LOG)
	$(SYSTEM_MAKE_DIRS) $(SYSTEM_VIRTUAL)
	$(SYSTEM_MAKE_DIRS) $(SYSTEM_MAIL_VIRTUAL)
	$(SYSTEM_MAKE_DIRS) $(SYSTEM_APACHE_BACK_LOG)

	cd ./configs && $(MAKE) install 
	cd ./engine && $(MAKE) install 
	cd ./gui && $(MAKE) install 
	cd ./keys && $(MAKE) install
	
uninstall:

	cd ./tools && $(MAKE) uninstall
	cd ./configs && $(MAKE) uninstall 
	cd ./engine && $(MAKE) uninstall 
	cd ./gui && $(MAKE) uninstall 
	cd ./keys && $(MAKE) uninstall
	
	rm -rf $(SYSTEM_CONF)
	rm -rf $(SYSTEM_ROOT)
	rm -rf $(SYSTEM_LOG)
	rm -rf $(SYSTEM_VIRTUAL)
	rm -rf $(SYSTEM_MAIL_VIRTUAL)
	rm -rf $(SYSTEM_APACHE_BACK_LOG)
	rm -rf ./*~
	
