Репозиторий Sisyphus
Последнее обновление: 11 июля 2020 | Пакетов: 17700 | Посещений: 18864834
en ru br
Репозитории ALT
S:2.1.33.0.4.0f97-alt1
5.1: 2.1.12-alt2
4.1: 2.1.10-alt0.3.1.M41.1
4.0: 2.1.9-alt6.M40.1
3.0: 2.1.6-alt1
www.altlinux.org/Changes

Группа :: Система/Серверы
Пакет: mailman

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

# Need to fix
# Bugs:
# 815297 Breaking signatures in message/rfc822 attachement!
Name: mailman
Version: 2.1.6
Release: alt1
Epoch: 4

%define mm_user %name
%define mm_group %name
%define mm_admgrp mailmanadm
%define cgi_group apache

%define contentdir /var/www
%define httpdconfdir %_sysconfdir/httpd/conf/addon-modules
%define crontabdir %_sysconfdir/cron.d
%define logrotate %_sysconfdir/logrotate.d

%define _prefix /usr/share/%name
%define _exec_prefix /usr/lib/%name
%define _var_prefix %_localstatedir/%name

%add_python_lib_path %_prefix %_prefix/Mailman %_prefix/pythonlib %_var_prefix/etc

Summary: Mailing list manager with built in web access
License: GPL
Group: System/Servers
Url: http://www.list.org/

# http://prdownloads.sourceforge.net/%name/%name-%version.tar.tgz

Source: %name-%version.tgz
Source1: mm_cfg.py
Source2: README.ALT
Source3: %name-httpd.conf
Source4: %name.logrotate
Source5: %name.crontab
Source6: %name.init
Source7: mailman-ftt0.3.po
Source8: mm_config.py
Source9: mailman.wrapper

Patch6: %name-2.1.4-alt-adm.patch
# 670167
Patch10: Scrubber.py.patch.030224.txt
Patch11: email-2.5.6-alt-charset.patch
Patch12: mailman-2.1.4-alt-umask.patch
Patch13: mailman-2.1.4-alt-group.patch

PreReq: mktemp >= 1:1.3.1, setup >= 2.2.0-alt3, shadow-utils, sendmail-common, vixie-cron
Requires: webserver, python = %__python_version

BuildRequires: python-devel = %__python_version

%description
Mailman, the GNU Mailing List Management System, is a mailing list
management system written mostly in Python. Features:
- Web based list administration for nearly all tasks.  Web based            
 subscriptions and user configuration management.  A customizable          
 "home page" for each mailing list.                                        
- Privacy features such as moderation, open and closed list                
 subscription policies, private membership rosters, and                    
 sender-based filters.                                                    
- Automatic web based archiving built-in with support for private          
 and public archives, and hooks for external archivers.                    
- Per-user configuration optional digest delivery for either                
 MIME-compliant or RFC 1153 style "plain text" digests.                    
- Integrated mail/Usenet gateways.                                          
- Integrated auto-replies.                                                  
- Majordomo-style email based commands.                                    
- Integrated bounce detection within an extensible framework.              
- Integrated spam detection, and MIME-based content filtering.              
- An extensible mail delivery pipeline.                                    
- Support for virtual domains.                                              

See the Mailman home site for current status, including new releases
and known problems: %url

%prep
%setup -q
%__install -pD -m644 %SOURCE1 Mailman/mm_cfg.py
%__install -pD -m644 %SOURCE2 README.ALT
%__install -pD -m644 %SOURCE7 messages/ru/LC_MESSAGES/mailman.po

%patch6 -p1
pushd misc
%__tar xfz email-2.5.6.tar.gz
%patch11 -p0
popd
%patch12 -p1
%patch13 -p1

%build
autoreconf -fisv
%configure \
--with-var-prefix=%_var_prefix \
--with-python=%__python \
--with-mail-gid=%mm_group \
--with-cgi-gid=%cgi_group \
--with-mailhost=localhost.localdomain \
--with-urlhost=localhost.localdomain \
--without-permcheck

%make_build OPT="$RPM_OPT_FLAGS"

%install
find bin -type f -print0 |
xargs -r0 %__grep -Zl '%__python$' |
xargs -r0 %__subst 's|%__python$|%__python -O|g'

%make_install doinstall \
prefix=$RPM_BUILD_ROOT%prefix \
exec_prefix=$RPM_BUILD_ROOT%_exec_prefix \
var_prefix=$RPM_BUILD_ROOT%_var_prefix

chmod -R go-w $RPM_BUILD_ROOT{%prefix,%_exec_prefix}
find $RPM_BUILD_ROOT{%prefix,%_exec_prefix} -type d -print0 |
xargs -r0 chmod a-s,o-r
chmod a-s,go-r $RPM_BUILD_ROOT%_var_prefix

# Create directories we'll use for log and spool files. Create links

%__install -d -m2771 $RPM_BUILD_ROOT%_logdir/%name
%__install -d -m2770 $RPM_BUILD_ROOT%_spooldir/%name
%__install -d -m2771 $RPM_BUILD_ROOT%_spooldir/%name/{archive,bounces,commands,in,news,out,qfiles,retry,shunt,virgin}

rmdir $RPM_BUILD_ROOT%_var_prefix/{logs,qfiles}
ln -s ../../log/%name $RPM_BUILD_ROOT%_var_prefix/logs
ln -s ../../spool/%name $RPM_BUILD_ROOT%_var_prefix/qfiles

# Copy an icons into the web server's icons directory.

%__mkdir_p $RPM_BUILD_ROOT%contentdir
%__mv $RPM_BUILD_ROOT%prefix/icons $RPM_BUILD_ROOT%contentdir/

# Install a logrotate control file.

%__install -pD -m644 %SOURCE4 \
$RPM_BUILD_ROOT%logrotate/%name

# Install the httpd configuration file.

%__install -pD -m644 /dev/null $RPM_BUILD_ROOT%httpdconfdir/%name.conf
%__sed -e 's| at CODEDIR at |%_exec_prefix|g;s| at DATADIR at |%_var_prefix|g' \
%SOURCE3 > $RPM_BUILD_ROOT%httpdconfdir/%name.conf

# Install crontab file

%__install -pD -m644 %SOURCE5 $RPM_BUILD_ROOT%crontabdir/%name

# Install init script

%__install -pD -m755 %SOURCE6 $RPM_BUILD_ROOT%_initdir/%name
%__install -pD -m755 %SOURCE9 $RPM_BUILD_ROOT%prefix/bin/wrapper.sh

# Install config files for postfix

%__install -pD -m644 %SOURCE8 $RPM_BUILD_ROOT%_var_prefix/etc/mm_config.py
%__install -pD -m644 /dev/null $RPM_BUILD_ROOT%_var_prefix/etc/aliases
%__install -pD -m644 /dev/null $RPM_BUILD_ROOT%_var_prefix/etc/virtual-mailman
%__install -pD -m644 /dev/null $RPM_BUILD_ROOT%_var_prefix/etc/aliases.db
%__install -pD -m644 /dev/null $RPM_BUILD_ROOT%_var_prefix/etc/virtual-mailman.db

# Remove unused files

%__rm -f $RPM_BUILD_ROOT%_var_prefix/data/sitelist.cfg

%pre
/usr/sbin/groupadd -rf %mm_admgrp
/usr/sbin/groupadd -rf %mm_group
/usr/sbin/useradd -M -r -s /dev/null -c "GNU Mailing List Manager" -d %_var_prefix -g %mm_group %mm_user &>/dev/null ||:

%post
%post_service mailman
echo "Please modify your /etc/postfix/main.cf file like this:"
echo " alias_maps = hash:/etc/postfix/aliases,hash:/var/lib/mailman/etc/aliases"
echo " virtual_maps = hash:/etc/postfix/virtual,hash:/var/lib/mailman/etc/virtual-mailman"
echo "Update database:"
su -l mailman -s /bin/sh -c /usr/share/mailman/bin/update

%preun
%preun_service mailman

%files
%config(noreplace) %logrotate/%name
%config(noreplace) %httpdconfdir/%name.conf
%config(noreplace) %crontabdir/%name
%attr(0755,root,root) %_initdir/%name
%contentdir/icons/*
%dir %prefix
%prefix/bin
%prefix/cron
%prefix/Mailman
%prefix/messages
%prefix/pythonlib
%prefix/scripts
%prefix/templates
%prefix/tests
%doc ACKNOWLEDGMENTS BUGS FAQ INSTALL NEWS README* TODO UPGRADING misc/sitelist.cfg tests

%defattr(-,root,%name,-)
%_exec_prefix
%dir %attr(0751,root,mailman) %_var_prefix
%dir %_var_prefix/archives
%dir %_var_prefix/archives/*
%dir %_var_prefix/spam
%dir %_var_prefix/locks
%dir %_var_prefix/lists
%dir %_var_prefix/data
%dir %attr(2771,root,%mm_admgrp) %_var_prefix/etc
%config(noreplace) %attr(0664,root,%mm_admgrp) %_var_prefix/etc/mm_config.*
%config(noreplace) %attr(0664,root,%mm_admgrp) %_var_prefix/etc/aliases
%config(noreplace) %attr(0664,root,%mm_admgrp) %_var_prefix/etc/virtual-mailman
%ghost %_var_prefix/etc/aliases.db
%ghost %_var_prefix/etc/virtual-mailman.db
%_var_prefix/logs
%_var_prefix/qfiles
%_logdir/%name
%dir %_spooldir/%name
%dir %_spooldir/%name/*

%changelog

Полный changelog можно просмотреть здесь

 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin