1 |
Summary: MX Backup configuration panel for SME Server |
2 |
%define name smeserver-mxbackup |
3 |
Name: %{name} |
4 |
%define version 0.2 |
5 |
%define release 1 |
6 |
Version: %{version} |
7 |
Release: %{release} |
8 |
License: GPL |
9 |
Group: Networking/Daemons |
10 |
Source: %{name}-%{version}.tar.gz |
11 |
#Patch01: %{name}-%{version}-01.patch |
12 |
#Patch02: %{name}-%{version}-02.patch |
13 |
Packager: Pascal Schirrmann <schirrms@schirrms.net> |
14 |
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot |
15 |
BuildRequires: e-smith-devtools |
16 |
BuildArchitectures: noarch |
17 |
Requires: smeserver-release >= 9 |
18 |
Requires: e-smith-email >= 5.4.0 |
19 |
Requires: e-smith-formmagick >= 2.4.0 |
20 |
Requires: e-smith-base |
21 |
Requires: e-smith-qmail >= 2.4.0 |
22 |
AutoReqProv: no |
23 |
|
24 |
%description |
25 |
Adds a MX Backup Configuration panel to the SME server-manager. |
26 |
|
27 |
%changelog |
28 |
* Tue Jan 28 2020 John Crisp <jcrisp@safeandsoundit.co.uk> 0.2-1.sme |
29 |
- Update createlinks file |
30 |
- Remove unnecessary apostrophe |
31 |
- Updated readme |
32 |
- Comment out debugging in pm file |
33 |
- Updating for v9 |
34 |
- Dropped the UTF-8 |
35 |
- Modify the vendor_perl directory |
36 |
|
37 |
* Sun Apr 20 2008 Pascal Schirrmann <schirrms@schirrms.net> |
38 |
- This is a fork of smeserver-mxbackup, with utf-8 charset. |
39 |
As long as the two versions will exist, the sequence number will stay the same. |
40 |
I just increment the version number for the tracker. |
41 |
[0.1.0-03] |
42 |
* Wed Apr 26 2006 Pascal Schirrmann <schirrms@schirrms.net> |
43 |
- Change default to host for any new creation |
44 |
[0.1.0-02] |
45 |
* Wed Apr 26 2006 Pascal Schirrmann <schirrms@schirrms.net> |
46 |
- Fast port to SME 7 : a qpsmtpd configuration file need |
47 |
to be altered to accept incoming mails for mx-backuped domains |
48 |
[0.1.0-01] |
49 |
* Tue May 11 2004 Pascal Schirrmann <schirrms@schirrms.net> |
50 |
- New : if the MX-Backup server use a 'smart host' it |
51 |
still use DNS for the 'MX-Backuped Domains' |
52 |
[0.1.0-00] |
53 |
* Thu Apr 22 2004 Pascal Schirrmann <schirrms@schirrms.net> |
54 |
- Unable to set a domain containing a Zero !!! |
55 |
[0.0.4-00] |
56 |
* Mon Mar 08 2004 Pascal Schirrmann <schirrms@schirrms.net> |
57 |
- This RPM can only work on SME 6.0 and later, adds a |
58 |
require in the 'spec' file |
59 |
[0.0.3-01] |
60 |
* Sun Mar 07 2004 Pascal Schirrmann <schirrms@schirrms.net> |
61 |
- Add some nice stuff, ligths and so on... |
62 |
Sounds are awaited for a far future release ;-) |
63 |
[0.0.3-00] |
64 |
* Sat Mar 06 2004 Pascal Schirrmann <schirrms@schirrms.net> |
65 |
- My database conception was not very 'SME-aware' |
66 |
majors change in the database storage modes. |
67 |
[0.0.2-00] |
68 |
* Wed Mar 03 2004 Pascal Schirrmann <schirrms@schirrms.net> |
69 |
- some cosmetics change on the package name to be nearer |
70 |
of contribs.org naming systems |
71 |
[0.0.1-01] |
72 |
* Fri Feb 27 2004 Pascal Schirrmann <schirrms@schirrms.net> |
73 |
- initial release |
74 |
[0.0.1-00] |
75 |
|
76 |
%prep |
77 |
%setup |
78 |
# %patch01 -p1 |
79 |
# %patch02 -p1 |
80 |
|
81 |
%build |
82 |
perl createlinks |
83 |
|
84 |
%install |
85 |
rm -rf $RPM_BUILD_ROOT |
86 |
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) |
87 |
rm -f e-smith-%{version}-filelist |
88 |
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT > %{name}-%{version}-filelist |
89 |
|
90 |
%clean |
91 |
cd .. |
92 |
rm -rf %{name}-%{version} |
93 |
|
94 |
%files -f %{name}-%{version}-filelist |
95 |
%defattr(-,root,root) |
96 |
|
97 |
%pre |
98 |
|
99 |
%post |
100 |
# SME 6 comes with a 'left panel cache' to improve the server panel display speed |
101 |
# But I haven't found a nice way to update this cache |
102 |
# So I chose to do this update here. |
103 |
if [ -x /etc/e-smith/events/actions/navigation-conf ] |
104 |
then |
105 |
echo "Rebuilding Web Server Manager Left Panel Cache ... Can take up to a minute." |
106 |
/etc/e-smith/events/actions/navigation-conf |
107 |
echo "Done." |
108 |
fi |
109 |
if [ -x /etc/e-smith/events/actions/initialize-default-databases ] |
110 |
then |
111 |
echo "Setting defaults values in SME configuration database, if needed. Don't change any existing configuration." |
112 |
/etc/e-smith/events/actions/initialize-default-databases |
113 |
echo "Done." |
114 |
fi |
115 |
# regenerate the rcpthosts file, in case of an upgrade |
116 |
# If this is a new install, this will change nothing, because |
117 |
# status = disabled |
118 |
echo "Regenerating the config file..." |
119 |
/sbin/e-smith/expand-template /var/qmail/control/rcpthosts |
120 |
/sbin/e-smith/expand-template /var/qmail/control/smtproutes |
121 |
if [ -e /var/service/qpsmtpd/config/goodrcptto ] |
122 |
then |
123 |
/sbin/e-smith/expand-template /var/service/qpsmtpd/config/goodrcptto |
124 |
fi |
125 |
# moving 'light' in correct place. |
126 |
# these lights cannot be installed by the RPM : in case someone |
127 |
# installs the same lights, there will be a conflict. |
128 |
/bin/mv -f /etc/e-smith/GreenLight.jpg /etc/e-smith/web/common/ |
129 |
/bin/mv -f /etc/e-smith/RedLight.jpg /etc/e-smith/web/common/ |
130 |
echo "Installation finished." |
131 |
|
132 |
%preun |
133 |
|
134 |
%postun |
135 |
# rollback the rcpthosts without mxbackup entries |
136 |
echo "Revert the system as a non MX Backup system." |
137 |
/sbin/e-smith/expand-template /var/qmail/control/rcpthosts |
138 |
/sbin/e-smith/expand-template /var/qmail/control/smtproutes |
139 |
if [ -e /var/service/qpsmtpd/config/goodrcptto ] |
140 |
then |
141 |
/sbin/e-smith/expand-template /var/service/qpsmtpd/config/goodrcptto |
142 |
fi |