218 lines
8.3 KiB
RPMSpec
218 lines
8.3 KiB
RPMSpec
%define htmldir %{_localstatedir}/www/html/%{name}
|
|
%define vacationgroupid 65423
|
|
%define vacationuserid 65423
|
|
|
|
Name: postfixadmin
|
|
Version: 2.3.7
|
|
Release: 1mamba
|
|
Summary: A Web Based Management tool for Postfix
|
|
Group: Applications/Web
|
|
Vendor: openmamba
|
|
Distribution: openmamba
|
|
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
|
|
URL: http://sourceforge.net/projects/postfixadmin/
|
|
Source: http://downloads.sourceforge.net/project/postfixadmin/postfixadmin/postfixadmin-%{version}/postfixadmin-%{version}.tar.gz
|
|
Source1: %{name}-httpd.d.conf
|
|
Source2: %{name}-vacation.conf
|
|
Patch0: %{name}-2.2.1.1-css_menu_width.patch
|
|
Patch1: %{name}-2.3-fix_php_path.patch
|
|
License: GPL
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
|
Requires: mysql >= 4.1.22, mysql-client >= 4.1.22
|
|
Requires: postfix >= 2.3.8
|
|
Requires: httpd, apache-mod_php
|
|
Requires: php-mysql >= 5.1.5
|
|
BuildArch: noarch
|
|
|
|
%description
|
|
Postfix Admin is a Web Based Management tool created for Postfix.
|
|
It is a PHP based application that handles Postfix Style Virtual Domains and Users that are stored in MySQL.
|
|
|
|
Postfix Admin supports:
|
|
- Virtual Mailboxes / Virtual Aliases / Forwarders.
|
|
- Domain to Domain forwarding / Catch-All.
|
|
- Vacation (auto-response) for Virtual Mailboxes.
|
|
- Quota / Alias & Mailbox limits per domain.
|
|
- Backup MX.
|
|
- Packaged with over 25 languages...
|
|
|
|
%package cyrus
|
|
Group: Applications/Web
|
|
Summary: Postfixadmin support files for cyrus-imap
|
|
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
|
|
|
|
%description cyrus
|
|
Postfixadmin support files for cyrus-imap.
|
|
|
|
%prep
|
|
%setup -q
|
|
%patch0 -p1
|
|
%patch1 -p1
|
|
|
|
%build
|
|
|
|
%install
|
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
|
install -d %{buildroot}%{htmldir} %{buildroot}%{_datadir}/postfixadmin
|
|
cp -a * %{buildroot}%{htmldir}
|
|
#install -m0644 DOCUMENTS/BACKUP_MX.txt DOCUMENTS/FAQ.txt DOCUMENTS/LANGUAGE.txt \
|
|
# DOCUMENTS/POSTFIX_CONF.txt DOCUMENTS/SECURITY.txt DOCUMENTS/UPGRADE.txt \
|
|
# DOCUMENTS/DOVECOT.txt DOCUMENTS/HORDE.txt DOCUMENTS/POSTFIXADMIN.txt \
|
|
# DOCUMENTS/SUPERADMIN.txt
|
|
# %{buildroot}%{_datadir}/postfixadmin/
|
|
#install CHANGELOG.TXT %{buildroot}%{htmldir}
|
|
#rm -rf %{buildroot}%{htmldir}/DOCUMENTS
|
|
#mv %{buildroot}%{htmldir}/config.inc.php.sample %{buildroot}%{htmldir}/config.inc.php
|
|
rm -rf %{buildroot}%{htmldir}/templates/{footer,menu}.tpl.orig
|
|
#sed -i "s|AuthUserFile .*|AuthUserFile %{htmldir}/admin/.htpasswd|" %{buildroot}%{htmldir}/admin/.htaccess
|
|
install -D -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/httpd/httpd.d/postfixadmin.conf
|
|
|
|
# configure vacation support
|
|
install -d %{buildroot}/var/spool/vacation
|
|
cp %{buildroot}%{htmldir}/VIRTUAL_VACATION/vacation.pl %{buildroot}/var/spool/vacation
|
|
install -D -m 0600 %{SOURCE2} %{buildroot}%{_sysconfdir}/mail/postfixadmin/vacation.conf
|
|
cat > %{buildroot}%{_sysconfdir}/mail/postfixadmin/vacation.conf << _EOF
|
|
_EOF
|
|
|
|
# configure cyrus imap support
|
|
cp %{buildroot}%{htmldir}/ADDITIONS/cyrus/cyrus.conf %{buildroot}%{_sysconfdir}/mail/postfixadmin/cyrus.conf
|
|
|
|
rm -rf %{buildroot}%{htmldir}/debian
|
|
#rm -f %{buildroot}%{htmldir}/*.TXT
|
|
|
|
%clean
|
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
|
|
|
#%post
|
|
## new install
|
|
#if [ $1 -eq 1 ]; then
|
|
# mysql -u root < %{_datadir}/postfixadmin/DATABASE_MYSQL.TXT
|
|
#fi
|
|
#exit 0
|
|
|
|
%pre
|
|
if [ $1 -ge 1 ]; then
|
|
/usr/sbin/groupadd vacation -g %{vacationgroupid} 2>/dev/null
|
|
/usr/sbin/useradd -c "Virtual Vacation" -u %{vacationuserid} -d /dev/null -g vacation \
|
|
-s /bin/nologin vacation 2>/dev/null
|
|
fi
|
|
exit 0
|
|
|
|
%preun
|
|
if [ $1 -eq 0 ]; then
|
|
/usr/sbin/groupdel vacation 2>/dev/null
|
|
/usr/sbin/userdel vacation 2>/dev/null
|
|
fi
|
|
exit 0
|
|
|
|
%files
|
|
%defattr(-,root,root)
|
|
%config(noreplace) %attr(0640,root,nobody) %{_sysconfdir}/httpd/httpd.d/postfixadmin.conf
|
|
%config(noreplace) %attr(0600,vacation,vacation) %{_sysconfdir}/mail/postfixadmin/vacation.conf
|
|
#%config %attr(0640,root,nobody) %{htmldir}/admin/.htaccess
|
|
#%config(noreplace) %attr(0640,root,nobody) %{htmldir}/admin/.htpasswd
|
|
%attr(0755,root,root) %dir %{htmldir}
|
|
%attr(0640,root,nobody) %{htmldir}/css/*
|
|
%config %attr(0640,root,nobody) %{htmldir}/config.inc.php
|
|
%attr(0640,root,nobody) %{htmldir}/backup.php
|
|
%attr(0640,root,nobody) %{htmldir}/broadcast-message.php
|
|
%attr(0640,root,nobody) %{htmldir}/common.php
|
|
%attr(0640,root,nobody) %{htmldir}/create-admin.php
|
|
%attr(0640,root,nobody) %{htmldir}/create-alias.php
|
|
%attr(0640,root,nobody) %{htmldir}/create-alias-domain.php
|
|
%attr(0640,root,nobody) %{htmldir}/create-domain.php
|
|
%attr(0640,root,nobody) %{htmldir}/create-mailbox.php
|
|
%attr(0640,root,nobody) %{htmldir}/delete.php
|
|
%attr(0640,root,nobody) %{htmldir}/edit-active.php
|
|
%attr(0640,root,nobody) %{htmldir}/edit-active-admin.php
|
|
%attr(0640,root,nobody) %{htmldir}/edit-active-domain.php
|
|
%attr(0640,root,nobody) %{htmldir}/edit-admin.php
|
|
%attr(0640,root,nobody) %{htmldir}/edit-alias.php
|
|
%attr(0640,root,nobody) %{htmldir}/edit-domain.php
|
|
%attr(0640,root,nobody) %{htmldir}/edit-mailbox.php
|
|
%attr(0640,root,nobody) %{htmldir}/edit-vacation.php
|
|
%attr(0640,root,nobody) %{htmldir}/fetchmail.php
|
|
%attr(0640,root,nobody) %{htmldir}/functions.inc.php
|
|
%attr(0640,root,nobody) %{htmldir}/index.php
|
|
%attr(0640,root,nobody) %{htmldir}/list-admin.php
|
|
%attr(0640,root,nobody) %{htmldir}/list-domain.php
|
|
%attr(0640,root,nobody) %{htmldir}/list-virtual.php
|
|
%attr(0640,root,nobody) %{htmldir}/login.php
|
|
%attr(0640,root,nobody) %{htmldir}/logout.php
|
|
%attr(0640,root,nobody) %{htmldir}/main.php
|
|
%attr(0640,root,nobody) %{htmldir}/password.php
|
|
%attr(0640,root,nobody) %{htmldir}/search.php
|
|
%attr(0640,root,nobody) %{htmldir}/sendmail.php
|
|
%attr(0640,root,nobody) %{htmldir}/setup.php
|
|
%attr(0640,root,nobody) %{htmldir}/upgrade.php
|
|
%attr(0640,root,nobody) %{htmldir}/variables.inc.php
|
|
%attr(0640,root,nobody) %{htmldir}/viewlog.php
|
|
%attr(0640,root,nobody) %{htmldir}/xmlrpc.php
|
|
%attr(0640,root,nobody) %{htmldir}/motd*.txt
|
|
%attr(0640,root,nobody) %{htmldir}/admin/*.php
|
|
%dir %{htmldir}/DOCUMENTS
|
|
%{htmldir}/DOCUMENTS/*
|
|
%dir %{htmldir}/ADDITIONS
|
|
%dir %{htmldir}/ADDITIONS/squirrelmail-plugin
|
|
%{htmldir}/ADDITIONS/squirrelmail-plugin/*
|
|
%{htmldir}/ADDITIONS/README.TXT
|
|
%{htmldir}/ADDITIONS/change_password.tgz
|
|
%{htmldir}/ADDITIONS/*.pl
|
|
%{htmldir}/ADDITIONS/import_users_from_csv.py
|
|
%{htmldir}/ADDITIONS/postfixadmin-domain-postdeletion.sh
|
|
%{htmldir}/ADDITIONS/postfixadmin-mailbox-postcreation.sh
|
|
%{htmldir}/ADDITIONS/postfixadmin-mailbox-postdeletion.sh
|
|
%{htmldir}/ADDITIONS/virtualmaildel.php
|
|
%attr(0640,root,nobody) %{htmldir}/images/*.png
|
|
%attr(0640,root,nobody) %{htmldir}/images/postfixadmin2.xcf
|
|
%attr(0640,root,nobody) %{htmldir}/images/index.php
|
|
%attr(0640,root,nobody) %{htmldir}/languages/*
|
|
%attr(0640,root,nobody) %{htmldir}/model/*
|
|
%attr(0640,root,nobody) %{htmldir}/templates/*.php
|
|
%attr(0640,root,nobody) %{htmldir}/users/*.php
|
|
%attr(0640,root,nobody) %dir %{htmldir}/VIRTUAL_VACATION
|
|
%attr(0640,root,nobody) %{htmldir}/VIRTUAL_VACATION/*
|
|
%attr(-,root,nobody)%{htmldir}/tests
|
|
%attr(0700,vacation,vacation) %dir /var/spool/vacation
|
|
%attr(0700,vacation,vacation) /var/spool/vacation/vacation.pl
|
|
%{htmldir}/CHANGELOG.TXT
|
|
%{htmldir}/GPL-LICENSE.TXT
|
|
%{htmldir}/INSTALL.TXT
|
|
%{htmldir}/LICENSE.TXT
|
|
|
|
%files cyrus
|
|
%defattr(-,root,root)
|
|
%config(noreplace) %{_sysconfdir}/mail/postfixadmin/cyrus.conf
|
|
%dir %{htmldir}/ADDITIONS/cyrus/*
|
|
|
|
%changelog
|
|
* Thu Feb 27 2014 Automatic Build System <autodist@mambasoft.it> 2.3.7-1mamba
|
|
- automatic update by autodist
|
|
|
|
* Tue Jan 15 2013 Automatic Build System <autodist@mambasoft.it> 2.3.6-1mamba
|
|
- automatic version update by autodist
|
|
|
|
* Sat Sep 29 2012 Silvan Calarco <silvan.calarco@mambasoft.it> 2.3.5-2mamba
|
|
- replace config.inc.php to match new changes; use config.local.php for custom settings
|
|
|
|
* Mon Apr 09 2012 Silvan Calarco <silvan.calarco@mambasoft.it> 2.3.5-1mamba
|
|
- update to 2.3.5
|
|
|
|
* Wed Sep 21 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 2.3.4-1mamba
|
|
- update to 2.3.4
|
|
|
|
* Fri Jun 04 2010 Automatic Build System <autodist@mambasoft.it> 2.3-1mamba
|
|
- update to 2.3
|
|
|
|
* Thu Mar 19 2009 Silvan Calarco <silvan.calarco@mambasoft.it> 2.2.1.1-1mamba
|
|
- update to 2.2.1.1
|
|
|
|
* Fri May 25 2007 Silvan Calarco <silvan.calarco@mambasoft.it> 2.1.0-3mamba
|
|
- change group from apache to nobody
|
|
|
|
* Thu May 24 2007 Silvan Calarco <silvan.calarco@mambasoft.it> 2.1.0-2mamba
|
|
- rebuilt
|
|
|
|
* Tue Mar 13 2007 Silvan Calarco <silvan.calarco@mambasoft.it> 2.1.0-1qilnx
|
|
- package created by autospec
|