1 |
# $Id: smeserver-mailman.spec,v 1.1 2013/11/13 12:55:27 vip-ire Exp $ |
# $Id: smeserver-mailman.spec,v 1.6 2015/09/08 12:15:10 stephdl Exp $ |
2 |
# Authority: gordonr |
# Authority: gordonr |
3 |
# Name: Gordon Rowell |
# Name: Gordon Rowell |
4 |
|
|
8 |
Summary: Mailman configuration for SME server. |
Summary: Mailman configuration for SME server. |
9 |
%define name smeserver-mailman |
%define name smeserver-mailman |
10 |
Name: %{name} |
Name: %{name} |
11 |
%define version 1.4.0 |
%define version 1.5.0 |
12 |
%define release 1 |
%define release 6 |
13 |
Version: %{version} |
Version: %{version} |
14 |
Release: %{release}%{?dist} |
Release: %{release}%{?dist} |
15 |
License: GPL |
License: GPL |
16 |
Group: Applications/Internet |
Group: Applications/Internet |
17 |
Source: %{name}-%{version}.tar.xz |
Source: %{name}-%{version}.tar.gz |
18 |
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot |
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot |
19 |
BuildArchitectures: noarch |
BuildArchitectures: noarch |
20 |
Requires: e-smith-base |
Requires: e-smith-base |
21 |
Requires: e-smith-release >= 8.0 |
Requires: e-smith-release >= 9.0 |
22 |
Requires: mailman >= 2.1.9-20.el5.sme |
Requires: mailman >= 2.1.9-20.el5.sme |
23 |
Requires: e-smith-formmagick >= 1.4.0-12 |
Requires: e-smith-formmagick >= 1.4.0-12 |
24 |
BuildRequires: e-smith-devtools >= 1.13.1-03 |
BuildRequires: e-smith-devtools >= 1.13.1-03 |
25 |
Obsoletes: e-smith-mailman |
Obsoletes: e-smith-mailman |
26 |
Provides: e-smith-mailman |
Provides: e-smith-mailman |
27 |
AutoReqProv: no |
AutoReqProv: no |
28 |
|
Patch0: smeserver-mailman-1.5.0.bz2411.Backup_mailman.patch |
29 |
%description |
%description |
30 |
Add Mailman integration to the SME server. |
Add Mailman integration to the SME server. |
31 |
|
|
32 |
%changelog |
%changelog |
33 |
* Wed Nov 13 2013 Daniel Berteaud <daniel@firewall-services.com> 1.4.0-1.sme |
* Fri Sep 11 2015 stephane de Labrusse <stephdl@de-labrusse.fr> 1.5.0-6.sme |
34 |
- Rebuild for SME9 |
- Mailman is now added to the backup/restore process [SME: 2411] |
35 |
|
- Added smeserver-mailman-1.5.0.bz2411.Backup_mailman.patch |
36 |
|
|
37 |
|
* Fri Aug 21 2015 stephane de Labrusse <stephdl@de-labrusse.fr> 1.5.0-5.sme |
38 |
|
- mailman wants that the group apache appears before the www group in /etc/group |
39 |
|
- script added in %pre to change that order. [SME: 8056] |
40 |
|
|
41 |
|
* Fri Aug 21 2015 stephane de Labrusse <stephdl@de-labrusse.fr> 1.5.0-3.sme |
42 |
|
- Initial release to contribs9 [SME: 8453] |
43 |
|
|
44 |
|
* Fri Jun 20 2014 stephane de Labrusse <stephdl@de-labrusse.fr> 1.5.0-1.sme |
45 |
|
- Initial release to sme9 |
46 |
|
|
47 |
* Fri Sep 20 2013 JP Pialasse <tests@pialasse.com> 1.3.0-45.sme |
* Fri Sep 20 2013 JP Pialasse <tests@pialasse.com> 1.3.0-45.sme |
48 |
- fix bug [SME: 7787] |
- fix bug [SME: 7787] |
285 |
|
|
286 |
%prep |
%prep |
287 |
%setup |
%setup |
288 |
|
%patch0 -p1 |
289 |
|
|
290 |
|
#/bin/rm -r root/opt/mailman |
291 |
|
|
292 |
%build |
%build |
293 |
perl createlinks |
perl createlinks |
328 |
--dir '/var/spool/mailman/qfiles/virgin' 'attr(02770,mailman,mailman)' \ |
--dir '/var/spool/mailman/qfiles/virgin' 'attr(02770,mailman,mailman)' \ |
329 |
$RPM_BUILD_ROOT > %{name}-%{version}-filelist |
$RPM_BUILD_ROOT > %{name}-%{version}-filelist |
330 |
|
|
331 |
|
# SME8 build to avoid error |
332 |
|
#/usr/lib/rpm/brp-python-bytecompile |
333 |
|
#rm -rf $RPM_BUILD_ROOT/etc/e-smith/events/domain-create/templates2expand/usr/lib/mailman/Mailman/mm_cfg.pyc |
334 |
|
#rm -rf $RPM_BUILD_ROOT/etc/e-smith/events/domain-create/templates2expand/usr/lib/mailman/Mailman/mm_cfg.pyo |
335 |
|
#rm -rf $RPM_BUILD_ROOT/etc/e-smith/events/domain-delete/templates2expand/usr/lib/mailman/Mailman/mm_cfg.pyc |
336 |
|
#rm -rf $RPM_BUILD_ROOT/etc/e-smith/events/domain-delete/templates2expand/usr/lib/mailman/Mailman/mm_cfg.pyo |
337 |
|
#rm -rf $RPM_BUILD_ROOT/etc/e-smith/events/bootstrap-console-save/templates2expand/usr/lib/mailman/Mailman/mm_cfg.pyc |
338 |
|
#rm -rf $RPM_BUILD_ROOT/etc/e-smith/events/bootstrap-console-save/templates2expand/usr/lib/mailman/Mailman/mm_cfg.pyo |
339 |
|
#rm -rf $RPM_BUILD_ROOT/etc/e-smith/events/mailman-update/templates2expand/usr/lib/mailman/Mailman/mm_cfg.pyc |
340 |
|
#rm -rf $RPM_BUILD_ROOT/etc/e-smith/events/mailman-update/templates2expand/usr/lib/mailman/Mailman/mm_cfg.pyo |
341 |
|
#rm -rf $RPM_BUILD_ROOT/usr/lib/mailman/Mailman/mm_cfg.pyc |
342 |
|
#rm -rf $RPM_BUILD_ROOT/usr/lib/mailman/Mailman/mm_cfg.pyo |
343 |
|
#rm -rf $RPM_BUILD_ROOT/usr/lib/mailman/Mailman/MTA/SME.pyc |
344 |
|
#rm -rf $RPM_BUILD_ROOT/usr/lib/mailman/Mailman/MTA/SME.pyo |
345 |
|
|
346 |
# fixe for unwanted listed compiled python files |
# fixe for unwanted listed compiled python files |
347 |
cat %{name}-%{version}-filelist |sed '/py[oc]$/d'>%{name}-%{version}-filelist.tmp |
cat %{name}-%{version}-filelist |sed '/py[oc]$/d'>%{name}-%{version}-filelist.tmp |
348 |
cat %{name}-%{version}-filelist.tmp> %{name}-%{version}-filelist |
cat %{name}-%{version}-filelist.tmp> %{name}-%{version}-filelist |
359 |
/sbin/e-smith/create-system-user mailman 41 \ |
/sbin/e-smith/create-system-user mailman 41 \ |
360 |
"Mailman user" /usr/lib/mailman /bin/false |
"Mailman user" /usr/lib/mailman /bin/false |
361 |
|
|
362 |
|
#mailman wants that the apache group appears before the www group in /etc/group [SME: 8056] |
363 |
|
TEST=$(grep -P '^www|apache' /etc/group) |
364 |
|
TEST2='www:x:102:admin |
365 |
|
apache:x:102:' |
366 |
|
|
367 |
|
if [[ $TEST == $TEST2 ]]; then |
368 |
|
WWW=$(sed -n '/^www/p' /etc/group) |
369 |
|
sed -i '/^www/d' /etc/group |
370 |
|
echo $WWW >> /etc/group |
371 |
|
fi |
372 |
|
|
373 |
%post |
%post |
374 |
|
|
375 |
%preun |
%preun |