%define name sympa %define version 3.4.4.3 %define release 4mdk %define lib_s %{_libdir}/sympa %define data_s %{_datadir}/sympa %define conf_s %{_sysconfdir}/sympa %define home_s %{_localstatedir}/sympa %define spool_s /var/spool/sympa # ugly... %define exceptions perl(\\(Archive\\|Commands\\|Conf\\|Language\\|Ldap\\|List\\|Log\\|Marc.*\\|Message\\|Version\\|X509\\|cookielib\\|mail\\|smtp\\|wwslib\\|.*\.pl\\)) %define _provides_exceptions %{exceptions} %define _requires_exceptions %{exceptions} #New ADVX macros %{expand:%(cat %{_datadir}/ADVX/ADVX-build)} Summary: SYMPA is an electronic mailing list manager Name: %{name} Version: %{version} Release: %{release} License: GPL Group: System/Servers Source0: %{name}-%{version}.tar.bz2 Source1: %{name}.logrotate.bz2 Patch0: sympa-3.2.1-gprintify.patch.bz2 URL: http://www.sympa.org/ Requires: openssl >= 0.9.5a Requires: MHonArc >= 2.4.5 Requires: apache Requires: smtpdaemon Requires: perl-MailTools >= 1.14 Requires: perl-MIME-Base64 >= 1.0 Requires: perl-IO-stringy >= 1.0 Requires: perl-Msgcat >= 1.03 Requires: perl-MIME-tools >= 5.209 Requires: perl-CGI >= 2.52 Requires: perl-DBI >= 1.06 Requires: perl-DB_File >= 1.73-5mdk Requires: perl-ldap >= 0.10 Requires: perl-FCGI >= 0.48 Requires: perl-CGI-Fast Requires: perl-Crypt-CipherSaber PreReq: rpm-helper BuildRequires: openssl-devel >= 0.9.5a BuildRequires: ADVX-build >= 1.2 BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot %description SYMPA is an electronic mailing list manager. It is used to automate list management functions such as subscription, moderation and management of archives. SYMPA also manages sending of messages to the lists, and makes it possible to reduce the load on the system. Provided that you have enough memory on your system, Sympa is especially well adapted for big lists. For a list with 20 000 subscribers, it takes 5 minutes to send a message to 90% of subscribers, of course considering that the network is available. Documentation is available under HTML and SGML (source) formats. %prep rm -rf $RPM_BUILD_ROOT %setup -q %patch0 -p1 -b .gprintify bzcat %{SOURCE1} > %{name}.logrotate %build %serverbuild ./configure \ --prefix=%{home_s} \ --with-mandir=%{_mandir} \ --with-confdir=%{conf_s} \ --with-etcdir=%{conf_s} \ --with-cgidir=%{ap_datadir}/cgi-bin \ --with-iconsdir=%{ap_datadir}/icons/sympa \ --with-bindir=%{lib_s}/bin \ --with-sbindir=%{lib_s}/bin \ --with-libexecdir=%{lib_s}/bin \ --with-libdir=%{lib_s}/lib \ --with-datadir=%{data_s} \ --with-expldir=%{home_s}/expl \ --with-piddir=/var/run/sympa \ --with-nlsdir=%{lib_s}/nls \ --with-scriptdir=%{data_s}/examples/script \ --with-sampledir=%{data_s}/examples/sample \ --with-spooldir=%{spool_s} \ --with-sendmail_aliases=/etc/aliases \ --with-initdir=%{_initrddir} %make sources %install rm -rf $RPM_BUILD_ROOT # Fix owner/group in filelist for i in ./src/Makefile ./wwsympa/Makefile ./src/etc/sample/Makefile ./Makefile; do perl -pi -e "s|chown|/bin/true|" $i perl -pi -e "s|chgrp|/bin/true|" $i done # Actually chmod the files but not the directory! perl -pi -e "s|chmod -R 644(.+wws_templates)|chmod 644 \1/*|" ./wwsympa/Makefile %makeinstall_std # Fix permissions chmod 0644 $RPM_BUILD_ROOT%{_mandir}/man8/*.8 chmod 0644 $RPM_BUILD_ROOT%{data_s}/ca-bundle.crt chmod 0644 $RPM_BUILD_ROOT%{data_s}/mhonarc-ressources # Remove docs in bad directory rm -rf $RPM_BUILD_ROOT%{lib_s}/doc cp -a doc/html doc/sympa # Create bounce and archive incoming directories for dir in bounce arc; do mkdir -p $RPM_BUILD_ROOT%{spool_s}/$dir done # Create bounce and archive storage directories for dir in bounce arc; do mkdir -p $RPM_BUILD_ROOT%{home_s}/$dir done # Create PID directory mkdir -p $RPM_BUILD_ROOT/var/run/sympa # Populate config directory #for dir in create_list_templates scenari wws_templates templates; do # mkdir -p $RPM_BUILD_ROOT%{conf_s}/$dir #done cat >> $RPM_BUILD_ROOT%{conf_s}/sympa.conf <<EOF ## Temporary directory tmpdir %{spool_s} EOF # Dispatch config samples and fix permissions mkdir -p $RPM_BUILD_ROOT%{data_s}/examples/config mv $RPM_BUILD_ROOT%{data_s}/examples/sample/{,ww}sympa.conf \ $RPM_BUILD_ROOT%{data_s}/examples/config/ chmod 0644 $RPM_BUILD_ROOT%{data_s}/examples/config/*.conf # Move DB scripts to examples/db mkdir -p $RPM_BUILD_ROOT%{data_s}/examples/db mv $RPM_BUILD_ROOT%{data_s}/examples/script/create_db.* \ $RPM_BUILD_ROOT%{data_s}/examples/db/ # logrotate mkdir $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d install -m 644 %{name}.logrotate $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/%{name} %pre %_pre_useradd sympa %{home_s} /bin/false # Add "apache" in group "sympa" so that it could access # /etc/sympa/wwsympa.conf and therefore a working wwsympa ;-) groups=`groups apache | cut -d " " -f 4-` if [ -n "$groups" ]; then groups="$groups,sympa" else groups="sympa"; fi usermod -G $groups apache %post %_post_service sympa if [ $1 = 1 ]; then # installation # Setup log facility for Sympa cntlog=0 while [ `grep -c local${cntlog} /etc/syslog.conf` -gt 0 ];do cntlog=$((cntlog+1));done if [ ${cntlog} -le 9 ];then # syslog configuration cat >> %{_sysconfdir}/syslog.conf <<EOF # added by %{name}-%{version} rpm $(date) local${cntlog} -/var/log/%{name} EOF /sbin/service syslog reload # sympa configuration perl -pi -e "s|syslog(\s+)LOCAL[0-9]+|syslog\1LOCAL${cntlog}|" %{conf_s}/sympa.conf fi # create log file touch /var/log/sympa chown sympa.sympa /var/log/sympa chmod 0640 /var/log/sympa # Try to add some sample entries in /etc/aliases for sympa cat >> %{_sysconfdir}/aliases <<EOF # added by %{name}-%{version} rpm $(date) listmaster: "|%{lib_s}/bin/queue listmaster" sympa: "|%{lib_s}/bin/queue sympa" bounce+*: "|%{lib_s}/bin/bouncequeue sympa" sympa-request: listmaster@${HOSTNAME} sympa-owner: listmaster@${HOSTNAME} EOF /usr/bin/newaliases # Eventually, add queue to sendmail security shell if [ -d /etc/smrsh ]; then if [ ! -e /etc/smrsh/queue ]; then ln -s %{home_s}/bin/queue /etc/smrsh/queue fi fi # hostname configuration perl -pi -e "s|MY_HOST|$ENV{HOSTNAME}|g" %{conf_s}/*.conf fi %preun %_preun_service sympa if [ $1 = 0 ]; then # uninstallation # clean syslog sed -i \ -e '/^# added by %{name}/d' \ -e '/^local[0-9] \/var\/log\/%{name}$/d' \ %{_sysconfdir}/syslog.conf /sbin/service syslog reload # clean aliases sed -i \ -e '/^# added by %{name}/d' \ -e '/^listmaster:/d' \ -e '/^sympa:/d' \ -e '/^bounce+\*:/d' \ -e '/^sympa-request:/d' \ -e '/^sympa-owner:/d' \ %{_sysconfdir}/aliases /usr/bin/newaliases if [ $1 = 0 -a -d /etc/smrsh ]; then if [ -L /etc/smrsh/queue ]; then rm -f /etc/smrsh/queue fi fi fi %postun %_postun_userdel sympa %files %defattr(-,sympa,sympa) # Home directory %{home_s} # Spools %{spool_s} # PID directory /var/run/sympa # Config files %dir %{conf_s} %config(noreplace) %{conf_s}/sympa.conf %config(noreplace) %{conf_s}/wwsympa.conf # Config directories populated by the user %{conf_s}/create_list_templates %{conf_s}/scenari %{conf_s}/templates %{conf_s}/wws_templates %defattr(-,root,root) # Init scripts %config(noreplace) %{_initrddir}/%{name} %config(noreplace) %{_sysconfdir}/logrotate.d/%{name} # Binaries %dir %{lib_s} %dir %{lib_s}/bin %attr(-,sympa,sympa) %{lib_s}/bin/queue %attr(-,sympa,sympa) %{lib_s}/bin/bouncequeue %{lib_s}/bin/*.pl %{lib_s}/bin/aliaswrapper %{lib_s}/bin/virtualwrapper %{lib_s}/lib # Locales %{lib_s}/nls # Data %{data_s} # Icons and binaries for Apache %{ap_datadir}/cgi-bin/wwsympa.fcgi %{ap_datadir}/icons/sympa # Documentation %doc COPYING README NEWS KNOWNBUGS %doc doc/sympa doc/sympa.ps %{_mandir}/man8/* %clean rm -rf $RPM_BUILD_ROOT %changelog * Tue Feb 24 2004 Guillaume Rousse <guillomovitch@mandrake.org> 3.4.4.3-4mdk - more requires/buildrequires fixes - less directive logrotate configuration - buffered logging - ADVX macros - various fixes from Guillaume Sauvenay <sauvenay@ccr.jussieu.fr>: - aliases path - archive and bounce directories path - missing files * Mon Dec 15 2003 Guillaume Rousse <guillomovitch@mandrake.org> 3.4.4.3-3mdk - added *.pl files to provides/requires exceptions - better installation/uninstallation scripts - requires smtpdaemon, not MailTransportAgent - requires perl-CGI-Fast - logrotate config file - do not localise language files, otherwise rpm will filter them at install * Sat Dec 13 2003 Guillaume Rousse <guillomovitch@mandrake.org> 3.4.4.3-2mdk - move perl modules in %{lib_s}/lib - prevent them being listed as perl provides/requires (thanks gc) * Fri Dec 12 2003 Guillaume Rousse <guillomovitch@mandrake.org> 3.4.4.3-1mdk - new version - manage file perm and ownership in %%instal, not in %%post - sanitized file list - localized language files - more macros - prereq spec-helper, not {user,group}add - removed perl requires * Tue May 20 2003 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 3.4.4.1-1mdk - 3.4.4.1 * Thu Aug 15 2002 Pixel <pixel@mandrakesoft.com> 3.2.1-5mdk - rebuild for perl 5.8.0 * Sun Feb 24 2002 Frederic Lepied <flepied@mandrakesoft.com> 3.2.1-4mdk - corrected init script to be grpintify compliant * Mon Nov 26 2001 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 3.2.1-3mdk - Add apache in group sympa so that wwsympa could work * Sun Sep 16 2001 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 3.2.1-2mdk - Get rid of /usr/sbin/usermod * Mon Sep 10 2001 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 3.2.1-1mdk - Rework Patch0 to propagate ICONSDIR and substitute wwsympa.conf - Major cleanups based on guidance from Server team and Debian package: - sympa.conf: move to the dedicated dir /etc/sympa - sympa.conf: set pid file to /var/run/sympa/sympa.pid - wwsympa.conf: move to the dedicated dir /etc/sympa - wwsympa.conf: arc_path is now /var/spool/sympa/wwsarchive - wwsympa.conf: bounce_path is now /var/spool/sympa/wwsbounce - mailing-list descriptions still go to %{_localstatedir}/sympa/expl - Changes from François: - Updated to 3.2.1. - Created Patch1 to use Digest::MD5 instead of MD5 module. * Tue Aug 28 2001 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 3.0.3-2mdk - Rebuild for correct dependencies * Fri Apr 13 2001 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 3.0.3-1mdk - updated to stable version 3.0.3 - sanitized specfile (s/Copyright/License, server macros, Requires, etc.) - sanitized build process: DESTDIR is set to %{home_s} - added directory in sympa home for pids - added missing variables when generating config files (patch0) - fixed file to chown (wwsympa.conf) in %%post section - fixed syslog variable in /etc/[ww]sympa.conf - removed patch1: log_socket_type=inet, openssl path are set correctly - removed patch2: use_fast_cgi=0, no html archives (mhonarc path unset) * Wed Oct 11 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 2.7.3-7mdk - Make something smarter than exit 1 when doing an upgrade and moving the sympa files. * Fri Oct 6 2000 Denis Havlik <denis@mandrakesoft.com> 2.7.3-6mdk - changed home-dir to /var/lib/sympa, fixed config. files - fixed licence (GPL now) * Wed Aug 30 2000 Geoffrey Lee <snailtalk@mandrakesoft.com> 2.7.3-5mdk - requires apache because of wwsympa. - buildrequires apache to fix building for machines without apache (sic). * Fri Aug 18 2000 Geoffrey Lee <snailtalk@mandrakesoft.com> 2.7.3-4mdk - rebuild to enable openssl. - add requires and buildrequires for {openssl,openssl-devel} - copy the wwsympa configuration file on postun if none is present in /etc. * Thu Aug 17 2000 Geoffrey Lee <snailtalk@mandrakesoft.com> 2.7.3-3mdk - rebuild to fix some more annoying bugs. * Mon Aug 14 2000 Geoffrey Lee <snailtalk@mandrakesoft.com> 2.7.3-2mdk - rebuild for sympa disaster * Tue Aug 01 2000 Geoffrey Lee <snailtalk@mandrakesoft.com> 2.7.3-1mdk - big shiny new version and got this ugly fucking piece of shit to package - rebuild for BM * Tue Apr 18 2000 Jerome Dumonteil <jd@mandrakesoft.com> - change group * Fri Mar 31 2000 Jerome Dumonteil <jd@mandrakesoft.com> - change group - modif postun * Wed Dec 29 1999 Jerome Dumonteil <jd@mandrakesoft.com> - version 2.4 * Fri Dec 17 1999 Jerome Dumonteil <jd@mandrakesoft.com> - added link /etc/smrsh/queue - added link for /home/sympa/expl/helpfile * Thu Dec 09 1999 Jerome Dumonteil <jd@mandrakesoft.com> - remove backup files from sources - strip binary * Mon Dec 6 1999 Jerome Dumonteil <jd@mandrakesoft.com> - added prereq info. - little cleanup. * Fri Dec 3 1999 Jerome Dumonteil <jd@mandrakesoft.com> - first version of rpm.