Commit b3c19b3a authored by Benjamin Sonntag's avatar Benjamin Sonntag

DEBIAN COMPLIANCE big commit : fixes almost all lintian issues + complete...

DEBIAN COMPLIANCE big commit : fixes almost all lintian issues + complete rewrite of debian/rules (now mostly in Makefile at the root of source code) + start using POD2MAN for man pages + remove some old unused and broken tools
parent d3958786
......@@ -4,6 +4,7 @@
/CODING_CONVENTION.php -text
/COPYING -text
/DEBIAN_COMPLIANCE -text
/Makefile -text
/README -text
awstats/Makefile -text
awstats/alternc-awstats -text
......@@ -408,7 +409,6 @@ bureau/locales/pt_BR/LC_MESSAGES/alternc -text
bureau/locales/pt_BR/LC_MESSAGES/manual.po -text
bureau/locales/pt_BR/LC_MESSAGES/messages.po -text
debian/.svnignore -text
debian/README.Debian -text
debian/alternc-awstats.cron.d -text
debian/alternc-awstats.dirs -text
debian/alternc-awstats.lintian-override -text
......@@ -420,7 +420,6 @@ debian/alternc-roundcube.dirs -text
debian/alternc-roundcube.postinst -text
debian/alternc-slave.config -text
debian/alternc-slave.dirs -text
debian/alternc-slave.install -text
debian/alternc-slave.links -text
debian/alternc-slave.lintian -text
debian/alternc-slave.logrotate -text
......@@ -440,7 +439,6 @@ debian/alternc.logrotate -text
debian/alternc.postinst -text
debian/alternc.postrm -text
debian/alternc.preinst -text
debian/alternc.prerm -text
debian/alternc.templates -text
debian/changelog -text
debian/compat -text
......@@ -538,8 +536,7 @@ lang/en_US.po -text
lang/nl_NL.po -text
man/alternc-admintools.8 -text
man/alternc-admintools.fr.8 -text
man/alternc.install.8 -text
man/alternc.install.fr.8 -text
man/alternc.install.pod -text
man/get_account_by_domain.8 -text
man/get_domains_by_account.8 -text
man/top_ftp_users.8 -text
......@@ -580,7 +577,6 @@ squirrelmail/templates/squirrelmail/alternc-changepass.conf -text
squirrelmail/templates/squirrelmail/apache.conf -text
squirrelmail/templates/squirrelmail/avelsieve-config.php -text
squirrelmail/unavelsieve -text
src/Makefile -text
src/alternc-check -text
src/alternc-dboptimize -text
src/alternc-passwd -text
......@@ -623,7 +619,6 @@ tests/make_mail_dataset.sh -text
tests/mechdump.pm -text
tests/test_demo.pl -text
tests/whois_test.php -text
tools/alternc_get_path -text
tools/get_account_by_domain -text
tools/get_domains_by_account -text
tools/top_ftp_users -text
......
#!/usr/bin/make -f
# ----------------------------------------------------------------------
# AlternC - Web Hosting System
# Copyright (C) 2000-2013 by the AlternC Development Team.
# https://alternc.org/
# ----------------------------------------------------------------------
# LICENSE
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License (GPL)
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# To read the license please visit http://www.gnu.org/copyleft/gpl.html
# ----------------------------------------------------------------------
# Purpose of file: Global Makefile
# ----------------------------------------------------------------------
MAJOR=$(shell sed -ne 's/^[^(]*(\([^)]*\)).*/\1/;1p' debian/changelog)
REV=$(shell env LANG=C svn info --non-interactive | awk '/^Revision:/ { print $$2 }')
VERSION="${MAJOR}~svn${REV}"
export VERSION
build:
# gettext are built at runtime, to be able to MERGE them from CORE + MODULES before msgfmt
pod2man --center "" --date "" --release "AlternC" --section=8 man/alternc.install.pod >man/alternc.install.8
install:
#install-alternc install-squirrelmail install-roundcube install-upnp install-awstats
# install AlternC files common between ALTERNC and ALTERNC-SLAVE
install-common:
# Shell Scripts
test -d $(DESTDIR)/usr/lib/alternc || mkdir -p $(DESTDIR)/usr/lib/alternc
cp src/* $(DESTDIR)/usr/lib/alternc/
chown root:root $(DESTDIR)/usr/lib/alternc/*
chmod 755 $(DESTDIR)/usr/lib/alternc/*
# Configuration Files
test -d $(DESTDIR)/etc || mkdir -p $(DESTDIR)/etc
cp -r etc/alternc $(DESTDIR)/etc
find $(DESTDIR)/etc/alternc -depth -type d -name ".svn" -exec rm {} -rf \;
chmod 755 $(DESTDIR)/etc/alternc
# Installer and upgrade scripts
test -d $(DESTDIR)/usr/share/alternc/install || mkdir -p $(DESTDIR)/usr/share/alternc/install
cp -r install/* $(DESTDIR)/usr/share/alternc/install
find $(DESTDIR)/usr/share/alternc/install -depth -type d -name ".svn" -exec rm {} -rf \;
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
# install AlternC itself:
install-alternc: install-common
# Web Panel
test -d $(DESTDIR)/usr/share/alternc/panel || mkdir $(DESTDIR)/usr/share/alternc/panel
cp -r bureau/* $(DESTDIR)/usr/share/alternc/panel
find $(DESTDIR)/usr/share/alternc/panel -depth -type d -name ".svn" -exec rm {} -rf \;
sed -i -e "s/@@REPLACED_DURING_BUILD@@/${MAJOR}/" $(DESTDIR)/usr/share/alternc/panel/class/local.php
echo ${VERSION} > $(DESTDIR)/usr/share/alternc/panel/class/.svn-infos
chown -R root:root $(DESTDIR)/usr/share/alternc/panel
chmod -R 644 $(DESTDIR)/usr/share/alternc/panel
chmod -R a+X $(DESTDIR)/usr/share/alternc/panel
# Logs
test -d $(DESTDIR)/var/log/alternc || mkdir $(DESTDIR)/var/log/alternc
chown -R root:root $(DESTDIR)/var/log/alternc
# Ex old alternc-admintools
install -o root -g root -m 755 tools/* $(DESTDIR)/usr/bin
# Man pages
install -o root -g root -m 644 man/*.8 $(DESTDIR)/usr/share/man/man8/
install-slave: install-common
# Man pages
install -o root -g root -m 644 man/alternc.install.8 $(DESTDIR)/usr/share/man/man8/
# Then its modules :
install-awstats:
make -C awstats install DESTDIR=$(DESTDIR)
install-roundcube:
make -C roundcube install DESTDIR=$(DESTDIR)
install-squirrelmail:
make -C squirrelmail install DESTDIR=$(DESTDIR)
install-upnp:
make -C upnp install DESTDIR=$(DESTDIR)
alternc for Debian
------------------
This package is BETA version, and could be use for production purpose, but without any
warranty, as stated in the GPL
-- Benjamin Sonntag <benjamin@alternc.org>, Tue, 09 Sep 2002 19:31:26 +0200
#!/bin/sh -e
# Check that AlternC is properly installed/configured
# Check that AlternC is properly installed AND configured
if [ -f /etc/alternc/local.sh ]
then
exit 0
......@@ -12,7 +12,6 @@ else
db_fset alternc-awstats/errorinstall seen false
db_input medium alternc-awstats/errorinstall
db_go
# il FAUT qu'AlternC soit proprement configur pour installer awstats
exit 1
fi
......
......@@ -9,7 +9,7 @@ usr/bin
usr/lib/alternc
usr/sbin
usr/share/alternc/install
usr/share/man/man8/
usr/share/locale/fr/LC_MESSAGES
var/backups/alternc
var/lib/alternc/backups
var/log/alternc
var/run/alternc
etc/*
usr/bin/*
usr/lib/alternc/*
#usr/sbin/*
usr/share/alternc/install/*
usr/share/locale/fr/LC_MESSAGES/alternc-admintools.mo
usr/share/man/fr/man8/*
usr/share/man/man8/*
......@@ -16,13 +16,13 @@ set -e
case "$1" in
purge)
rm -f /etc/alternc/local.sh /etc/alternc/my.cnf /etc/alternc/bureau.conf
rm -f /var/backups/alternc/etc-installed.tar.gz
rm -f /var/lib/alternc/backups/etc-installed.tar.gz
db_input high alternc/postrm_remove_datafiles || true
db_go
db_get alternc/postrm_remove_datafiles || true
if [ "$RET" = "true" ]; then
rm -rf /var/backups/alternc
rm -rf /var/lib/alternc/backups/
fi
rm -f /etc/apache/conf.d/override_php.conf /etc/apache/conf.d/alternc-ssl.conf /etc/apache/conf.d/alternc.conf
......
......@@ -127,7 +127,7 @@ Template:alternc-slave/monitor_ip
Type: string
_Description: The monitoring server:
The IP address (or ip/prefix) of the server(s) which must be authorized to
ping us and access apache status pages. Completely optional.
ping the server and access apache status pages. Completely optional.
Template:alternc-slave/postrm_remove_databases
Type: boolean
......
# Create /var/run/ folder : it may be a ramdrive
@reboot root mkdir -p /var/run/alternc && chown alterncpanel:alterncpanel /var/run/alternc
# Every 2 days compress log files
0 4 * * * alterncpanel /usr/lib/alternc/compress_logs.sh
......
......@@ -17,11 +17,11 @@ usr/lib/alternc/install.d
usr/lib/alternc/reload.d
usr/lib/alternc/safe_mode_exec_dir
usr/sbin
usr/share/man/man8/
usr/share/alternc/install
usr/share/locale/fr/LC_MESSAGES
var/backups/alternc
/var/lib/alternc/apache-vhost
/var/lib/alternc/bind
/var/lib/alternc/bind/zones
var/lib/alternc/backups
var/lib/alternc/apache-vhost
var/lib/alternc/bind
var/lib/alternc/bind/zones
var/log/alternc
var/run/alternc
......@@ -16,7 +16,7 @@ set -e
case "$1" in
purge)
rm -f /etc/alternc/local.sh /etc/alternc/my_mail.cnf /etc/alternc/bureau.conf
rm -f /var/backups/alternc/etc-installed.tar.gz
rm -f /var/lib/alternc/backups/etc-installed.tar.gz
rm -f /etc/incron.d/alternc
# FIXME : remove following commented lines if we are sure
......@@ -38,7 +38,7 @@ case "$1" in
#db_go
#db_get alternc/postrm_remove_datafiles || true
#if [ "$RET" = "true" ]; then
# rm -rf /var/backups/alternc /var/alternc/dns /var/alternc/html /var/alternc/redir
# rm -rf /var/lib/alternc/backups /var/alternc/dns /var/alternc/html /var/alternc/redir
#fi
# Purge bind zones
......@@ -63,7 +63,7 @@ case "$1" in
# Restore orignals conf files which have been replaced by Alternc
# With the oldest tar found
BACKUP=$(ls /var/backups/alternc/etc-original*.tar.gz | head -n 1)
BACKUP=$(ls /var/lib/alternc/backups/etc-original*.tar.gz | head -n 1)
tar -C / -xf "$BACKUP" 2>/dev/null || true
# Reload services which use these files
......
#!/bin/bash
# Debian alternc prerm
# Benjamin Sonntag <benjamin@alternc.org>
case "$1" in
remove)
# remove postfix from the sasl group (might not be user will though...)
deluser --quiet postfix sasl || true
#if [ -r "/etc/alternc/local.sh" ]
#then
# . /etc/alternc/local.sh
#else
# FQDN="`hostname --fqdn`"
#fi
FQDN_LETTER="`echo $FQDN | sed -e 's/.*\.\([^\.]\)[^\.]*\.[^\.]*$/\1/'`"
#rm -rf /var/alternc/bureau/locales || true
#rmdir -p /var/alternc/bureau 2> /dev/null || true
#rm -f /var/alternc/dns/bureau || true
#rm -f /var/alternc/dns/$FQDN_LETTER/$FQDN || true
#rmdir -p /var/alternc/html/a/admin 2> /dev/null || true
#rmdir -p /var/alternc/html/r/root 2> /dev/null || true
;;
upgrade)
;;
purge)
#find /var/alternc/bureau/locales -type f -name "alternc.mo" -exec rm {} \;
#find /var/alternc/bureau/locales -type f -name "alternc" -exec rm {} \;
#rm /var/alternc/bureau/class/local.php
#rm -f /var/alternc/apacheconf/bureau
#rm -f /var/alternc/apacheconf/$FQDN_LETTER/$FQDN
;;
failed-upgrade|abort-install|abort-upgrade|disappear)
;;
*)
echo "postrm called with unknown argument '$1'" >&2
exit 1
;;
esac
#DEBHELPER#
......@@ -52,21 +52,21 @@ _Description: Name of the secondary domain name server:
Template: alternc/alternc_html
Type: string
_Description: The path where alternc's users html files will be put
_Description: Path where AlternC's users html files will be located:
Please enter the directory name where you want html user files to be put.
The default value should be good in most cases.
.
This directory wil contain every alternc users personnal directories.
This directory will contain every AlternC users personal directories.
Template: alternc/alternc_mail
Type: string
_Description: The path where alternc's users mails will be put
_Description: Path where AlternC's users mails will be located:
Please enter the directory name where you want to put your users maildirs.
The default value should be good in most cases.
Template: alternc/alternc_logs
Type: string
_Description: The path where alternc's logs files will be placed
_Description: Path where alternc's logs files will be located:
Please enter the directory name where you want to put your log files.
The default value should be good in most cases.
......@@ -221,23 +221,23 @@ _Description: Should AlternC remove mailboxes?
Template: alternc/slaves
Type: string
_Description: Slave servers
_Description: Slave servers:
This is a space-separated list of servers that are "slaves" to the
master server (this server). When writing apache configuration files,
the master server will attempt to reload apache on those remote
master server (this server). When writing Apache configuration files,
the master server will attempt to reload Apache on those remote
servers. The alternc-slave package correctly configures those machines
to allow login and reload.
Template: alternc/use_local_mysql
Type: boolean
_Description: Shall we use locally found MySQL server?
_Description: Use locally found MySQL server?
A local MySQL connection was established on the server.
Tell us if you want to use it. If not remote MySQL server
Please tell if you want to use it. If not remote MySQL server
connection parameters will be needed.
Template: alternc/use_remote_mysql
Type: boolean
_Description: Shall we use a remote MySQL server?
_Description: Use a remote MySQL server?
No local Mysql server was found.
Please confirm you want to use a remote Mysql Server.
If not, AlternC cannot be installed.
......@@ -246,10 +246,12 @@ Template: alternc/remote_mysql_error
Type: boolean
_Description: MySQL connection error. Try again?
Remote connection to the MySQL server failed.
Please confirm that we shall try again.
Please confirm to try again.
Template: alternc/use_private_ip
Type: boolean
_Description: Private IP detected, use it anyway?
The IP address you have appears to be private, please confirm you want to use it anyway.
The server might not be reachable from outside your network.
The IP address of the machine appears to be private, please confirm that
this is an expected situation, since the server might not be reachable
from outside your network.
......@@ -3,14 +3,14 @@ Section: admin
Priority: optional
Maintainer: Antoine Beaupré <anarcat@koumbit.org>
Uploaders: Benjamin Sonntag <benjamin@alternc.org>
Build-Depends-Indep: findutils (>= 4.1.7), gettext (>= 0.10.40-5)
Build-Depends: debhelper (>= 4.0.2), po-debconf
Build-Depends-Indep: perl, findutils (>= 4.1.7), gettext (>= 0.10.40-5)
Build-Depends: debhelper (>= 8), po-debconf
Standards-Version: 3.9.4
Package: alternc
Architecture: all
Pre-depends: debconf (>= 0.5.00) | debconf-2.0, bash (>= 4)
Depends: debianutils (>= 1.13.1), apache2-mpm-itk, libapache2-mod-php5, php5-mysql, phpmyadmin, postfix, proftpd-mod-mysql, proftpd-basic, bind9, wget, rsync, ca-certificates, locales, perl-suid | perl, postfix-mysql, wwwconfig-common, sasl2-bin, libsasl2-modules, php5-cli, lockfile-progs (>= 0.1.9), gettext (>= 0.10.40-5), sudo, adduser, mysql-client, dnsutils, acl, dovecot-common (>=1:1.2.15), dovecot-common(<< 1:2.0), dovecot-imapd (>= 1:1.2.15), dovecot-pop3d (>= 1:1.2.15), vlogger, mailx, incron, cron, ${misc:depends}
Depends: debianutils (>= 1.13.1), apache2-mpm-itk, libapache2-mod-php5, php5-mysql, phpmyadmin, postfix, proftpd-mod-mysql, proftpd-basic, bind9, wget, rsync, ca-certificates, locales, perl-suid | perl, postfix-mysql, wwwconfig-common, sasl2-bin, libsasl2-modules, php5-cli, lockfile-progs (>= 0.1.9), gettext (>= 0.10.40-5), sudo, adduser, mysql-client, dnsutils, acl, dovecot-common (>=1:1.2.15), dovecot-common(<< 1:2.0), dovecot-imapd (>= 1:1.2.15), dovecot-pop3d (>= 1:1.2.15), vlogger, mailutils | mailx, incron, cron, ${misc:Depends}
Recommends: mysql-server(>= 5.0), ntp, quota
Conflicts: alternc-admintools, alternc-awstats (<< 1.0), alternc-webalizer (<= 0.9.4), alternc-mailman (<< 2.0)
Provides: alternc-admintools
......@@ -39,7 +39,7 @@ Description-fr.UTF-8: Suite logicielle d'hébergement mutualisé pour Debian
Package: alternc-slave
Architecture: all
Pre-depends: debconf (>= 0.5.00) | debconf-2.0
Depends: debianutils (>= 1.13.1), apache2-mpm-itk, libapache2-mod-php5, php5-mysql, phpmyadmin, postfix, proftpd-mod-mysql, proftpd-basic, postfix-tls, bind9, wget, rsync, ca-certificates, locales, perl-suid, perl, postfix-mysql, wwwconfig-common, sasl2-bin, libsasl2-modules, php5-cli, lockfile-progs (>= 0.1.9), gettext (>= 0.10.40-5), adduser, mysql-client, sudo, acl, dovecot-common (>= 1:1.2.15), dovecot-imapd, dovecot-pop3d, vlogger, mailx, incron, cron, ${misc:depends}
Depends: debianutils (>= 1.13.1), apache2-mpm-itk, libapache2-mod-php5, php5-mysql, phpmyadmin, postfix, proftpd-mod-mysql, proftpd-basic, postfix-tls, bind9, wget, rsync, ca-certificates, locales, perl-suid, perl, postfix-mysql, wwwconfig-common, sasl2-bin, libsasl2-modules, php5-cli, lockfile-progs (>= 0.1.9), gettext (>= 0.10.40-5), adduser, mysql-client, sudo, acl, dovecot-common (>= 1:1.2.15), dovecot-imapd, dovecot-pop3d, vlogger, mailutils | mailx, incron, cron, ${misc:Depends}
Recommends: dovecot-managesieved, dovecot-sieve, dovecot-mysql, quota
Conflicts: alternc-admintools, alternc-awstats (<= 0.3.2), alternc-webalizer (<= 0.9.4), alternc
Provides: alternc
......@@ -75,7 +75,7 @@ Description-fr.UTF-8: Suite logicielle d'hébergement mutualisé pour Debian
Package: alternc-squirrelmail
Architecture: all
Pre-depends: debconf (>= 0.5.00) | debconf-2.0
Depends: debianutils (>= 1.13.1), alternc (>= 3.0~rc1), squirrelmail, squirrelmail-locales, avelsieve, ${misc:depends}
Depends: debianutils (>= 1.13.1), alternc (>= 3.0~rc1), squirrelmail, squirrelmail-locales, avelsieve, ${misc:Depends}
Conflicts: alternc (<= 1.0.3), alternc-changepass
Provides: alternc-webmail
Suggests:
......@@ -106,7 +106,7 @@ Description-fr.UTF-8: Webmail Squirrelmail pour AlternC
Package: alternc-roundcube
Architecture: all
Pre-depends: debconf (>= 0.5.00) | debconf-2.0
Depends: debianutils (>= 1.13.1), alternc (>= 3.0~rc1), roundcube (>= 0.7.1), roundcube-mysql (>= 0.7.1), roundcube-plugins (>= 0.7.1), imagemagick, ${misc:depends}
Depends: debianutils (>= 1.13.1), alternc (>= 3.0~rc1), roundcube (>= 0.7.1), roundcube-mysql (>= 0.7.1), roundcube-plugins (>= 0.7.1), imagemagick, ${misc:Depends}
Conflicts: alternc (<< 1.1)
Provides: alternc-webmail
Suggests:
......@@ -139,7 +139,7 @@ Priority: optional
Section: admin
Architecture: all
Pre-depends: debconf
Depends: alternc (>= 3.0~rc1), awstats (>=6.1-1), php5-cli, ${misc:depends}
Depends: alternc (>= 3.0~rc1), awstats (>=6.1-1), php5-cli, ${misc:Depends}
Suggests: apachemerge
Description: Awstats statistics module for AlternC
AlternC is a mutualized hosting software manager for Linux.
......@@ -154,7 +154,7 @@ Description: Awstats statistics module for AlternC
Package: alternc-upnp
Architecture: all
Pre-depends: debconf (>= 0.5.00) | debconf-2.0
Depends: debianutils (>= 1.13.1), alternc (>= 3.0~rc1), miniupnpc, php5-cli, ${misc:depends}
Depends: debianutils (>= 1.13.1), alternc (>= 3.0~rc1), miniupnpc, php5-cli, ${misc:Depends}
Description: UPnP client for AlternC
AlternC is a mutualized hosting software manager for Linux.
It allows you to manage your websites, domains, ftp, emails, aliases,
......
......@@ -12,162 +12,18 @@ REV=$(shell env LANG=C svn info --non-interactive | awk '/^Revision:/ { print $$
VERSION="${MAJOR}~svn${REV}"
export VERSION
ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
CFLAGS += -g
endif
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
INSTALL_PROGRAM += -s
endif
override_dh_install:
#dh install
$(MAKE) install-alternc DESTDIR=$(CURDIR)/debian/alternc
$(MAKE) install-squirrelmail DESTDIR=$(CURDIR)/debian/alternc-squirrelmail
$(MAKE) install-roundcube DESTDIR=$(CURDIR)/debian/alternc-roundcube
$(MAKE) install-upnp DESTDIR=$(CURDIR)/debian/alternc-upnp
$(MAKE) install-awstats DESTDIR=$(CURDIR)/debian/alternc-awstats
$(MAKE) install-slave DESTDIR=$(CURDIR)/debian/alternc-slave
%:
dh $@
# This has to be exported to make some magic below work.
export DH_OPTIONS
build: build-stamp
build-stamp:
dh_testdir
/usr/bin/msgfmt po/fr/LC_MESSAGES/alternc-admintools.po -o po/fr/LC_MESSAGES/alternc-admintools.mo
find bureau/locales -mindepth 2 -maxdepth 2 -type d -name "LC_MESSAGES" -exec msgfmt "{}/alternc" -o "{}/alternc.mo" \;
touch build-stamp
clean:
dh_testdir
dh_testroot
rm -f build-stamp
debconf-updatepo
dh_clean
find bureau/locales -mindepth 3 -maxdepth 3 -type d -name "alternc.mo" -delete
install: DH_OPTIONS=
install: build
dh_testdir
dh_testroot
# FIXME: if alternc still works with this commented out : remove it :-D
# dh_clean -k
dh_installdirs
# Install
cp -r etc/* debian/alternc/etc
cp -r install/* debian/alternc/usr/share/alternc/install
test -d debian/alternc/usr/share/alternc/panel || mkdir debian/alternc/usr/share/alternc/panel
cp -r bureau/* debian/alternc/usr/share/alternc/panel
(cd src && $(MAKE) install DESTDIR=$(CURDIR)/debian/alternc)
# we don't use the full VERSION intepreted but only what's in the changelog
sed -i -e "s/@@REPLACED_DURING_BUILD@@/${MAJOR}/" debian/alternc/usr/share/alternc/panel/class/local.php
echo ${VERSION} > debian/alternc/usr/share/alternc/panel/class/.svn-infos
# Fix permisions
chmod 755 debian/alternc/etc/alternc
# Group and user 1999 reference alterncpanel
chown -R 1999:1999 debian/alternc/usr/share/alternc/panel
chmod -R 644 debian/alternc/usr/share/alternc/panel
chmod -R a+X debian/alternc/usr/share/alternc/panel
chown -R www-data:www-data debian/alternc/var/log/alternc
chmod a+x debian/alternc/usr/share/alternc/install/alternc.install debian/alternc/usr/share/alternc/install/dopo.sh debian/alternc/usr/share/alternc/install/mysql.sh debian/alternc/usr/share/alternc/install/newone.php debian/alternc/usr/share/alternc/install/reset_root.php debian/alternc/usr/share/alternc/install/upgrade_check.sh debian/alternc/usr/share/alternc/install/upgrades/*.php debian/alternc/usr/share/alternc/install/upgrades/*.sh
mkdir -p debian/alternc/var/run/alternc/
chown 1999:1999 debian/alternc/var/run/alternc/
# Ex old alternc-admintools
install tools/top_http_users debian/alternc/usr/bin
install tools/top_mysql_users debian/alternc/usr/bin
install tools/top_ftp_users debian/alternc/usr/bin
install tools/get_domains_by_account debian/alternc/usr/bin
install tools/get_account_by_domain debian/alternc/usr/bin
install tools/alternc_get_path debian/alternc/usr/bin
install src/alternc_reload debian/alternc/usr/bin
install -m 644 po/fr/LC_MESSAGES/alternc-admintools.mo debian/alternc/usr/share/locale/fr/LC_MESSAGES/
# Remove helpers files from l18n dir
find debian/alternc/usr/share/alternc/panel/locales/ \
-maxdepth 1 -type f -exec rm -f {} \;
# Remove CVS directories
/usr/bin/find debian/alternc -depth -type d -name CVS -exec rm {} -rf \;
/usr/bin/find debian/alternc -depth -type d -name .svn -exec rm {} -rf \;
# cp debian/alternc.lintian debian/alternc/usr/share/lintian/overrides/alternc
# cp debian/alternc-slave.lintian debian/alternc/usr/share/lintian/overrides/alternc-slave
# alternc-squirrelmail:
(cd squirrelmail && $(MAKE) install DESTDIR=$(CURDIR)/debian/alternc-squirrelmail)
# alternc-roundcube:
(cd roundcube && $(MAKE) install DESTDIR=$(CURDIR)/debian/alternc-roundcube)
# alternc-upnp
(cd upnp && $(MAKE) install DESTDIR=$(CURDIR)/debian/alternc-upnp)
# alternc-awstats:
(cd awstats && $(MAKE) install DESTDIR=$(CURDIR)/debian/alternc-awstats)
cd ..
# Copy the desk files
cp -r awstats/bureau/* debian/alternc-awstats/usr/share/alternc/panel
find debian/alternc-awstats/usr/share/alternc/panel/ -depth -iname ".svn" -exec rm -rf "{}" \;
rm -f debian/alternc-awstats/usr/share/alternc/panel/locales/Makefile
# Fix permisions
chown -R root:www-data debian/alternc-awstats/usr/share/alternc/panel
chmod -R 644 debian/alternc-awstats/usr/share/alternc/panel
chmod -R a+X debian/alternc-awstats/usr/share/alternc/panel
touch debian/alternc-awstats/var/cache/awstats/.placeholder
chown www-data:www-data debian/alternc-awstats/var/cache/awstats
chmod 755 debian/alternc-awstats/var/cache/awstats
mkdir -p debian/alternc-awstats/var/cache/awstats
# This single target is used to build all the packages, all at once, or
# one at a time. So keep in mind: any options passed to commands here will
# affect _all_ packages. Anything you want to only affect one package
# should be put in another target, such as the install target.
binary-common: build install
dh_testdir
dh_testroot
dh_installchangelogs
dh_installdocs
# dh_installexamples
# dh_installmenu
dh_installdebconf
dh_installlogrotate
# dh_installemacsen
# dh_installpam
# dh_installmime
# dh_installinit
dh_installman man/*
dh_installcron
# dh_installinfo
dh_install -i --sourcedir=$(CURDIR)/debian/alternc
dh_strip
dh_link
dh_compress
#we handle our own perms
# dh_fixperms
# dh_makeshlibs
dh_installdeb
dh_perl
dh_shlibdeps
dh_gencontrol -- -cdebian/control
dh_md5sums
dh_builddeb
# Build architecture independant packages using the common target.
binary-indep: build install binary-common
# (Uncomment this next line if you have such packages.)
# $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
# Build architecture dependant packages using the common target.
binary-arch: build install binary-common
# $(MAKE) -f debian/rules DH_OPTIONS=-a binary-common
# Any other binary targets build just one binary package at a time.
# binary-%: build install
# make -f debian/rules binary-common DH_OPTIONS=-p$*
# binary: binary-indep binary-arch
# .PHONY: build clean binary-indep binary-arch binary install
binary: binary-common
.PHONY: build clean binary install
build-snapshot:
@echo "building a package based on the current snapshot (${VERSION})"
......
......@@ -22,13 +22,6 @@
# Purpose of file: Main install script, launch it anytime ;)
# ----------------------------------------------------------------------
# This script now assumes it has MySQL connectivity through
# /etc/alternc/my.cnf
# Also launches scripts in /usr/lib/alternc/install.d/
# with an argument telling where you are in alternc.install
# argument will be : startup, templates, apache2, before-reload, end
# Somes check before start operations
if [ `id -u` -ne 0 ]; then
echo "must be launched as root"
......@@ -87,7 +80,7 @@ if [ -e /etc/dovecot/dovecot.conf ]; then
CONFIG_FILES="$CONFIG_FILES etc/dovecot/dovecot.conf etc/dovecot/dovecot-sql.conf etc/dovecot/dovecot-dict-quota.conf"
fi
INSTALLED_CONFIG_TAR="/var/backups/alternc/etc-installed.tar.gz"
INSTALLED_CONFIG_TAR="/var/lib/alternc/backups/etc-installed.tar.gz"
#######################################################################
# Look for modified configuration files
......@@ -234,14 +227,14 @@ run-parts --arg=templates /usr/lib/alternc/install.d
######################################################################
# Backup the Main database
DB_BACKUP="/var/backups/alternc/${MYSQL_DATABASE}-db-`date +%Y%m%d-%H:%M:%S`.gz"
DB_BACKUP="/var/lib/alternc/backups/${MYSQL_DATABASE}-db-`date +%Y%m%d-%H:%M:%S`.gz"
db_dump="mysqldump --defaults-file=/etc/alternc/my.cnf --add-drop-table --allow-keywords --quote-names --force --quick --add-locks --lock-tables --extended-insert ${MYSQL_DATABASE}"
$db_dump | /bin/gzip -c > $DB_BACKUP || echo "backup of the main database failed"
#######################################################################
# Backup configuration files
#
BACKUP_FILE="/var/backups/alternc/etc-original-`date +%Y%m%d-%H%M`.tar.gz"
BACKUP_FILE="/var/lib/alternc/backups/etc-original-`date +%Y%m%d-%H%M`.tar.gz"
# Only backup what we are really going to replace
BACKUPS=""
......
.TH ALTERNC.INSTALL 8
.SH NAME
alternc.install \- Installation script for AlternC
.SH DESCRIPTION
AlternC is a hosting control panel that automatically configure your services based on optimal mass-hosting parameters. alternc.install is a script that do this automatic configuration.
.PP
This script is automatically launched at the end of alternc's package installation.
.PP
You can launch it again when you changed anything in the /etc/alternc/templates configuration files.
.SH OPTIONS
This program follow the usual GNU command line syntax, with long
options starting with two dashes (`-').
A summary of options is included below.
.TP
.B \-f, \-\-force
Overwrite any file that has been changed since last AlternC install.
.BR
.TH ALTERNC.INSTALL 8
.SH NAME
alternc.install \- script d'installation d'AlternC
.SH DESCRIPTION
AlternC est un panneau de contrôle qui configure automatiquement vos services pour de l'hébergement de masse. alternc.install est le script qui effectue cette configuration automatique.
.PP
Ce script est lancé automatiquement lors de l'installation du package d'AlternC
.PP
Vous pouvez le lancer à nouveau lorsque vous changez quoi que ce soi dans votre configuration d'AlternC dans /etc/alternc/
.SH OPTIONS
.TP
.B \-f, \-\-force
Écrase tout fichier qui aurait été modifié manuellement depuis le dernier lancement de alternc.install
.BR
=head1 NAME
alternc.install - Deploys AlternC and associated services configuration files
=head1 SYNOPSIS
alternc.install [B<--force>] |B<--slave>]
=head1 DESCRIPTION
AlternC is a hosting control panel that automatically configure your services based on optimal mass-hosting parameters. alternc.install is a script that do this automatic configuration.
alternc.install use variables from /etc/alternc/local.sh and replace them in files found in /etc/alternc/templates/ then push those interpreted files into /etc. It also backup every file into /var/lib/alternc/backups/ before replacing them.
This script now assumes it has MySQL connectivity through /etc/alternc/my.cnf
It Also launches scripts in /usr/lib/alternc/install.d/ with an argument telling where you are in alternc.install argument will be : startup, templates, apache2, before-reload, end
=head1 OPTIONS
=over 2
=item B<--force>
If any file in /etc has been manually changed (instead of changing its template in /etc/alternc), alternc.install will refuse to overwrite them. use B<--force> to overwrite them anyway.
=item B<--slave>
When you launch alternc.install, any AlternC slave instance defined in /etc/alternc/local.sh has its own alternc.install launch with this parameter. You should not use it yourself unless you know what you are doing
=back
=head1 AUTHOR
Benjamin Sonntag for AlternC Team <team@alternc.org>
=head1 SEE ALSO
Go to http://www.alternc.org/ or join #alternc IRC channel on Freenode for more information on AlternC.
=cut
# ----------------------------------------------------------------------
# AlternC - Web Hosting System
# Copyright (C) 2000-2012 by the AlternC Development Team.
# https://alternc.org/
# ----------------------------------------------------------------------
# LICENSE
#