forked from EasySCP/EasySCP
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.Debian
70 lines (54 loc) · 1.76 KB
/
Makefile.Debian
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#!/usr/bin/make -f
# EasySCP a Virtual Hosting Control Panel
# Copyright (C) 2010-2019 by Easy Server Control Panel - http://www.easyscp.net
#
# This work is licensed under the Creative Commons Attribution-NoDerivs 3.0 Unported License.
# To view a copy of this license, visit http://creativecommons.org/licenses/by-nd/3.0/.
#
# @link http://www.easyscp.net
# @author EasySCP Team
ifndef INST_PREF
INST_PREF=/tmp/easyscp
endif
HOST_OS=debian
ROOT_CONF=$(INST_PREF)/etc
SYSTEM_AWSTATS=$(INST_PREF)/var/www/awstats
SYSTEM_CONF=$(INST_PREF)/etc/easyscp
SYSTEM_DAEMON=$(INST_PREF)/var/www/easyscp/daemon
SYSTEM_FCGI=$(INST_PREF)/var/www/fcgi
SYSTEM_LOG=$(INST_PREF)/var/log/easyscp
SYSTEM_MAIL_VIRTUAL=$(INST_PREF)/var/mail/virtual
SYSTEM_MAKE_DIRS=/bin/mkdir -p
SYSTEM_MAKE_FILE=/bin/touch
SYSTEM_SCOREBOARDS=$(INST_PREF)/var/www/scoreboards
SYSTEM_SYSTEMD=$(INST_PREF)/lib/systemd/system
SYSTEM_ROOT=$(INST_PREF)/var/www/easyscp
SYSTEM_VIRTUAL=$(INST_PREF)/var/www/virtual
SYSTEM_WWW=$(INST_PREF)/var/www
export
install:
$(SYSTEM_MAKE_DIRS) $(SYSTEM_CONF)
$(SYSTEM_MAKE_DIRS) $(SYSTEM_DAEMON)
$(SYSTEM_MAKE_DIRS) $(SYSTEM_LOG)
$(SYSTEM_MAKE_DIRS) $(SYSTEM_SCOREBOARDS)
$(SYSTEM_MAKE_DIRS) $(SYSTEM_AWSTATS)
$(SYSTEM_MAKE_DIRS) $(SYSTEM_MAIL_VIRTUAL)
$(SYSTEM_MAKE_DIRS) $(SYSTEM_SYSTEMD)
cd ./configs && $(MAKE) install
cd ./gui && $(MAKE) install
cp -dpR ./daemon/ $(SYSTEM_ROOT)
cp -dpR ./setup/ $(SYSTEM_WWW)
uninstall:
cd ./configs && $(MAKE) uninstall
cd ./daemon && $(MAKE) uninstall
cd ./gui && $(MAKE) uninstall
rm -rf $(SYSTEM_CONF)
rm -rf $(SYSTEM_ROOT)
rm -rf $(SYSTEM_LOG)
rm -rf $(SYSTEM_VIRTUAL)
rm -rf $(SYSTEM_FCGI)
rm -rf $(SYSTEM_SCOREBOARDS)
rm -rf $(SYSTEM_MAIL_VIRTUAL)
clean:
rm -rf $(INST_PREF)
.PHONY: install uninstall clean