head 1.18; access; symbols OPENPKG_E1_MP_HEAD:1.8 OPENPKG_E1_MP:1.8 OPENPKG_E1_MP_2_STABLE:1.6.2.2 OPENPKG_E1_FP:1.6.2.2 OPENPKG_2_STABLE_MP:1.6 OPENPKG_2_STABLE_20061018:1.6.2.2 OPENPKG_2_STABLE:1.6.0.2; locks; strict; comment @-- @; 1.18 date 2009.04.18.13.16.25; author rse; state Exp; branches; next 1.17; commitid 4pHXU27WTIGCZuKt; 1.17 date 2009.04.18.07.59.25; author rse; state Exp; branches; next 1.16; commitid yNmyHHZWqcUmktKt; 1.16 date 2008.01.01.15.05.37; author rse; state Exp; branches; next 1.15; commitid B8esaHJHoduuKILs; 1.15 date 2007.11.27.11.22.04; author cs; state Exp; branches; next 1.14; commitid VmT7uZO45HShMcHs; 1.14 date 2007.08.08.05.15.31; author cs; state Exp; branches; next 1.13; commitid HRxGnHSr7XeKjUss; 1.13 date 2007.06.22.11.01.48; author rse; state Exp; branches; next 1.12; commitid SHTWVKTIONh7KTms; 1.12 date 2007.06.14.05.40.09; author rse; state Exp; branches; next 1.11; commitid ZmHNiZ7OuzwOdQls; 1.11 date 2007.06.04.15.35.52; author rse; state Exp; branches; next 1.10; commitid cKb0K4A5bVh6QBks; 1.10 date 2007.04.18.21.46.25; author thl; state Exp; branches; next 1.9; commitid WyQKNMwmoITBoBes; 1.9 date 2007.02.06.16.38.51; author rse; state Exp; branches; next 1.8; commitid XGfYrzvfG1oSYr5s; 1.8 date 2007.01.01.17.42.11; author rse; state Exp; branches; next 1.7; commitid BicZD6VUl7GuqP0s; 1.7 date 2006.10.19.15.37.52; author cs; state Exp; branches; next 1.6; commitid IePfBRuFwoqabjRr; 1.6 date 2006.10.13.17.34.39; author thl; state Exp; branches 1.6.2.1; next 1.5; commitid q5GSxzsSDX29XxQr; 1.5 date 2006.09.25.16.35.33; author cs; state Exp; branches; next 1.4; commitid gIORmoY6zQjNgeOr; 1.4 date 2006.08.25.19.19.29; author rse; state Exp; branches; next 1.3; commitid Tvsj1UyQ8rQ89gKr; 1.3 date 2006.08.15.19.26.29; author rse; state Exp; branches; next 1.2; commitid 5SLA7imW3Xw8xYIr; 1.2 date 2006.06.05.08.00.11; author rse; state Exp; branches; next 1.1; commitid LyKqgXszGQ0b1Nzr; 1.1 date 2006.03.01.14.09.59; author rse; state Exp; branches; next ; commitid xjk6yiS4lfMy8unr; 1.6.2.1 date 2006.10.13.17.34.39; author rse; state dead; branches; next 1.6.2.2; commitid iZxwRSmmWscPXUQr; 1.6.2.2 date 2006.10.16.14.56.59; author rse; state Exp; branches; next ; commitid iZxwRSmmWscPXUQr; desc @@ 1.18 log @bump years in copyright messages @ text @## ## sympa.spec -- OpenPKG RPM Package Specification ## Copyright (c) 2000-2009 OpenPKG Foundation e.V. ## ## Permission to use, copy, modify, and distribute this software for ## any purpose with or without fee is hereby granted, provided that ## the above copyright notice and this permission notice appear in all ## copies. ## ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ## SUCH DAMAGE. ## # package information Name: sympa Summary: Mailing List Manager URL: http://www.sympa.org/ Vendor: CRU Packager: OpenPKG Foundation e.V. Distribution: OpenPKG Community Class: EVAL Group: Mail License: GPL Version: 5.4.1 Release: 20090418 # list of sources Source0: http://www.sympa.org/distribution/sympa-%{version}.tar.gz Source1: sympa-wrapper.c Source2: sympa-setup.sh Source3: sympa-apache.conf Source4: rc.sympa Patch0: sympa.patch # build information Prefix: %{l_prefix} BuildRoot: %{l_buildroot} BuildPreReq: OpenPKG, openpkg >= 20060823 PreReq: OpenPKG, openpkg >= 20060823 BuildPreReq: openssl, mhonarc PreReq: openssl, mhonarc BuildPreReq: perl-crypto, perl-mail, perl-util, perl-www, perl-comp PreReq: perl-crypto, perl-mail, perl-util, perl-www, perl-comp BuildPreReq: perl-locale, perl-parse, perl-sys, perl-ldap PreReq: perl-locale, perl-parse, perl-sys, perl-ldap BuildPreReq: perl-db, perl-dbi, perl-dbi::with_mysql = yes PreReq: perl-db, perl-dbi, perl-dbi::with_mysql = yes BuildPreReq: perl-xml, perl-xml::with_libxml = yes PreReq: perl-xml, perl-xml::with_libxml = yes PreReq: apache, apache-fastcgi = yes PreReq: MTA AutoReq: no AutoReqProv: no %description Sympa is a rich open source mailing list software. Its design highly focuses on customization possibilities and ease of administration. Advanced features are: Bulk emailer, Internationalization, Service messages and web pages defined by templates, Subscriber information stored in a RDBMS, Web interface with user and admin features, Different web authentication backends including Single Sign-on systems, Web document repository for list members, S/MIME support for both signature verification and mail encryption, Automatic bounces management, External antiviral plugin, Virtual robots management and SOAP ML service. %track prog sympa = { version = %{version} url = http://www.sympa.org/distribution/ regex = sympa-(\d+\.\d+(\.\d+)*)\.tar\.gz } %prep %setup -q %patch -p0 %build # disable interactive checks %{l_shtool} subst \ -e 's;warning checkperl checkcpan \(sources man locale\);\1;' \ Makefile.in # disable ownership enforcements %{l_shtool} subst \ -e 's;chown;true;' \ -e 's;chgrp;true;' \ Makefile.in */Makefile */*/Makefile # configure program CC="%{l_cc}" \ CFLAGS="%{l_cflags -O}" \ CPPFLAGS="%{l_cppflags}" \ LDFLAGS="%{l_ldflags}" \ ./configure \ --prefix=%{l_prefix} \ --with-sbindir=%{l_prefix}/sbin \ --with-libexecdir=%{l_prefix}/libexec/sympa \ --with-cgidir=%{l_prefix}/libexec/sympa \ --with-confdir=%{l_prefix}/etc/sympa \ --with-iconsdir=%{l_prefix}/share/sympa/icons \ --with-datadir=%{l_prefix}/share/sympa \ --with-expldir=%{l_prefix}/var/sympa/expl \ --with-libdir=%{l_prefix}/lib/sympa \ --with-mandir=%{l_prefix}/man/man1 \ --with-docdir=%{l_prefix}/share/sympa/doc \ --with-initdir=%{l_prefix}/etc/sympa \ --with-lockdir=%{l_prefix}/var/sympa/run \ --with-piddir=%{l_prefix}/var/sympa/run \ --with-etcdir=%{l_prefix}/var/sympa/etc \ --with-localedir=%{l_prefix}/share/sympa/locale \ --with-scriptdir=%{l_prefix}/share/sympa/script \ --with-sampledir=%{l_prefix}/share/sympa/sample \ --with-spooldir=%{l_prefix}/var/sympa/spool \ --with-perl=%{l_prefix}/bin/perl \ --with-openssl=%{l_prefix}/bin/openssl \ --with-user=%{l_rusr} \ --with-group=%{l_rgrp} \ --with-sendmail_aliases=%{l_prefix}/var/sympa/mta/aliases \ --with-virtual_aliases=%{l_prefix}/var/sympa/mta/virtual \ --with-newaliases=`%{l_shtool} path -p %{l_prefix}/bin:%{l_prefix}/sbin newaliases` \ --with-postmap=%{l_prefix}/sbin/postmap \ --enable-secure # build program %{l_make} %{l_mflags} # build setuid wrappers %{l_cc} %{l_cflags -O} %{l_ldflags} \ '-DSCRIPT_PATH="%{l_prefix}/libexec/sympa/wwsympa.fcgi"' \ -o wwsympa.cgi %{SOURCE sympa-wrapper.c} %{l_cc} %{l_cflags -O} %{l_ldflags} \ '-DSCRIPT_PATH="%{l_prefix}/libexec/sympa/sympa_soap_server.fcgi"' \ -o sympa_soap_server.cgi %{SOURCE sympa-wrapper.c} %install # install program rm -rf $RPM_BUILD_ROOT %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT # post-adjust installation %{l_shtool} subst \ -e 's;^#\(db_type\);\1;' \ -e 's;^#\(db_name\);\1;' \ -e 's;^#\(db_host\);\1;' \ -e 's;^#\(db_user\);\1;' \ -e 's;^#\(db_passwd\);\1;' \ $RPM_BUILD_ROOT%{l_prefix}/etc/sympa/sympa.conf # strip down installation rm -f $RPM_BUILD_ROOT%{l_prefix}/etc/sympa/sympa chmod a-s $RPM_BUILD_ROOT%{l_prefix}/libexec/sympa/*.fcgi strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true # install setuid wrappers %{l_shtool} mkdir -f -p -m 755 \ $RPM_BUILD_ROOT%{l_prefix}/cgi %{l_shtool} install -c -s -m 755 \ wwsympa.cgi sympa_soap_server.cgi \ $RPM_BUILD_ROOT%{l_prefix}/cgi/ # install setup script %{l_shtool} install -c -m 755 %{l_value -s -a} \ %{SOURCE sympa-setup.sh} $RPM_BUILD_ROOT%{l_prefix}/sbin/sympa-setup # install Apache configuration %{l_shtool} install -c -m 644 %{l_value -s -a} \ %{SOURCE sympa-apache.conf} \ $RPM_BUILD_ROOT%{l_prefix}/etc/sympa/ # install run-command script %{l_shtool} mkdir -f -p -m 755 \ $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d %{l_shtool} install -c -m 755 %{l_value -s -a} \ %{SOURCE rc.sympa} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/ # create additional directories (Sympa missing) %{l_shtool} mkdir -f -p -m 755 \ $RPM_BUILD_ROOT%{l_prefix}/var/sympa/spool/bounce \ $RPM_BUILD_ROOT%{l_prefix}/var/sympa/spool/subscribe \ $RPM_BUILD_ROOT%{l_prefix}/var/sympa/spool/distribute \ $RPM_BUILD_ROOT%{l_prefix}/var/sympa/spool/distribute/bad \ $RPM_BUILD_ROOT%{l_prefix}/var/sympa/spool/msg/bad # create additional directories (OpenPKG specific) %{l_shtool} mkdir -f -p -m 755 \ $RPM_BUILD_ROOT%{l_prefix}/var/sympa/store/arc \ $RPM_BUILD_ROOT%{l_prefix}/var/sympa/store/bounce \ $RPM_BUILD_ROOT%{l_prefix}/var/sympa/mta # determine installation files %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ %{l_files_std} \ '%config %{l_prefix}/etc/sympa/*' \ '%attr(6755,%{l_rusr},%{l_rgrp}) %{l_prefix}/bin/bouncequeue' \ '%attr(6755,%{l_rusr},%{l_rgrp}) %{l_prefix}/bin/queue' \ '%attr(6755,%{l_rusr},%{l_rgrp}) %{l_prefix}/cgi/wwsympa.cgi' \ '%attr(6755,%{l_rusr},%{l_rgrp}) %{l_prefix}/cgi/sympa_soap_server.cgi' \ '%attr(4755,%{l_susr},%{l_mgrp}) %{l_prefix}/libexec/sympa/aliaswrapper' \ '%attr(4755,%{l_susr},%{l_mgrp}) %{l_prefix}/libexec/sympa/virtualwrapper' \ '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/sympa' \ '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/sympa/*' \ '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/sympa/*/*' \ '%attr(-,%{l_susr},%{l_rgrp}) %{l_prefix}/var/sympa/mta' \ '%doc %{l_prefix}/share/sympa/doc/*/html' \ '%doc %{l_prefix}/share/sympa/doc/*' %files -f files %clean rm -rf $RPM_BUILD_ROO %post if [ $1 -eq 1 ]; then # add hook to Apache configuration apacheconf="$RPM_INSTALL_PREFIX/etc/apache/apache.conf" if [ -f $apacheconf ]; then ( echo "Include $RPM_INSTALL_PREFIX/etc/sympa/sympa-apache.conf" ) | $RPM_INSTALL_PREFIX/lib/openpkg/rpmtool config \ -a -i "$RPM_INSTALL_PREFIX:sympa" $apacheconf fi # establish initial Sympa MTA glue files touch $RPM_INSTALL_PREFIX/var/sympa/mta/aliases touch $RPM_INSTALL_PREFIX/var/sympa/mta/virtual chown %{l_rusr}:%{l_rgrp} $RPM_INSTALL_PREFIX/var/sympa/mta/* # hook into MTA mta_name=`$RPM_INSTALL_PREFIX/bin/openpkg rc --query MTA_name` mta_aliases_file=`$RPM_INSTALL_PREFIX/bin/openpkg rc --query MTA_aliases_file` mta_update_command=`$RPM_INSTALL_PREFIX/bin/openpkg rc --query MTA_aliases_update` if [ ".$mta_aliases_file" != . ]; then ( echo "# Sympa Static Aliases" echo "listmaster: \"|$RPM_INSTALL_PREFIX/bin/queue listmaster\"" echo "sympa: \"|$RPM_INSTALL_PREFIX/bin/queue sympa\"" echo "bounce+*: \"|$RPM_INSTALL_PREFIX/bin/bouncequeue sympa\"" echo "sympa-request: postmaster" echo "sympa-owner: postmaster" ) |\ $RPM_INSTALL_PREFIX/lib/openpkg/rpmtool config \ -a -i "$RPM_INSTALL_PREFIX:sympa" $mta_aliases_file fi if [ ".$mta_update_command" != . ]; then eval $mta_update_command >/dev/null 2>&1 || true fi case "$mta_name" in sendmail ) ( echo "dnl # Sympa Dynamic Aliases" echo "define(\`ALIAS_FILE', ALIAS_FILE\`,$RPM_INSTALL_PREFIX/var/sympa/mta/aliases')" ) |\ $RPM_INSTALL_PREFIX/lib/openpkg/rpmtool config \ -a -i "$RPM_INSTALL_PREFIX:sympa" -p "dnl " $RPM_INSTALL_PREFIX/etc/sendmail/sendmail.m4 (cd $RPM_INSTALL_PREFIX/etc/sendmail && make) >/dev/null 2>&1 || true ;; postfix ) %{l_shtool} subst -b .orig \ -e "s;^\\(alias_maps[^=]*=.*\\);\\1, hash:$RPM_INSTALL_PREFIX/var/sympa/mta/aliases;" \ -e "s;^\\(alias_database[^=]*=.*\\);\\1, hash:$RPM_INSTALL_PREFIX/var/sympa/mta/aliases;" \ $RPM_INSTALL_PREFIX/etc/postfix/main.cf (cd $RPM_INSTALL_PREFIX/etc/postfix && make) >/dev/null 2>&1 || true ;; esac # display final hints on initial installation ( echo "To complete this installation of Sympa please perform:" echo "1. optionally set a fresh random password for the Sympa" echo " database by editing the \"db_password\", \"listmaster\"" echo " and \"domain\" entries in the configuration file:" echo " \$ vi $RPM_INSTALL_PREFIX/etc/sympa/sympa.conf" echo "2. start MySQL and initialize the Sympa database with:" echo " \$ $RPM_INSTALL_PREFIX/bin/openpkg rc mysql start" echo " \$ $RPM_INSTALL_PREFIX/sbin/sympa-setup install" echo "3. start Apache and the Sympa daemons with:" echo " \$ $RPM_INSTALL_PREFIX/bin/openpkg rc apache start" echo " \$ $RPM_INSTALL_PREFIX/bin/openpkg rc sympa start" echo "4. connect with a browser to Sympa for further configuration:" echo " http://127.0.0.1/sympa/" echo "5. login with \"listmaster\" for Sympa administrative access." ) | %{l_rpmtool} msg -b -t notice fi if [ $1 -eq 2 ]; then # after upgrade, restart service eval `%{l_rc} sympa status 2>/dev/null` [ ".$sympa_active" = .yes ] && %{l_rc} sympa restart fi exit 0 %preun if [ $1 -eq 0 ]; then # remove hook from Apache configuration apacheconf="$RPM_INSTALL_PREFIX/etc/apache/apache.conf" if [ -f $apacheconf ]; then $RPM_INSTALL_PREFIX/lib/openpkg/rpmtool config \ -r -i "$RPM_INSTALL_PREFIX:sympa" $apacheconf fi # unhook from MTA mta_name=`$RPM_INSTALL_PREFIX/bin/openpkg rc --query MTA_name` mta_aliases_file=`$RPM_INSTALL_PREFIX/bin/openpkg rc --query MTA_aliases_file` mta_update_command=`$RPM_INSTALL_PREFIX/bin/openpkg rc --query MTA_aliases_update` if [ ".$mta_aliases_file" != . ]; then $RPM_INSTALL_PREFIX/lib/openpkg/rpmtool config \ -r -i "$RPM_INSTALL_PREFIX:sympa" $mta_aliases_file fi if [ ".$mta_update_command" != . ]; then eval $mta_update_command >/dev/null 2>&1 || true fi case "$mta_name" in sendmail ) $RPM_INSTALL_PREFIX/lib/openpkg/rpmtool config \ -r -i "$RPM_INSTALL_PREFIX:sympa" -p "dnl " $RPM_INSTALL_PREFIX/etc/sendmail/sendmail.m4 (cd $RPM_INSTALL_PREFIX/etc/sendmail && make) >/dev/null 2>&1 || true ;; postfix ) %{l_shtool} subst -b .orig \ -e "s;^\\(alias_maps[^=]*=.*\\), hash:$RPM_INSTALL_PREFIX/var/sympa/mta/aliases;\\1;" \ -e "s;^\\(alias_database[^=]*=.*\\), hash:$RPM_INSTALL_PREFIX/var/sympa/mta/aliases;\\1;" \ $RPM_INSTALL_PREFIX/etc/postfix/main.cf (cd $RPM_INSTALL_PREFIX/etc/postfix && make) >/dev/null 2>&1 || true ;; esac # before erase, stop service and remove log files %{l_rc} sympa stop 2>/dev/null rm -f $RPM_INSTALL_PREFIX/var/sympa/run/*.pid >/dev/null 2>&1 || true rm -f $RPM_INSTALL_PREFIX/var/sympa/run/sympa.log >/dev/null 2>&1 || true rm -f $RPM_INSTALL_PREFIX/var/sympa/spool/*/* >/dev/null 2>&1 || true rm -f $RPM_INSTALL_PREFIX/var/sympa/mta/* >/dev/null 2>&1 || true rm -rf $RPM_INSTALL_PREFIX/var/sympa/expl/* >/dev/null 2>&1 || true $RPM_INSTALL_PREFIX/sbin/sympa-setup uninstall >/dev/null 2>&1 || true fi exit 0 @ 1.17 log @adjust dependency @ text @d3 1 a3 1 ## Copyright (c) 2000-2008 OpenPKG Foundation e.V. @ 1.16 log @Update package specifications according to OpenPKG year 2008 world order: http://www.mail-archive.com/openpkg-announce@@openpkg.org/msg00221.html @ text @d34 2 a35 2 Version: 5.3.4 Release: 20080101 d56 2 a57 2 BuildPreReq: perl-db, perl-dbi, perl-dbi::with_dbd_mysql = yes PreReq: perl-db, perl-dbi, perl-dbi::with_dbd_mysql = yes @ 1.15 log @upgrading package: sympa 5.3.3 -> 5.3.4 @ text @d3 1 a3 2 ## Copyright (c) 2000-2007 OpenPKG Foundation e.V. ## Copyright (c) 2000-2007 Ralf S. Engelschall d35 1 a35 1 Release: 20071127 @ 1.14 log @upgrading package: sympa 5.3.2 -> 5.3.3 @ text @d35 2 a36 2 Version: 5.3.3 Release: 20070808 @ 1.13 log @new OpenPKG world order: upgrade from Apache 1.3 to 2.2 (part 2/3: modified dependency packages) @ text @d35 2 a36 2 Version: 5.3.2 Release: 20070622 @ 1.12 log @upgrading package: sympa 5.3.1 -> 5.3.2 @ text @d36 1 a36 1 Release: 20070614 d61 1 a61 1 PreReq: apache, apache::with_mod_fastcgi = yes @ 1.11 log @upgrading package: sympa 5.2.4 -> 5.3.1 @ text @d35 2 a36 2 Version: 5.3.1 Release: 20070604 @ 1.10 log @get rid of direct /etc/rc call and replace them with openpkg @ text @d35 2 a36 2 Version: 5.2.4 Release: 20070418 @ 1.9 log @upgrading package: sympa 5.2.3 -> 5.2.4 @ text @d36 1 a36 1 Release: 20070206 d240 3 a242 3 mta_name=`$RPM_INSTALL_PREFIX/etc/rc --query MTA_name` mta_aliases_file=`$RPM_INSTALL_PREFIX/etc/rc --query MTA_aliases_file` mta_update_command=`$RPM_INSTALL_PREFIX/etc/rc --query MTA_aliases_update` d282 1 a282 1 echo " \$ $RPM_INSTALL_PREFIX/etc/rc mysql start" d285 2 a286 2 echo " \$ $RPM_INSTALL_PREFIX/etc/rc apache start" echo " \$ $RPM_INSTALL_PREFIX/etc/rc sympa start" d309 3 a311 3 mta_name=`$RPM_INSTALL_PREFIX/etc/rc --query MTA_name` mta_aliases_file=`$RPM_INSTALL_PREFIX/etc/rc --query MTA_aliases_file` mta_update_command=`$RPM_INSTALL_PREFIX/etc/rc --query MTA_aliases_update` @ 1.8 log @Welcome Year 2007! @ text @d35 2 a36 2 Version: 5.2.3 Release: 20061019 @ 1.7 log @upgrading package: sympa 5.2.2 -> 5.2.3 @ text @d3 2 a4 2 ## Copyright (c) 2000-2006 OpenPKG Foundation e.V. ## Copyright (c) 2000-2006 Ralf S. Engelschall @ 1.6 log @new world order for "Packager" and "Distribution" headers @ text @d35 2 a36 2 Version: 5.2.2 Release: 20061013 @ 1.6.2.1 log @file sympa.spec was added on branch OPENPKG_2_STABLE on 2006-10-16 14:56:59 +0000 @ text @d1 344 @ 1.6.2.2 log @Mass merge from CURRENT to 2-STABLE (all packages except those of JUNK class) @ text @a0 344 ## ## sympa.spec -- OpenPKG RPM Package Specification ## Copyright (c) 2000-2006 OpenPKG Foundation e.V. ## Copyright (c) 2000-2006 Ralf S. Engelschall ## ## Permission to use, copy, modify, and distribute this software for ## any purpose with or without fee is hereby granted, provided that ## the above copyright notice and this permission notice appear in all ## copies. ## ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ## SUCH DAMAGE. ## # package information Name: sympa Summary: Mailing List Manager URL: http://www.sympa.org/ Vendor: CRU Packager: OpenPKG Foundation e.V. Distribution: OpenPKG Community Class: EVAL Group: Mail License: GPL Version: 5.2.2 Release: 2.20061018 # list of sources Source0: http://www.sympa.org/distribution/sympa-%{version}.tar.gz Source1: sympa-wrapper.c Source2: sympa-setup.sh Source3: sympa-apache.conf Source4: rc.sympa Patch0: sympa.patch # build information Prefix: %{l_prefix} BuildRoot: %{l_buildroot} BuildPreReq: OpenPKG, openpkg >= 2.20061018 PreReq: OpenPKG, openpkg >= 2.20061018 BuildPreReq: openssl, mhonarc PreReq: openssl, mhonarc BuildPreReq: perl-crypto, perl-mail, perl-util, perl-www, perl-comp PreReq: perl-crypto, perl-mail, perl-util, perl-www, perl-comp BuildPreReq: perl-locale, perl-parse, perl-sys, perl-ldap PreReq: perl-locale, perl-parse, perl-sys, perl-ldap BuildPreReq: perl-db, perl-dbi, perl-dbi::with_dbd_mysql = yes PreReq: perl-db, perl-dbi, perl-dbi::with_dbd_mysql = yes BuildPreReq: perl-xml, perl-xml::with_libxml = yes PreReq: perl-xml, perl-xml::with_libxml = yes PreReq: apache, apache::with_mod_fastcgi = yes PreReq: MTA AutoReq: no AutoReqProv: no %description Sympa is a rich open source mailing list software. Its design highly focuses on customization possibilities and ease of administration. Advanced features are: Bulk emailer, Internationalization, Service messages and web pages defined by templates, Subscriber information stored in a RDBMS, Web interface with user and admin features, Different web authentication backends including Single Sign-on systems, Web document repository for list members, S/MIME support for both signature verification and mail encryption, Automatic bounces management, External antiviral plugin, Virtual robots management and SOAP ML service. %track prog sympa = { version = %{version} url = http://www.sympa.org/distribution/ regex = sympa-(\d+\.\d+(\.\d+)*)\.tar\.gz } %prep %setup -q %patch -p0 %build # disable interactive checks %{l_shtool} subst \ -e 's;warning checkperl checkcpan \(sources man locale\);\1;' \ Makefile.in # disable ownership enforcements %{l_shtool} subst \ -e 's;chown;true;' \ -e 's;chgrp;true;' \ Makefile.in */Makefile */*/Makefile # configure program CC="%{l_cc}" \ CFLAGS="%{l_cflags -O}" \ CPPFLAGS="%{l_cppflags}" \ LDFLAGS="%{l_ldflags}" \ ./configure \ --prefix=%{l_prefix} \ --with-sbindir=%{l_prefix}/sbin \ --with-libexecdir=%{l_prefix}/libexec/sympa \ --with-cgidir=%{l_prefix}/libexec/sympa \ --with-confdir=%{l_prefix}/etc/sympa \ --with-iconsdir=%{l_prefix}/share/sympa/icons \ --with-datadir=%{l_prefix}/share/sympa \ --with-expldir=%{l_prefix}/var/sympa/expl \ --with-libdir=%{l_prefix}/lib/sympa \ --with-mandir=%{l_prefix}/man/man1 \ --with-docdir=%{l_prefix}/share/sympa/doc \ --with-initdir=%{l_prefix}/etc/sympa \ --with-lockdir=%{l_prefix}/var/sympa/run \ --with-piddir=%{l_prefix}/var/sympa/run \ --with-etcdir=%{l_prefix}/var/sympa/etc \ --with-localedir=%{l_prefix}/share/sympa/locale \ --with-scriptdir=%{l_prefix}/share/sympa/script \ --with-sampledir=%{l_prefix}/share/sympa/sample \ --with-spooldir=%{l_prefix}/var/sympa/spool \ --with-perl=%{l_prefix}/bin/perl \ --with-openssl=%{l_prefix}/bin/openssl \ --with-user=%{l_rusr} \ --with-group=%{l_rgrp} \ --with-sendmail_aliases=%{l_prefix}/var/sympa/mta/aliases \ --with-virtual_aliases=%{l_prefix}/var/sympa/mta/virtual \ --with-newaliases=`%{l_shtool} path -p %{l_prefix}/bin:%{l_prefix}/sbin newaliases` \ --with-postmap=%{l_prefix}/sbin/postmap \ --enable-secure # build program %{l_make} %{l_mflags} # build setuid wrappers %{l_cc} %{l_cflags -O} %{l_ldflags} \ '-DSCRIPT_PATH="%{l_prefix}/libexec/sympa/wwsympa.fcgi"' \ -o wwsympa.cgi %{SOURCE sympa-wrapper.c} %{l_cc} %{l_cflags -O} %{l_ldflags} \ '-DSCRIPT_PATH="%{l_prefix}/libexec/sympa/sympa_soap_server.fcgi"' \ -o sympa_soap_server.cgi %{SOURCE sympa-wrapper.c} %install # install program rm -rf $RPM_BUILD_ROOT %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT # post-adjust installation %{l_shtool} subst \ -e 's;^#\(db_type\);\1;' \ -e 's;^#\(db_name\);\1;' \ -e 's;^#\(db_host\);\1;' \ -e 's;^#\(db_user\);\1;' \ -e 's;^#\(db_passwd\);\1;' \ $RPM_BUILD_ROOT%{l_prefix}/etc/sympa/sympa.conf # strip down installation rm -f $RPM_BUILD_ROOT%{l_prefix}/etc/sympa/sympa chmod a-s $RPM_BUILD_ROOT%{l_prefix}/libexec/sympa/*.fcgi strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true # install setuid wrappers %{l_shtool} mkdir -f -p -m 755 \ $RPM_BUILD_ROOT%{l_prefix}/cgi %{l_shtool} install -c -s -m 755 \ wwsympa.cgi sympa_soap_server.cgi \ $RPM_BUILD_ROOT%{l_prefix}/cgi/ # install setup script %{l_shtool} install -c -m 755 %{l_value -s -a} \ %{SOURCE sympa-setup.sh} $RPM_BUILD_ROOT%{l_prefix}/sbin/sympa-setup # install Apache configuration %{l_shtool} install -c -m 644 %{l_value -s -a} \ %{SOURCE sympa-apache.conf} \ $RPM_BUILD_ROOT%{l_prefix}/etc/sympa/ # install run-command script %{l_shtool} mkdir -f -p -m 755 \ $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d %{l_shtool} install -c -m 755 %{l_value -s -a} \ %{SOURCE rc.sympa} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/ # create additional directories (Sympa missing) %{l_shtool} mkdir -f -p -m 755 \ $RPM_BUILD_ROOT%{l_prefix}/var/sympa/spool/bounce \ $RPM_BUILD_ROOT%{l_prefix}/var/sympa/spool/subscribe \ $RPM_BUILD_ROOT%{l_prefix}/var/sympa/spool/distribute \ $RPM_BUILD_ROOT%{l_prefix}/var/sympa/spool/distribute/bad \ $RPM_BUILD_ROOT%{l_prefix}/var/sympa/spool/msg/bad # create additional directories (OpenPKG specific) %{l_shtool} mkdir -f -p -m 755 \ $RPM_BUILD_ROOT%{l_prefix}/var/sympa/store/arc \ $RPM_BUILD_ROOT%{l_prefix}/var/sympa/store/bounce \ $RPM_BUILD_ROOT%{l_prefix}/var/sympa/mta # determine installation files %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ %{l_files_std} \ '%config %{l_prefix}/etc/sympa/*' \ '%attr(6755,%{l_rusr},%{l_rgrp}) %{l_prefix}/bin/bouncequeue' \ '%attr(6755,%{l_rusr},%{l_rgrp}) %{l_prefix}/bin/queue' \ '%attr(6755,%{l_rusr},%{l_rgrp}) %{l_prefix}/cgi/wwsympa.cgi' \ '%attr(6755,%{l_rusr},%{l_rgrp}) %{l_prefix}/cgi/sympa_soap_server.cgi' \ '%attr(4755,%{l_susr},%{l_mgrp}) %{l_prefix}/libexec/sympa/aliaswrapper' \ '%attr(4755,%{l_susr},%{l_mgrp}) %{l_prefix}/libexec/sympa/virtualwrapper' \ '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/sympa' \ '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/sympa/*' \ '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/sympa/*/*' \ '%attr(-,%{l_susr},%{l_rgrp}) %{l_prefix}/var/sympa/mta' \ '%doc %{l_prefix}/share/sympa/doc/*/html' \ '%doc %{l_prefix}/share/sympa/doc/*' %files -f files %clean rm -rf $RPM_BUILD_ROO %post if [ $1 -eq 1 ]; then # add hook to Apache configuration apacheconf="$RPM_INSTALL_PREFIX/etc/apache/apache.conf" if [ -f $apacheconf ]; then ( echo "Include $RPM_INSTALL_PREFIX/etc/sympa/sympa-apache.conf" ) | $RPM_INSTALL_PREFIX/lib/openpkg/rpmtool config \ -a -i "$RPM_INSTALL_PREFIX:sympa" $apacheconf fi # establish initial Sympa MTA glue files touch $RPM_INSTALL_PREFIX/var/sympa/mta/aliases touch $RPM_INSTALL_PREFIX/var/sympa/mta/virtual chown %{l_rusr}:%{l_rgrp} $RPM_INSTALL_PREFIX/var/sympa/mta/* # hook into MTA mta_name=`$RPM_INSTALL_PREFIX/etc/rc --query MTA_name` mta_aliases_file=`$RPM_INSTALL_PREFIX/etc/rc --query MTA_aliases_file` mta_update_command=`$RPM_INSTALL_PREFIX/etc/rc --query MTA_aliases_update` if [ ".$mta_aliases_file" != . ]; then ( echo "# Sympa Static Aliases" echo "listmaster: \"|$RPM_INSTALL_PREFIX/bin/queue listmaster\"" echo "sympa: \"|$RPM_INSTALL_PREFIX/bin/queue sympa\"" echo "bounce+*: \"|$RPM_INSTALL_PREFIX/bin/bouncequeue sympa\"" echo "sympa-request: postmaster" echo "sympa-owner: postmaster" ) |\ $RPM_INSTALL_PREFIX/lib/openpkg/rpmtool config \ -a -i "$RPM_INSTALL_PREFIX:sympa" $mta_aliases_file fi if [ ".$mta_update_command" != . ]; then eval $mta_update_command >/dev/null 2>&1 || true fi case "$mta_name" in sendmail ) ( echo "dnl # Sympa Dynamic Aliases" echo "define(\`ALIAS_FILE', ALIAS_FILE\`,$RPM_INSTALL_PREFIX/var/sympa/mta/aliases')" ) |\ $RPM_INSTALL_PREFIX/lib/openpkg/rpmtool config \ -a -i "$RPM_INSTALL_PREFIX:sympa" -p "dnl " $RPM_INSTALL_PREFIX/etc/sendmail/sendmail.m4 (cd $RPM_INSTALL_PREFIX/etc/sendmail && make) >/dev/null 2>&1 || true ;; postfix ) %{l_shtool} subst -b .orig \ -e "s;^\\(alias_maps[^=]*=.*\\);\\1, hash:$RPM_INSTALL_PREFIX/var/sympa/mta/aliases;" \ -e "s;^\\(alias_database[^=]*=.*\\);\\1, hash:$RPM_INSTALL_PREFIX/var/sympa/mta/aliases;" \ $RPM_INSTALL_PREFIX/etc/postfix/main.cf (cd $RPM_INSTALL_PREFIX/etc/postfix && make) >/dev/null 2>&1 || true ;; esac # display final hints on initial installation ( echo "To complete this installation of Sympa please perform:" echo "1. optionally set a fresh random password for the Sympa" echo " database by editing the \"db_password\", \"listmaster\"" echo " and \"domain\" entries in the configuration file:" echo " \$ vi $RPM_INSTALL_PREFIX/etc/sympa/sympa.conf" echo "2. start MySQL and initialize the Sympa database with:" echo " \$ $RPM_INSTALL_PREFIX/etc/rc mysql start" echo " \$ $RPM_INSTALL_PREFIX/sbin/sympa-setup install" echo "3. start Apache and the Sympa daemons with:" echo " \$ $RPM_INSTALL_PREFIX/etc/rc apache start" echo " \$ $RPM_INSTALL_PREFIX/etc/rc sympa start" echo "4. connect with a browser to Sympa for further configuration:" echo " http://127.0.0.1/sympa/" echo "5. login with \"listmaster\" for Sympa administrative access." ) | %{l_rpmtool} msg -b -t notice fi if [ $1 -eq 2 ]; then # after upgrade, restart service eval `%{l_rc} sympa status 2>/dev/null` [ ".$sympa_active" = .yes ] && %{l_rc} sympa restart fi exit 0 %preun if [ $1 -eq 0 ]; then # remove hook from Apache configuration apacheconf="$RPM_INSTALL_PREFIX/etc/apache/apache.conf" if [ -f $apacheconf ]; then $RPM_INSTALL_PREFIX/lib/openpkg/rpmtool config \ -r -i "$RPM_INSTALL_PREFIX:sympa" $apacheconf fi # unhook from MTA mta_name=`$RPM_INSTALL_PREFIX/etc/rc --query MTA_name` mta_aliases_file=`$RPM_INSTALL_PREFIX/etc/rc --query MTA_aliases_file` mta_update_command=`$RPM_INSTALL_PREFIX/etc/rc --query MTA_aliases_update` if [ ".$mta_aliases_file" != . ]; then $RPM_INSTALL_PREFIX/lib/openpkg/rpmtool config \ -r -i "$RPM_INSTALL_PREFIX:sympa" $mta_aliases_file fi if [ ".$mta_update_command" != . ]; then eval $mta_update_command >/dev/null 2>&1 || true fi case "$mta_name" in sendmail ) $RPM_INSTALL_PREFIX/lib/openpkg/rpmtool config \ -r -i "$RPM_INSTALL_PREFIX:sympa" -p "dnl " $RPM_INSTALL_PREFIX/etc/sendmail/sendmail.m4 (cd $RPM_INSTALL_PREFIX/etc/sendmail && make) >/dev/null 2>&1 || true ;; postfix ) %{l_shtool} subst -b .orig \ -e "s;^\\(alias_maps[^=]*=.*\\), hash:$RPM_INSTALL_PREFIX/var/sympa/mta/aliases;\\1;" \ -e "s;^\\(alias_database[^=]*=.*\\), hash:$RPM_INSTALL_PREFIX/var/sympa/mta/aliases;\\1;" \ $RPM_INSTALL_PREFIX/etc/postfix/main.cf (cd $RPM_INSTALL_PREFIX/etc/postfix && make) >/dev/null 2>&1 || true ;; esac # before erase, stop service and remove log files %{l_rc} sympa stop 2>/dev/null rm -f $RPM_INSTALL_PREFIX/var/sympa/run/*.pid >/dev/null 2>&1 || true rm -f $RPM_INSTALL_PREFIX/var/sympa/run/sympa.log >/dev/null 2>&1 || true rm -f $RPM_INSTALL_PREFIX/var/sympa/spool/*/* >/dev/null 2>&1 || true rm -f $RPM_INSTALL_PREFIX/var/sympa/mta/* >/dev/null 2>&1 || true rm -rf $RPM_INSTALL_PREFIX/var/sympa/expl/* >/dev/null 2>&1 || true $RPM_INSTALL_PREFIX/sbin/sympa-setup uninstall >/dev/null 2>&1 || true fi exit 0 @ 1.5 log @upgrading package: sympa 5.2.1 -> 5.2.2 @ text @d30 2 a31 2 Packager: OpenPKG Distribution: OpenPKG d36 1 a36 1 Release: 20060925 @ 1.4 log @replace '@@l_prefix@@/lib/openpkg/bash @@l_prefix@@/etc/rc' in shebang with '@@l_prefix@@/bin/openpkg rc' to allow people who run the rc.xxx scripts directly (as executables) to leverage from the Set-UID functionality @ text @d35 2 a36 2 Version: 5.2.1 Release: 20060825 @ 1.3 log @do not hard-code MySQL administrator username @ text @d36 1 a36 1 Release: 20060815 d49 2 a50 2 BuildPreReq: OpenPKG, openpkg >= 20040130 PreReq: OpenPKG, openpkg >= 20040130 @ 1.2 log @upgrading package: sympa 5.1.2 -> 5.2.1 @ text @d36 1 a36 1 Release: 20060605 @ 1.1 log @New Package: Sympa (Mailing List Manager) Sponsored by: Fraunhofer Gesellschaft (FhG) Institut für Informations- und Datenverarbeitung (IITB) http://www.iitb.fraunhofer.de/ @ text @d35 2 a36 2 Version: 5.1.2 Release: 20060301 d133 2 a134 1 --with-postmap=%{l_prefix}/sbin/postmap @