License: LGPL
Group: System/Configuration
Source: dtc.tar.gz
BuildRoot: %{_tmppath}/%{name}-root
Requires: php >= 4.1, php-mysql >= 4.1, webalizer, mysql

%description
A GPL web control panel for admin and accounting hosting services
Domain Technologie Control (DTC) is a GPL control panel for hosting. Using a
web GUI for admin and accounting all hosting services, DTC can delegate the
task of creating subdomains, email, and FTP accounts to users for the domain
names they own. DTC manages a MySQL database containing all the hosting
informations. It has support for many programs (bind 8 and 9 and
compatibles, MySQL, Apache 1.3, php4, qmail, postfix 2, courier, dovecot,
proftpd, webalizer, mod-log-sql, etc...) thrue config files and/or MySQL
plugin (when service is non-critical). It can also generates backup scripts,
calculation scripts, and config files using a single system UID/GID, and
monitor all trafic accounting per user and per service. Since version 0.12,
DTC is fully skinable and translated in 7 language (Chinese, English,
Spanish, French, Deuch, German and Russian).

WWW: http://www.gplhost.com/?rub=software&sousrub=dtc

%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/usr/share/dtc
cp -r admin $RPM_BUILD_ROOT/usr/share/dtc
cp -r client $RPM_BUILD_ROOT/usr/share/dtc
cp -r shared $RPM_BUILD_ROOT/usr/share/dtc
cp -r doc $RPM_BUILD_ROOT/usr/share/dtc

%prep
%setup -q -n %{name}

%post
mkdir -p %{_datadir}/dtc/etc/zones
chmod +x %{_datadir}/dtc/admin/dtc.rpm-install.sh
chmod +x %{_datadir}/dtc/admin/dtc.rpm-uninstall.sh
cp %{_datadir}/dtc/admin/dtc.rpm-uninstall.sh /usr/sbin
chown -R root:root %{_datadir}/dtc
echo To complete installation, please run %{_datadir}/dtc/admin/dtc.rpm-install.sh

%postun
echo To complete uninstallation, please run /usr/sbin/dtc.rpm-uninstall.sh
echo and remove the uninstall script.

%files
%{_datadir}/dtc/admin/*
%{_datadir}/dtc/shared/*
%{_datadir}/dtc/client/*
%{_datadir}/dtc/doc/*

%clean
rm -rf $RPM_BUILD_ROOT

