2 # ----------------------------------------------------------------------
3 # AlternC - Web Hosting System
4 # Copyright (C) 2000-2013 by the AlternC Development Team.
6 # ----------------------------------------------------------------------
9 # This program is free software; you can redistribute it and/or
10 # modify it under the terms of the GNU General Public License (GPL)
11 # as published by the Free Software Foundation; either version 2
12 # of the License, or (at your option) any later version.
14 # This program is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 # GNU General Public License for more details.
19 # To read the license please visit http://www.gnu.org/copyleft/gpl.html
20 # ----------------------------------------------------------------------
21 # Purpose of file: Global Makefile
22 # ----------------------------------------------------------------------
23 MAJOR=$(shell sed -ne 's/^[^(]*(\([^)]*\)).*/\1/;1p' debian/changelog)
28 # gettext are built at runtime, to be able to MERGE them from CORE + MODULES before msgfmt
31 #install-alternc install-squirrelmail install-roundcube install-awstats
33 # install AlternC files common between ALTERNC and ALTERNC-SLAVE
36 test -d $(DESTDIR)/usr/lib/alternc || mkdir -p $(DESTDIR)/usr/lib/alternc
37 cp -r src/* $(DESTDIR)/usr/lib/alternc/
38 chown root:root $(DESTDIR)/usr/lib/alternc/*
39 chmod 755 $(DESTDIR)/usr/lib/alternc/*
42 test -d $(DESTDIR)/etc || mkdir -p $(DESTDIR)/etc
43 cp -r etc/alternc $(DESTDIR)/etc
44 cp -r etc/incron.d $(DESTDIR)/etc
45 install -o root -g root -m 440 etc/sudoers.d/alternc $(DESTDIR)/etc/sudoers.d
46 chmod 755 $(DESTDIR)/etc/alternc etc/incron.d
48 # Installer and upgrade scripts
49 test -d $(DESTDIR)/usr/share/alternc/install || mkdir -p $(DESTDIR)/usr/share/alternc/install
50 cp -r install/* $(DESTDIR)/usr/share/alternc/install
51 chmod a+x $(DESTDIR)/usr/share/alternc/install/alternc.install $(DESTDIR)/usr/share/alternc/install/dopo.sh $(DESTDIR)/usr/share/alternc/install/mysql.sh $(DESTDIR)/usr/share/alternc/install/newone.php $(DESTDIR)/usr/share/alternc/install/reset_root.php $(DESTDIR)/usr/share/alternc/install/upgrade_check.sh $(DESTDIR)/usr/share/alternc/install/upgrades/*.php $(DESTDIR)/usr/share/alternc/install/upgrades/*.sh $(DESTDIR)/usr/share/alternc/install/variables.php
54 # install AlternC itself:
55 install-alternc: install-common
57 test -d $(DESTDIR)/usr/share/alternc/panel || mkdir $(DESTDIR)/usr/share/alternc/panel
58 cp -r bureau/* $(DESTDIR)/usr/share/alternc/panel
59 sed -i -e "s/@@REPLACED_DURING_BUILD@@/${MAJOR}/" $(DESTDIR)/usr/share/alternc/panel/class/local.php $(DESTDIR)/usr/share/alternc/install/alternc.install
60 help2man -n "Hosting control panel software" --no-discard-stderr --section 8 $(DESTDIR)/usr/share/alternc/install/alternc.install -o $(DESTDIR)/usr/share/man/man8/alternc.install.8
61 chown -R root:root $(DESTDIR)/usr/share/alternc/panel
62 chmod -R 644 $(DESTDIR)/usr/share/alternc/panel
63 chmod -R a+X $(DESTDIR)/usr/share/alternc/panel
65 test -d $(DESTDIR)/var/log/alternc || mkdir $(DESTDIR)/var/log/alternc
66 chown -R root:root $(DESTDIR)/var/log/alternc
68 # Ex old alternc-admintools
69 install -o root -g root -m 755 tools/* $(DESTDIR)/usr/bin
71 install -o root -g root -m 644 man/*.8 $(DESTDIR)/usr/share/man/man8/
74 ln -s hosting_vhost-ssl.sh $(DESTDIR)/etc/alternc/functions_hosting/hosting_panel-ssl.sh
75 ln -s hosting_vhost-ssl.sh $(DESTDIR)/etc/alternc/functions_hosting/hosting_vhost-mixssl.sh
76 ln -s hosting_vhost-ssl.sh $(DESTDIR)/etc/alternc/functions_hosting/hosting_roundcube-ssl.sh
77 ln -s hosting_vhost-ssl.sh $(DESTDIR)/etc/alternc/functions_hosting/hosting_squirrelmail-ssl.sh
78 ln -s hosting_vhost-ssl.sh $(DESTDIR)/etc/alternc/functions_hosting/hosting_php52-ssl.sh
79 ln -s hosting_vhost-ssl.sh $(DESTDIR)/etc/alternc/functions_hosting/hosting_php52-mixssl.sh
80 ln -s hosting_vhost-ssl.sh $(DESTDIR)/etc/alternc/functions_hosting/hosting_url-ssl.sh
82 install-slave: install-common
84 pod2man --center "" --date "" --release "AlternC" --section=8 man/alternc.install.pod >$(DESTDIR)/usr/share/man/man8/alternc.install.8
89 make -C awstats install DESTDIR=$(DESTDIR)
92 make -C roundcube install DESTDIR=$(DESTDIR)
95 make -C squirrelmail install DESTDIR=$(DESTDIR)
98 make -C api install DESTDIR=$(DESTDIR)